All Projects → webgriffe → config-extension

webgriffe / config-extension

Licence: other
Magento extension that improves config system

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to config-extension

magento-alsoviewed
Product recommendation module, based on other customers activities
Stars: ✭ 19 (-5%)
Mutual labels:  magento, magento-extension
nosto-magento
Magento extension for Nosto
Stars: ✭ 28 (+40%)
Mutual labels:  magento, magento-extension
Brazilian-Solutions
Este repositório permite a discussão da comunidade brasileira Magento sobre módulos e soluções para o mercado brasileiro.
Stars: ✭ 19 (-5%)
Mutual labels:  magento, magento-extension
module-wysiwyg-advanced
Extend TinyMCE 4 & 5 tools in Magento 2
Stars: ✭ 60 (+200%)
Mutual labels:  magento, magento-extension
magento-grid-colors
Magento 2 Grid Colors module for colorizing admin grids. Supports saving of states with the help of grid's bookmarks.
Stars: ✭ 54 (+170%)
Mutual labels:  magento, magento-extension
RemoveCustomerAccountLinks
Removes Customer Account Links in Magento
Stars: ✭ 50 (+150%)
Mutual labels:  magento, magento-extension
Magento
Mollie Payments for Magento 1.x
Stars: ✭ 37 (+85%)
Mutual labels:  magento, magento-extension
module-dsu-client
No description or website provided.
Stars: ✭ 17 (-15%)
Mutual labels:  magento, magento-extension
module-conflict-detector
magefan.com/magento2-conflict-detector
Stars: ✭ 40 (+100%)
Mutual labels:  magento, magento-extension
module-login-as-customer
Allows admin to login as a customer (enter to customer account).
Stars: ✭ 104 (+420%)
Mutual labels:  magento, magento-extension
module-notifications
Notify the Magento 2 admin user about disabled caches or new customer reviews.
Stars: ✭ 20 (+0%)
Mutual labels:  magento, magento-extension
module-catalog
Fixes for some known Magento 2 issues in Catalog
Stars: ✭ 23 (+15%)
Mutual labels:  magento, magento-extension
SomethingDigital AjaxAddToCart
No description or website provided.
Stars: ✭ 19 (-5%)
Mutual labels:  magento, magento-extension
module-blog-comments-recaptcha
module-blog-comments-recaptcha
Stars: ✭ 17 (-15%)
Mutual labels:  magento, magento-extension
module-dsu
No description or website provided.
Stars: ✭ 18 (-10%)
Mutual labels:  magento, magento-extension
magento-meanbee-pwa
Progressive Web App extension for Magento 1
Stars: ✭ 75 (+275%)
Mutual labels:  magento, magento-extension
module-blog-m22
Fixes for Blog on Magento 2.2.x
Stars: ✭ 21 (+5%)
Mutual labels:  magento, magento-extension
magento2
For any issues or questions please get in touch with us via [email protected]
Stars: ✭ 15 (-25%)
Mutual labels:  magento, magento-extension
dotmailer-magento-extension
The official Engagement Cloud for Magento extension
Stars: ✭ 14 (-30%)
Mutual labels:  magento, magento-extension
module-blog-sample-data
Sample data for Magento 2 blog extension
Stars: ✭ 15 (-25%)
Mutual labels:  magento, magento-extension

Webgriffe Config

Build Status

Magento 1.x extension that improves config system.

Indeed, Magento configuration is driven by database. This, sometimes, is overkill and forces us to maintain upgrade scripts to keep Magento envorinment aligned with features development.

Installation

To use the version greater or equal than 3.* of this extension you need to have the Magento core itself managed by Composer using the Aydin Hassan's magento-core-composer-installer and a magento-core package like the Bragento's magento/core.

Indeed the version greater or equal than 3.* of this extension uses the Cameron Eagans's composer-patches to apply a patch to the Mage_Core_Model_Config to allow configuration override.

If not already installed, add to your project the Magento Composer Installer, and then add the webgriffe/config-extension and the cweagans/composer-patches packages to your dependencies:

composer require --no-update webgriffe/config-extension
composer require --no-update cweagans/composer-patches

Then you need to add an extra configuration to your composer.json file with the patch configuration:

"extra": {
    "patches": {
        "magento/core": {
            "Config model patch to allow override": "https://raw.githubusercontent.com/webgriffe/config-extension/master/config-model.patch"
        }
    },
    "composer-exit-on-patch-failure": true
}

If you have a different package as Magento core you have to use its name in the patches section.

Moreover you have to remove the magento/core package from the filesystem so the package is re-installed and then patched.

rm -rf vendor/magento/core

Finally, you can install the extension:

composer update webgriffe/config-extension cweagans/composer-patches

Composer should output something like the following during the installation:

- Applying patches for magento/core
vendor/webgriffe/config-extension/config-model.patch (Config model patch to allow override)
- MagentoCoreInstaller: Installing: "magento/core" version: "1.9.3.7" to: "magento"

Now you should have the extension succesfully installed and the Mage_Core_Model_Config patched, look at the app/code/core/Mage/Core/Model/Config.php to confirm that it's patched (you should see a patch comment on the class heading).

If you cannot manage the Magento core with Composer you have to use the version 2.* of this extension but you'll miss the latest features and the installation steps are different and are described on the README.md of the 2.x branch.

Config override

So, this extension enables additional config file that overrides database configuration. The file must be at path app/etc/config-override.xml.dist. For example:

<?xml version="1.0"?>
<config>
	<default>
    	<general>
        	<locale>
            	<code>en_US</code>
            </locale>
	    </general>
    </default>
    <stores>
    	<it_it>	    			
			<general>
        		<locale>
    	        	<code>it_IT</code>
	            </locale>
    	    </general>
    	</it_it>
    </stores>
</config>

The extension tries also to load the non-dist file at app/etc/config-override.xml which, if present, extends the app/etc/config-override.xml.dist. In this way you can put the app/etc/config-override.xml.dist file under version control to share that configuration with others but ignore the app/etc/config-override.xml to have it only on your machine.

Environment specific config

You can set different config based on current environment by defining several environment config files that must be placed in app/etc and must be named with the pattern config-override-{env}.xml.dist where {env} is the current environment (for example config-override-dev.xml for dev environment or config-override-prod.xml.dist for prod environment). Environment specific config ovverrides app/etc/config-override.xml.dist config explained above. To specify the current environment you must set the environment variable MAGE_ENVIRONMENT. For example in Apache virtual host configuration or in the .htaccessfile you can do:

SetEnv MAGE_ENVIRONMENT "dev"

Even with environment specific configuration you can use dist and non-dist files. So you can have config-override-dev.xml.dist which can be extended by config-override-dev.xml.

EcomDev_PHPUnit local.xml.phpunit laoding

This extension also allows to load the local.xml.phpunit file of the EcomDev_PHPUnit testing module. To enable this feature the MAGE_LOAD_ECOMDEV_PHPUNIT_CONFIG environment variable must be set to 1. Then using a library like CgiHttpKernel you can do full acceptance (or functional testing) on a test-dedicated database (which is also used by other EcomDev_PHPUnit's tests). Have a look at Webgriffe's Functional Test Trait for more information.

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 config-override.xml file:

<?xml version="1.0"?>
<config>
	<default>
    	<design>
        	<package>
            	<name>my-package-name</name>
          </package>
	    </design>
    </default>
</config>

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

image

This feature improves a lot the usability of this extension.

To Do

  • Performance improvements
  • Interdependent fields handling
  • Password/encrypted fields handling
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].