Magento: Set and store a global product filter

In Magento, how can layered navigation selection be kept when a new category is selected or a search is performed?

Full story:

We’re developing a store which sells Books and eBooks. When I am navigating the store I generally want to see all products. I also want to be able to view a category and only see the Books or the eBooks exclusively. That can be easily achieved with an attribute “Product Type” and Layered Navigation.

However, the problem is that if I select another category or perform a search, the current layered navigation filter is lost. I have to select the “Product Type” filter again.

What are my options if I want to keep the layered navigation across multiple requests?

Are there any suggestions on how to best organize my catalog if what I want can’t be easily achieved with layered navigation? Would two top level categories for Books and eBooks be a better solution? But then how could I select the “Romance” category and still see Books and eBooks?

Thanks!

One thought on “Magento: Set and store a global product filter”

  1. Layered Navigation is definitely the best way to achieve your requirement.

    Look at the URLs that are generated when you click an attribute value from the layered navigation block (it will something like your-category-path.html?color=6 where 6 is the attribute option ID). If you append those query params to your subsequent page loads that contain layered navigation blocks and product collections (e.g. category or search result listings), it will apply that filter.

Leave a Reply

Your email address will not be published. Required fields are marked *