Добрый вечер! Сегодня через Magento'вский модуль "переконвертировал" плагин, но при попытки завести его, получаю такую ошибку:
# php bin/magento setup:upgrade
[Magento\Framework\Exception\LocalizedException]
Invalid XML in file <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/conf
ig.xsd">
<default>
<accounting>
<config>
<api_key/>
<private_key/>
<shop_id>shp1</shop_id>
<list_size>100</list_size>
<order_max_sync_count>10</order_max_sync_count>
<order_status_name_check>complete</order_status_name_check>
<order_writeoff>1</order_writeoff>
<order_sync_from>2015-01-01 00:00:00</order_sync_from>
<max_requests_to_api_per_session>100</max_requests_to_api_per_session>
<enable_quantity_sync>1</enable_quantity_sync>
<invoice_product_name_mask>{name}</invoice_product_name_mask>
<latest_product_sync_date>2000-01-01 00:00:00</latest_product_sync_date>
<latest_product_quantity_sync_date>2000-01-01 00:00:00</latest_product_quantity_sync_date>
<initial_product_sync_done>0</initial_product_sync_done>
<initial_order_sync_done>0</initial_order_sync_done>
</config>
<cron>
<sync_all_products>0 6 * * 6</sync_all_products>
<sync_updated_products>5 */6 * * *</sync_updated_products>
<sync_all_product_quantities>0 6 * * 1,3,5,0</sync_all_product_quantities>
<sync_updated_product_quantities>0 */3 * * *</sync_updated_product_quantities>
<sync_orders>*/1 * * * *</sync_orders>
<reset_stuck_orders>*/30 * * * *</reset_stuck_orders>
</cron>
</accounting>
</default>
</config>
:
Element 'api_key': This element is not expected. Expected is one of ( default, stores, websites ).
Line: 6
Пробовал изменить название тега <config> (config > default > accounting > config), проверка проходит, но тогда возникает ошибка уже в другом плагине:
php bin/magento setup:upgrade
[Magento\Framework\Exception\LocalizedException]
Invalid XML in file <?xml version="1.0"?>
<config>
<modules>
<B1_Catalog>
<version>0.1.0</version>
</B1_Catalog>
</modules>
<global>
<models>
<b1_catalog>
<class>B1_Catalog_Model</class>
</b1_catalog>
<catalog>
<rewrite>
<product>B1_Catalog_Model_Product</product>
</rewrite>
</catalog>
<catalog_resource>
<rewrite>
<product>B1_Catalog_Model_Resource_Product</product>
</rewrite>
</catalog_resource>
</models>
</global>
</config>:
Element 'modules': This element is not expected. Expected is one of ( default, stores, websites ).
Line: 3 И т. д. Я впервые имею дело с magento, не подскажете с чем могут быть проблемы?
Загляните в файл по дефолту \vendor\magento\module-store\etc\config.xml. Также стоит просмотреть документацию. Более конкретно не скажу, но на первый взгляд явное отличие у вас с тем, что по дефолту.