What we import

The following sections discuss in detail what data we import.

System configuration

Commerce directly uses values in the system array in the config.php or env.php files instead of importing them into the database because they require some pre- and post-processing actions.

For example, the value of the configuration path web/secure/base_url must be validated with backend models.

Backend models

Backend models are the mechanism for processing changes in system configuration.
You define backend modules in <module_name>/adminhtml/system.xml.

All backend models must extend the Magento\Framework\App\Config\Value class.

When we import backend models, we do not save the configuration values.

Websites, stores, and store groups configuration

We import the following types of configurations.
(These configurations are under the scopes array in config.php.)

  • websites: websites related configuration
  • groups: stores related configuration
  • stores: store views related configuration

The preceding configurations can be imported in the following modes:

  • create: config.php contains new entities (websites, groups, stores) that are absent in the production environment
  • update: config.php contains entities (websites, groups, stores) that are different from the production environment
  • delete: config.php does not contain entities (websites, groups, stores) that are present on production environment
INFO
We do not import the root category associated with stores. You must associate a root category with a store using the Commerce Admin.

Theme configuration

Theme configuration includes all themes registered in your Commerce system; the data comes directly from the theme database table. (Theme configuration is in the themes array in config.php.)

Structure of theme data

The key of array is full theme path: area + theme path

For example, frontend/Magento/luma.
frontend is area and Magento/luma is theme path.

The value of array is data about theme: code, title, path, parent id

Full example:

'frontend/Magento/luma' =>
   array (
      'parent_id' => 'Magento/blank',
      'theme_path' => 'Magento/luma',
      'theme_title' => 'Magento Luma',
      'is_featured' => '0',
      'area' => 'frontend',
      'type' => '0',
      'code' => 'Magento/luma',
),
INFO
  • Theme registration. If a theme data is defined in config.php but the theme’s source code is not present in the file system, the theme is ignored (that is, not registered).
  • Theme removal. If a theme is not present in config.php but the source code is present on the file system, the theme is not removed.
Previous pageExport settings
Next pageDeployment strategies

Commerce