Skip to content

magento2.4

Auto Added by WPeMatico

Is it necessary to extend MagentoFrameworkModelAbstractModel for all custom model classes in Magento 2?

Is it necessary to extend MagentoFrameworkModelAbstractModel for all custom model classes in Magento 2? I am working on a custom model that does not involve any database interactions (e.g., saving, loading, or deleting records), and I noticed that AbstractModel depends… Read More »Is it necessary to extend MagentoFrameworkModelAbstractModel for all custom model classes in Magento 2?

Fetching items’ stock status in one request

I am searching for a solution to fetch stock statuses for a list of products in a single request. Right now I am using API /rest/V1/stockStatuses/{sku}, but that would need a list of requests. Is there a better solution?

Call to a member function getCode() on null at /home/public_html/vendor/magento/module-store/App/Action/Plugin/Context.php:148

i am getting this error in exception.log main.CRITICAL: Error: Call to a member function getCode() on null in /home/uraircon/public_html/vendor/magento/module-store/App/Action/Plugin/Context.php:148 the concerned context.php is as below. As per log error is on line 148 which is $defaultStoreCode = $this->storeManager->getDefaultStoreView()->getCode(); in below… Read More »Call to a member function getCode() on null at /home/public_html/vendor/magento/module-store/App/Action/Plugin/Context.php:148