Module for attribute creation and maintenance by file instead of setup scripts or backend
The AttributeConfigurator enables you to centralize the versioning of your attributes in one XML File. Goal of this Module is to have one File to modify if you want to change Attributes and not search through a lot of Magento Update Scripts to find the latest change to your Attribute.
Work Draft. Currently nonworking.
Okay, it is working, but the part regarding the migration of Attributes is still a working draft. You may enable the Migration of Attributes in Adminhtml on your own risk. Generally, tampering with EAV Attribute Data is not without risk. We strongly recommend backing up your Database regularly and especially before using the Configurator!
- version: 0.1.0
- extension key: Aoe_AttributeConfigurator
- extension on GitHub
For an example XML, have a look at the attributes.xml in the /etc Directory of the extension. If you do not understand the settings we recommend a Blogpost from Ben Marks that explains basics for the eav_attribute Table Settings: Magento EAV Attribute Setup
Configuration is found at System/Configuration/Catalog/Catalog/Attribute Configurator, the Import Path is relative to the Magento 'var' Directory, e.g. importexport/product_attributes.xml
The Configurator itself is run by a shellskript: /shell/aoe_attribute_import.php - initially this was planned as being regularly checked when using the Backend but we felt the Shop Admin should be in Control when the File is checked. And with large Attribute Sets with a lot of Attributes the XML File can get quite large, so it is better to perform this action when the load is low.
Run it like this:
php aoe_attribute_import.php --runAll
Notice that the Extension does not change any Attributes that were added via Update Scripts or Third Party Extensions for your own safety. Attributes maintained by the Configurator are marked with a is_maintained_by_configurator - Flag.
- PHP >= 5.4.0
- Magento >= 1.7
Use the included modman manifest to integrate into your project. If you want to manually copy the files, use the directory structure provided at /src.
- Remove all extension files from your Magento installation
- Drop the 'is_maintained_by_configurator' Column in the 'eav_attribute' Table.
- Removing created Attributes depends on your Setup and will probably need manual action
- Change existing Attributes (type change also, but in some cases information loss is inevitable if source and target type are incompatible, i.e. text to integer)
- Clean up no longer needed Attributes
If you have any issues with this extension, open an issue on GitHub.
Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.
(c) 2014 Firegento
Rework 2015 Aoe