Shane
Shane

Reputation: 1603

Magento Using all attributes within layered nav

I currently have a load of attributes already setup as text boxes - is there anyway I can get them appearing within the layered nav?

Any help would be much appreciated.

Regards

Shane

Upvotes: 1

Views: 810

Answers (2)

Shane
Shane

Reputation: 1603

Right for anybody else looking at this, I looked into going down the custom code route, but quickly back tracked...

I decieded to bit the bullet, delete my attributes and recreate them and import the products again.

Upvotes: 0

Joe Mastey
Joe Mastey

Reputation: 27109

Given what you are looking for, Magento does not support what you want by default. However, the Magento filter code is fairly well structured, so this is something that you could add at will. The relevant backend code that will need to be modified is in the Catalog/Model/Layer subdirectory. Specifically, you will need to edit Mage_Catalog_Model_Layer to accommodate your new code. Also, you'll need to add a class that implements Mage_Catalog_Model_Layer_Filter_Abstract, to handle the actual filtering code. Finally, you will need to make the options appear on the frontend, which (in my cursory examination) will require two major changes. Firstly, you'll need to change the backend to allow the admin to mark text fields as being filterable, after which you'll need to modify the frontend template to display the checkbox fields.

This is a really significant amount of work. If at all possible, I'd recommend avoiding this route as it will also probably cause you significant problems down the road.

Hope that helps!

Thanks, Joe

Upvotes: 1

Related Questions