Dynamic option creation

Missing product option values get created automatically, but only for the admin store

  • It is strongly recommended that, by default, the value for custom-configuration-dir is <magento-install-directory>/app/etc/configuration

  • As soon as a default configuration is copied, changed, extended, or modified and stored under the path specified in custom-configuration-dir, only this configuration takes effect and always overwrites the original configuration

  • The configuration handling is mainly based on the PHP framework Symfony, and therefore unexpected effects maid occur in different configuration constellations

    • Consequently, it is always recommended to test modified configurations concerning unwanted side effects

If it is desired to disable the dynamic option creation, override the default add-update (see techdivision/import-product library ), by adding the following example override snippet <custom-configuration-dir>/shortcuts.json and remove the eav_attribute related operations.

Override Snippet:
<custom-configuration-dir>/shortcuts.json
{
  "shortcuts": {
    "ce": {
      "catalog_product": {
        "add-update": [
          ...
          "general/eav_attribute/convert",
          "general/eav_attribute/add-update.options",
          "general/eav_attribute/add-update.option-values",
          "general/eav_attribute/add-update.swatch-values",
          ...
        ]
      }
    }
  }
}
Result configuration:
The overriding result should look like this:
{
  "shortcuts": {
    "ce": {
      "catalog_product": {
        "add-update": [
          "general/general/global-data",
          "general/general/move-files",
          "general/catalog_product/collect-data",
          "general/catalog_category/convert",
          "ce/catalog_category/sort",
          "ce/catalog_category/add-update",
          "ce/catalog_category/add-update.path",
          "ce/catalog_category/add-update.url-rewrite",
          "general/catalog_category/children-count",
          "general/catalog_product/validate",
          "ce/catalog_product/add-update",
          "ce/catalog_product/add-update.variants",
          "ce/catalog_product/add-update.bundles",
          "ce/catalog_product/add-update.links",
          "ce/catalog_product/add-update.grouped",
          "ce/catalog_product/add-update.media",
          "general/catalog_product/add-update.msi",
          "general/catalog_product/add-update.url-rewrites"
        ]
      }
    }
  }
}

It is not possible to create translations for stores other than the admin store.

If option values get created dynamically, the values from the additional_attributes column must always be correspond to the values of the admin store.