Skip to content

magento2.4.2

Auto Added by WPeMatico

Product Filter Count Showing Wrong Count After Custom Product Collection – Magento Layered Navigation

I have applied custom filter on product collection to hide certain products from listing page. I have used below event for same <event name=”catalog_product_collection_load_after”> <observer name=”abc_productrestriction_collectionfilter” instance=”AbcProductRestrictionObserverFrontendCatalogCollectionFilter” /> </event> and in the observer, I am removing the product from collection… Read More »Product Filter Count Showing Wrong Count After Custom Product Collection – Magento Layered Navigation

Magento2 getSelect Printing Query without any __string

I have no idea why my getSelect printing query without echo & __toString. public function loadOrdersCollection($orders): mixed { $pac_orders = array(); $orderCollection = $this->orderCollection->create()->addFieldToFilter(‘increment_id’, $orders, ‘in’); $paymentMethods = explode(‘,’, $this->getPaymentMethods()); /* join with payment table */ $joinQuery = $orderCollection->getSelect() ->join([“sales_order_payment”],… Read More »Magento2 getSelect Printing Query without any __string

Magento 2.4.2 admin category URL redirect admin dashboard

Admin category URL link redirect admin dashboard issue how to fix this issue Current URL: Category https://test.cm/mv2/admin/catalog/category/edit/id/12/key/a7294ff98a7d8ff0eb16dbf92bd5ffae4da9620da389376dff80aa82e4d42b60/ Real category URL https://test.com/mv2/admin/catalog/category/edit/key/30dcd45cded283314a2410b81138a716658363d538381032f0bb16e3f66d14d0/id/12/ public function getCategoryEditUrl() { $category=$this->_registry->registry(‘current_category’); return $this->backendUrl->getUrl(‘catalog/category/edit’, [‘id’ => $category->getId()]); } above code get https://test.cm/mv2/admin/catalog/category/edit/id/12/key/a7294ff98a7d8ff0eb16dbf92bd5ffae4da9620da389376dff80aa82e4d42b60/ this URL but real… Read More »Magento 2.4.2 admin category URL redirect admin dashboard