简体   繁体   中英

How to hide products without stock from layered navigation

I have set all options in the Magento catalog configuration to hide out of stock products. This works fine, except for the layered navigation. I got a product attribute for the size of a product. So for example, I got 15 products with size 38 and 7 of them are out of stock. Still, in the layered navigation it says there are 15 products with size 38. Also when clicking the filter, all 15 products appear.

I found a lot of similar questions, only all are meant for Magento versions 1.3 and older (since it seems older Magento versions didn't had the option to hide out of stock products at all).

Could it be I missed a setting in the backend, on the attribute or stock configuration which causes this conflict?

Since I thought it was kind of a Magento bug, I also searched trough the core code of the layered navigation, but couldn't find a quick solution.

Anyone who can help me out?

Edit: Forgot to mention the products are configurable products. It looks like it only looks at the main product.

I know it's little bit of topic, but have you considered using SCP module? http://www.magentocommerce.com/magento-connect/simple-configurable-products.html

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