Skip to content

magento2.4

Auto Added by WPeMatico

getFirstItem is not working on collection while getData returns an array

getFirstItem is not working on a collection while getData returns a row. $product_obj = $objectManager->create(‘MagentoCatalogModelProduct’); $productCollection = $product_obj->getCollection()->addAttributeToFilter(‘erp_vc_item_code’,$value->getVcItemCode()); print_r($productCollection->getSize()); // Prints 1 print_r($productCollection->getData()); // Prints an array print_r($productCollection->getFirstItem()->getData()); // Does not prints anything print_r($productCollection->getFirstItem()->getSku()); // Does not prints anything Output… Read More »getFirstItem is not working on collection while getData returns an array

magento-patches: Permission denied

Magento 2.4.3 Installed quality-patches via composer require magento/quality-patches Trying to apply a patch via ./vendor/bin/magento-patches apply MDVA-40311 Getting error: ./vendor/bin/magento-patches: line 14: /xxxxxxxx/vendor/magento/magento-cloud-patches/bin/magento-patches: Permission denied p.s. ./bin/magento works no problem