In this post we will see how to get layered navigation filters by category id programmatically anywhere you want.

Using this script you will be able to get :

1. Attribute code like Color
2. Attribute options or label like Black, Blue, Red
3. Options value like 20,27,28 (value for above Black, Blue, Red)

So we will make a php file in our root directory for this. Like magento/getLayerdByCat.php

So you can access values from $data and display if you want to. May be you can return it like return echo json_encode($data) .

I hope it helps.

Be kind to one another. Take care!

Tags:
No Comments

Post A Comment