All Projects → webgriffe → module-config-override

webgriffe / module-config-override

Licence: other
A Magento 2 module that overrides default configuration from file which can be added to version control.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to module-config-override

module-catalog
Fixes for some known Magento 2 issues in Catalog
Stars: ✭ 23 (+0%)
Mutual labels:  magento2, magento2-extension
Dev-Tools-Magento-2-Module
A collection of utilities meant to improve the experience of developing modules for Magento without breaking existing functionality.
Stars: ✭ 18 (-21.74%)
Mutual labels:  magento2, magento2-extension
magento2
Mollie Payments for Magento 2
Stars: ✭ 70 (+204.35%)
Mutual labels:  magento2, magento2-extension
module-geoip
Detect Country by IP in Magento 2
Stars: ✭ 51 (+121.74%)
Mutual labels:  magento2, magento2-extension
magento-ngrok
Magento 2 module for ngrok.io service support
Stars: ✭ 45 (+95.65%)
Mutual labels:  magento2, magento2-extension
customer-ajax-login
Free magento 2 extension for Popup and AJAX based Login and Sign Up | Manish Joy
Stars: ✭ 14 (-39.13%)
Mutual labels:  magento2, magento2-extension
stripe
Stripe integration with Magento 2
Stars: ✭ 58 (+152.17%)
Mutual labels:  magento2, magento2-extension
magento2-regions-manager
Manage regions in magento2 addresses, regions manager in magento 2
Stars: ✭ 34 (+47.83%)
Mutual labels:  magento2, magento2-extension
module-translation
magefan.com/magento-2-translation-extension
Stars: ✭ 35 (+52.17%)
Mutual labels:  magento2, magento2-extension
magento2-module-cron-schedule
A Magento2 visual cronjob overview for magento2 backend
Stars: ✭ 35 (+52.17%)
Mutual labels:  magento2, magento2-extension
magento2-extrafee
This module is used to add extra fee to order. Show added extrafee in order, invoice and creditmemo.
Stars: ✭ 41 (+78.26%)
Mutual labels:  magento2, magento2-extension
magento-2-security
Magento 2 Security extension FREE. Security extension gives store owners the ability to detect the IP addresses that are intentionally attacking their store at any given time. Therefore, they have timely measures to prevent this issue such as blocking those IP addresses or sending warning emails to store owners.
Stars: ✭ 40 (+73.91%)
Mutual labels:  magento2, magento2-extension
module-lazyload
magefan.com/magento-2-image-lazy-load-extension
Stars: ✭ 47 (+104.35%)
Mutual labels:  magento2, magento2-extension
elasticsuite-for-retailer
Smile ElasticSuite for Retailers - Magento2 toolkit for Retailers : Store Locator, Availability and Prices per store, etc...
Stars: ✭ 18 (-21.74%)
Mutual labels:  magento2, magento2-extension
magento2-checkout-success-misc-script
Add Miscellaneous HTML and JavaScript codes to Magento2 checkout conformation page
Stars: ✭ 26 (+13.04%)
Mutual labels:  magento2, magento2-extension
magento2-pimcore-bridge
Magento 2 module for Pimcore integration.
Stars: ✭ 28 (+21.74%)
Mutual labels:  magento2, magento2-extension
bestsellers-sorting-m2
Bestsellers sorting of products in categories for Magento 2
Stars: ✭ 24 (+4.35%)
Mutual labels:  magento2, magento2-extension
module-blog-comments-recaptcha
module-blog-comments-recaptcha
Stars: ✭ 17 (-26.09%)
Mutual labels:  magento2, magento2-extension
PagSeguro-Magento-Transparente-M2
Módulo PagSeguro para Magento 2
Stars: ✭ 15 (-34.78%)
Mutual labels:  magento2, magento2-extension
magento2-sample-imageuploader
A Magento 2 sample module demonstrating how to upload an image file within a grid and form UI Component.
Stars: ✭ 27 (+17.39%)
Mutual labels:  magento2, magento2-extension

Config Override Magento 2 Module

Build Status

A Magento 2 module that overrides default configuration from file which can be added to version control, inspired by this Magento 1.x extension: https://github.com/webgriffe/config-extension.

Installation

Add this extension as dependency using Composer:

composer require webgriffe/module-config-override
php bin/magento setup:upgrade

Config override

Magento configuration is driven by database. This, sometimes, is overkill and forces us to maintain upgrade script to keep Magento envorinment aligned with features development. So, this extension enables additional config source that loads several YAML files and overrides database configuration.

Loaded YAML files are (in this order):

  • app/etc/default.yml.dist: this intended to be under version control to distribute configuration for all environments.
  • app/etc/default.yml: this is intendet to be ignored by version control system to provide configuration related to local needs.

Also, if the MAGE_ENVIRONMENT environment variable is defined, then two additiontal files are loaded. For example, if the MAGE_ENVIRONMENT variable value is dev, the following two files are loaded:

  • app/etc/default-dev.yml.dist: as default.yml.dist, this is intended to be under version control to distribute configuration but only for the dev environment.
  • app/etc/default-dev.yml: as default.yml, this is intended to be ignored by version control to provide configuration related to local needs but only for the dev environment.

Configuration in YAML files must be specified with the same structure of Magento system configuration, for example:

web:
  secure:
    base_url: "http://my-project-url.dev/"
  unsecure:
    base_url: "http://my-project-url.dev/"

Only default configuration scope is overridden.

CLI notes

Please note that if you use the MAGE_ENVIRONMENT variable then it should be always set when Magento is running. So is not enough to set it through your webserver (for example with a SetEnv "dev" in Apache) but it should also be set into your command line shell. Otherwise, if you have the Magento's configuration cache enabled and you clear the cache from the command line, the MAGE_ENVIRONMENT will not be applied and you'll get unexpected behaviours.

Remember to "export" you env variable when you run a command via shell:

export MAGE_ENVIRONMENT=dev && <your command> 

alternative you can add the MAGE_ENVIRONMENT=dev in your shell configuration (ex. for bash):

file /home/<you user>/.bashrc:

....
....

MAGE_ENVIRONMENT=dev

Overridden config values are shown in backend

Overridden config values are shown in Magento's backend. Every config setting it's shown on its section. For example, if you have the following default.yml file:

design:
  head:
    default_title: Webgriffe Store
    title_suffix: - Webgriffe Store

When you'll go to Stores -> Configuration -> General -> Design you'll find the overridden config value shown and not editable.

Admin Screenshop

This feature improves a lot the usability of this extension.

To Do

  • Improve system config admin interface to support complex fields

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].