Skip to content

magento man

Magento 2: “Array to string conversion” error when adding customer attribute via Data Patch

I’m new to Magento 2 and trying to add a customer attribute using a Data Patch. I created the following patch class: <?php namespace VendorModuleSetupPatchData; use MagentoFrameworkSetupPatchDataPatchInterface; use MagentoCustomerSetupCustomerSetupFactory; use MagentoCustomerModelCustomer; use MagentoEavModelEntityAttributeSetFactory as AttributeSetFactory; use MagentoFrameworkSetupModuleDataSetupInterface; class CreateQuickbooksInvoiceAttribute implements… Read More »Magento 2: “Array to string conversion” error when adding customer attribute via Data Patch

MSI enabled, but Magento_CatalogInventory observers still trigger (N+1 risk)

MSI enabled, but Magento_CatalogInventory observers still trigger (N+1 risk). Can we rely solely on MSI observers? Context We run with MSI enabled, yet Magento_CatalogInventory observers are still active: <!– From CatalogInventory –> <event name=”sales_quote_item_collection_products_after_load”> <observer name=”add_stock_items” instance=”MagentoCatalogInventoryObserverAddStockItemsObserver”/> </event> <event name=”sales_quote_item_qty_set_after”>… Read More »MSI enabled, but Magento_CatalogInventory observers still trigger (N+1 risk)