2
Jak ustawić wartości konfiguracji w Magento 2?
Wcześniej (czyli w Magento 1) stworzyliśmy moduł o nazwie Setup, który zawierał ustawienia dla strony. Skrypty aktualizacji wyglądają mniej więcej tak: $installer = $this; $installer->startSetup(); $installer->setConfigData("fastsimpleimport/general/partial_indexing", 1); $installer->setConfigData("fastsimpleimport/product/disable_preprocess_images", 1); $installer->setConfigData('general/country/default', 'GB'); $installer->setConfigData('general/locale/firstday', 1); $installer->setConfigData('general/locale/timezone', 'Europe/London'); $installer->setConfigData('general/store_information/merchant_country', 'GB'); $installer->setConfigData('design/header/welcome', 'Enter your value'); $installer->setConfigData('design/head/title_suffix', 'Enter your value'); $installer->setConfigData('currency/options/base', 'GBP'); $installer->setConfigData('currency/options/default', 'GBP'); // …