Skip to main content
4 votes

How to Show Category Filter In Sidebar Magento2

Set your "Study Guides" category as no-anchor and set the anchor to subcategories of "Study Guides" which you want to display in the filter.
kunj's user avatar
  • 3,699
3 votes

I need to get product collection by filter multiple category ids in magento 2

You can add the other attribute filter. I just check multiple category filter. It is working, I just Created object again after loading model collection. $productcollection = $obj->create('Magento\...
Shekhar Suman's user avatar
2 votes

I need to get product collection by filter multiple category ids in magento 2

protected $_productCollectionFactory; public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $...
Saphal Jha's user avatar
  • 1,883
1 vote
Accepted

Magento 2 : Pass a variable to getChildBlock() in LayeredNavigation view.phtml

You can set value in $filter object and access in your labels.phtml. Add this code in your layer/view.phtml file : <?= $filter->setData('custom_variable','custom_value'); <div class="filter-...
Rohan Hapani's user avatar
  • 17.5k
1 vote
Accepted

I need to get product collection by filter multiple category ids in magento 2

Actually you pass the category ids array in addCategoriesFilter(['in' => $cat_ids]) that's why the error occur. Just Replace my code with your's $cat_ids = "2,3,5"; $productcollection = $...
Muhammad Hasham's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible