简体   繁体   中英

Magento: How to filter current category by another category - layered navigation

I have a Magento (1.7.0.2) installation with some products inside. I have two sibling categories (Brand and Clothes). Brand contains all the brands of the clothes, and clothes have multiple subcategories (shoes, pants, etc.) I am using layered navigation. When opening a category (lets say "shoes"), I display a list of the brands in the layered navigatin (I wrote some custom code for this).

Here is the problem: When I click on a brand, I want magento to filter the products by both categories and display matching results. Since Magento's default functionality is to just display items from the last category clicked, I need to change this.

Does anyone have any ideas how ?

You need to define attributes for that and you don't need to write custom code for that at all. So it would work for you like double structure there where you add a actual matching attribute and a shadow category for that matching attribute.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM