0

I need some help. I add new category with layered navigation and I have all product from my base on this page. How we can add new tab to layered navigation with some options like "free products" and "sale". I hope for your help!

0

maybe this answer will help someone.

I make plugin after function geFilters() in \Magento\Catalog\Model\Layer\FilterList.

And add to result array my filter like:

$result [] = $this->objectManager->create('MyModule\Block\Model\Layer\Filter\MyFilters', ['layer' => $this->layer]);

For the layer you need \Magento\Catalog\Model\Layer\Resolver object. And MyFilters file I make like Price.php in catalog-seach.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.