Download the PHP package ctidigital/magento-configurator without Composer
On this page you can find all versions of the php package ctidigital/magento-configurator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package magento-configurator
Magento Configurator
A Magento module initially created by CTI Digital to create and maintain database variables using files. This module aims to bring the following benefits to a Magento developer's work flow:
- Install Magento from scratch with important database based configuration ready.
- Share and collaborate configuration with other colleagues using your own versioning system.
- Keep versions of your configurations using your own versioning system.
- Split your configuration based on the environment you're developing on.
If you're interested about finding out more about the background of the configurator, watch this lightning talk by Rick Steckles at Mage Titans in Manchester on YouTube.
Version
0.15.0
Installation
Using Modman
Traditionally
Download and copy the contents of the src/
folder into your Magento base directory.
How To Use
Firstly, we'll need to configure our components. You can find how to configure your component under the heading "Components".
In your magento directory you can run the configurator using:
List Available Components
Run Specific Components
Components
Websites & Stores
This is generally the first component that should be configured when starting a project. This is used to create and maintain your websites, stores and store views and is controlled using a YAML which will require to be located in app/etc/components/websites.yaml
. The general structure follows:
The YAML follows a tree structure which supports the following rules:
- Many websites can be created
- A website can have many store groups
- A store group branch can have many store views
Sort orders will automatically be created based on the order the YAML is written.
Core Config Data
After your websites have been correctly set up this is required to set up the core configuration elements for default (global), website level, and store view level. The end nodes require a path
and a value
which will be set in your Magento's core_config_data
. If you don't know what the path should be, you can find it out by looking at the module's system.xml file or save a page with the configuration from within Magento's admin followed by saving the relevant section in System->Configuration and looking it up within your database's core_config_data
table. The file will require to be in
app/etc/components/config.yaml
. You can also find our config.yaml
file as an example on how to structure the file.
Default
Inheritables
Sometimes we need to group configurations for use in many but not all websites or store views so in order to keep our YAML structure neat and tidy there is also support for grouped configurations. For example, some websites might share the same PayPal payment configuration.
Websites
Should we require website specific configurations this can be defined as so:
We can also inherit our group configurations using the inherit key as so:
Stores
Similarly to websites, we can define store view level configuration which also has inheritance support as so:
Encrypted Values
Some core magento fields also encrypts our configuration so we can define this as so:
Product Attributes
The file that is used to maintain product attributes can be found in app/etc/components/attributes.yaml
. This allows you to modify your custom attributes as well as maintain the attribute options using this file.
Here is a basic required structure for an attribute
Here is the basic structure of a typical attribute with its default values:
We can also specify product options for select type attributes as so:
We can also specify store labels for attributes as so:
Please note, certain attribute configurations follow certain rules so do ensure you're familiar with how Magento product attributes work in order to make best use of this component. An attribute's configuration elements are simply fields in the catalog_eav_attribute
table with a few exceptions.
Attribute Sets
Having created out custom product attributes these will need to be included as part of an attribute set. For this we will require the file app/etc/components/attribute-sets.yaml
and the contents of the file will follow as so:
Using will use an existing attribute set as a skeleton for your new attribute sets. By default, it will inherit attribute set named which must already exists in your Magento install.
Please use our sample file as an example.
Other Components
There are many other components to help populate Magento which you can view from . These can help you bootstrap your Magneto install with relevant sample/configuration data.
Limitations
- Cannot move attributes between attribute groups.
- Cannot remove existing attributes from attribute sets.
Development
Want to contribute? Great! We've tried to structure the module to make it extendable so should you wish to contribute then it should be fairly easy. There are a few rules you have to follow though.
Config.xml
Firstly, within app/code/community/Cti/Configurator/etc/config.xml
you will find the following xml:
Here you can define any components you wish to contribute. Should you wish to extend to create your own component within your own module, you can do so by adding your own component helper alias within your own module's config.xml
.
Component Helper
You'll need to create a helper class within the module, preferably in a Components subfolder and it should extend Cti_Configurator_Helper_Components_Abstract
which will require you to:
- Specify a unique component name for logging processes and event dispatches
$this->_componentName
. - Specify the file you wish to process by assigning an absolute path to the variable
$this->_filePath1
. - (optional) Specify
$this->_filePath2
as a way of splitting your configuration between environments. - Create a protected
_processFile()
function to parse your file(s) (and merge) into a format of your choice. - Create a protected
_processComponent()
function to process the data you've acquired from the file you've processed.
The abstract function should handle the rest. You can look at our Helper/Components/Website.php
and Helper/Components/Config.php
as a guide to how you should structure your component helper.
Roadmap
- Create a component for Admin Users & Roles
- Better CLI Logging
- Write Tests
License
MIT