New answers tagged

2

I have same issue and its working with that, In my case its solved when i was set no from admin configuration under Google api "Enable Content Experiments" Configuration => Sales => Google API => Enable Content Experiments set no and save.


0

I once did it with an observer. First declare it in Namespace/ModuleName/etc/frontend/events.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="layout_load_before"> <observer name="...


0

What worked for us was: php bin/magento indexer:reindex php bin/magento cache:clean php bin/magento cache:flush


0

There must be some customization in list.phtml or corresponding block that maybe removing the products from the rendered product collection. The question is too broad for some specific answer.


1

You have to define the condition by choosing SKU under Product attribute and choose IS NOT and then select the product which you want to exclude it as shown in screenshot below If you don't find SKU option in the selection, then you might need to edit the SKU attribute in admin and allow promo rules for it to view here. However you can group the excluded ...


0

You can create your own block that override \Magento\Catalog\Block\Product\ListProduct And inside of that include the collection for Out of Stock Products protected function _getProductCollection() { ... some code here ... } Create a template in frontend dir : view/frontend/templates/module/mytemplate.phtml Call your block there with the ...


3

You can get current sort order using method getOrder() from class Magento\Catalog\Model\Product\ProductList\Toolbar Usage example: class YourClassName { protected $productListToolbar; // inject the Toolbar model here public function __construct(Magento\Catalog\Model\Product\ProductList\Toolbar $productListToolbar) { $this->...


0

You can use the below code in your template file for getting the URL with category only on the page you want. <?php $_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $cats = $_item->getCategoryIds(); if(count($cats) ){ if($cats[0]==2){ $firstCategoryId = $cats[1]; } ...


Top 50 recent answers are included