Skip to content

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 Upgrade (2.4.3-p1 >> 2.4.4) Compilation Error

I am upgrading our current site from 2.4.3-p1 to 2.4.4. I had to apply multiple patches for upgrading. However, while running di:compile, its give me error as below MiBInterface “MagentoGraphQlHelperErrorExceptionMessageFormatterInterface” not found#0 /var/www/magento/vendor/composer/ClassLoader.php(571): include() #1 /var/www/magento/vendor/composer/ClassLoader.php(428): ComposerAutoloadincludeFile(‘/var/www/magent…’) #2 [internal function]:… Read More »Magento Upgrade (2.4.3-p1 >> 2.4.4) Compilation Error

Magento 2: Open Popup Modal on Button Click in Admin Grid

I’m using Magento 2.4, I have a column in sale_order_grid, in that column I have a button like: Vendor/Module/view/adminhtml/ui_component/sales_order_grid.xml <?xml version=”1.0″ encoding=”UTF-8″?> <listing xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <columns name=”sales_order_columns”> <actionsColumn name=”goflyy_order_id” class=”VendorModuleUiComponentListingColumnGoFlyyGetOrder”> <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item name=”bodyTmpl” xsi:type=”string”>ui/grid/cells/html</item> <!–… Read More »Magento 2: Open Popup Modal on Button Click in Admin Grid

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