0

I am developing a custom module to add the custom filter in left layered navigation,currently we have custom product collection and want to add the filter in layered navigation with three option:

1.All Product
2.Available Item
3.Sold Items

On forum I got some useful link https://magento.stackexchange.com/a/103453/24878

and tried to add same as the described in this link but it seems this link is old and not working in current Magento version 2.3.4 .

If anyone work like this type of work please share me so I can implement in my code also.

Please share you ideas.

Thanks,

0

Can you use standard product attributes and then use standard filter capability?

If you have a yes/no select attributes on the products 'available_filter', 'sold_filter' then make these attributes to be filterable in the layered navigation.

Then set the attribute values as yes / no and the products will filter correctly without any additional code being required.

1
  • thanks for your suggestion .product collection is totally different, if I apply your solution then that's good for default collection but in my case it will not work. – akgola Sep 14 '20 at 7:03

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.