I have a map and the products displayed on the list page. Each product has a text attribute to fill pin code.

My question is how can I filter the products by pin code? enter image description here

on selecting the location in the text box, it has to search the products which match the location pin code.

note: I can't keep the drop-down or multiple for the pin code attribute because I can't add all the pin codes over the country in the options.

Now i need something like this

$collection->addAttributeToFilter('pincode', array('like' => '%560102%')); 

but I don't know where to add this code, I need layered navigation filter too

1 Answer 1


You will need to change the properties on your custom attribute to show on the filtered navigation.

To access your attribute use this path at the image below using your admin panel.

enter image description here

So, change the configurations like that.

enter image description here

  • Thanks for taking your time to solve my issue... please have a look at my question, i have updated it.
    – Girish
    May 6, 2017 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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