Skip to content

php-7

Auto Added by WPeMatico

Magento 2 is giving me Fatal error: Allowed memory size of 1073741824 bytes exhausted when i am trying to save product

I am getting following errros Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 73400328 bytes) in public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228 Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are… Read More »Magento 2 is giving me Fatal error: Allowed memory size of 1073741824 bytes exhausted when i am trying to save product

How to filter product with salable filter in magento2

In magento 1 , $products = Mage::getModel(‘catalog/product’)->getCollection(); $products->addAttributeToFilter(‘status’, 1); // enabled $products->addAttributeToFilter(‘type_id’, ‘simple’); //$products->addAttributeToFilter(‘sku’, array(‘1234’)); //for testing purposes $products->addAttributeToSelect(‘*’); Mage::getSingleton(‘catalog/product_status’)->addSaleableFilterToCollection($products); Mage::getSingleton(‘cataloginventory/stock’)->addInStockFilterToCollection($products); $prodIds = $products->getAllIds(); I need to filter product collection with Is_salable() filter in magento2 Mage::getSingleton(‘catalog/product_status’)->addSaleableFilterToCollection($products); Mage::getSingleton(‘cataloginventory/stock’)->addInStockFilterToCollection($products); How to do… Read More »How to filter product with salable filter in magento2

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

Magento 2 community edition

What are the key differences between Magento 2 Community Edition and Magento 2 Enterprise Edition, and which one is the best fit for your business needs?