Skip to content

magento man

Segmentation error when getting product from repository

I have a test script which should update products: use MagentoFrameworkAppBootstrap; require __DIR__ . ‘/app/bootstrap.php’; error_reporting(E_ERROR | E_PARSE); $bootstrap = Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->getObjectManager(); $state = $objectManager->get(‘MagentoFrameworkAppState’); $state->setAreaCode(‘adminhtml’); $productRepository = $objectManager->get(‘MagentoCatalogModelProductRepository’); $file = __DIR__.’/import.xlsx’; $inputFileType = PhpOfficePhpSpreadsheetIOFactory::identify($file); /** Create… Read More »Segmentation error when getting product from repository