Very slow Product collection load

I have a custom product collection that takes about 120 sec to load. How can I fix this? I’m posting the functions related to collection (not the whole module code): Mymodule/Block/Products/Category.php /* ….. */ public function getProductCollection($category) { $collection = $this->_productCollectionFactory->create(); $collection->setVisibility($this->_catalogProductVisibility->getVisibleInCatalogIds()); if($category->getId()){ if ($category->hasChildren()) { $categoryFilter = explode(‘,’,$category->getAllChildren()); } else { $categoryFilter = $category->getId();…

How to overwrite a payment method js renderer component?

Note: I know about this answer and it is good, but my question is about JS error when overwriting a renderer using my way. I’ve created a map for standard Magento offline payment method renderer: app/code/MageWorx/Checkout/view/frontend/requirejs-config.js var config = { map: { ‘*’: { ‘Magento_OfflinePayments/js/view/payment/method-renderer/purchaseorder-method’: ‘MageWorx_Checkout/js/view/payment/method-renderer/purchaseorder-method’ } } }; and here the my component in…

Facebook Share Issue

In our website , We are using Facebook share code as follows. I tried multiple ways of calling Facebook share URL. <a href=”fb://post=<?php echo urlencode($_product->getProductUrl());?>” class=”small-screen” title=”Share on facebook” class=”large-screen”></a> <a href=”fb://faceweb/f?href=<?php echo urlencode($_product->getProductUrl());?>” class=”small-screen” title=”Share on facebook” class=”large-screen”></a> <a href=”fb-messenger://sharer/sharer.php?u=<?php echo urlencode($_product->getProductUrl());?>” class=”small-screen” title=”Share on facebook” class=”large-screen”></a> <a href=”fb://page/<?php echo urlencode($_product->getProductUrl());?>” class=”small-screen” title=”Share on…

Need to remove collapsible for coupon code at cart page in magento 2

In the cart page, I need to display a simple input box and Apply button for the coupon section. For this, I need to remove the collapsible element. We need to work around <div class=”block discount” id=”block-discount” data-mage-init='{“collapsible”:{“openedState”: “active”, “active”: true, “saveState”: false}}’> <div class=”title” data-role=”title”> <strong id=”block-discount-heading” role=”heading” aria-level=”2″><?php echo __(‘Discount Codes’) ?></strong> </div>…