tags:

views:

741

answers:

1

Basically, what I would like to do is have some attributes in the layered nav block show up only if a particular filter was set before. Here’s an example:

Customer goes into ‘rings’ category. There would be many different attributes displayed in the ‘shop by’ block, however I only want a few to be shown at this stage including: Material (white gold, yellow gold, silver etc.). If, and only if, the customer selected a material (specifically yellow or white gold), on the next page i would like there to be the ‘gold carat’ attribute available in this block. As it is at the moment ‘material’ and ‘gold carat’ are both shown in the layered nav which isn’t ideal.

Ive had a look at the code in app/design/frontend/default/default/template/catalog/layer but I can’t seem to get any inspiration.

Thanks for any help Jamie

A: 

Jamie - Unfortunately, as I'm sure you have discovered, Magento doesn't do this out-of-the-box. The layered navigation is built based upon the available attributes (that have been set as filterable nav) for the category listing you are viewing.

You would have to write a custom module to override the layered nav output. A place to start could be /app/code/core/Mage/Catalog/Block/Layer/Navigation.php. Good luck!

Prattski
Thanks for the response Prattski. I suppose writing a module will help me get to know Magento quicker anyway.Thanks again.
Jamie