2

About: Hiding and not counting out of stock in layered navigation in Magento

Hi, this has boggled us for quite a while. An I did not find a solution. We upgraded to Mage 1.8.1 hoping that it would be fixed.

  1. We have 19 shirts (configurable products)
  2. that sell in sizes 38, 39, 40 etc
  3. some of these shirts are not available in size 38 or 39
  4. so when a user clicks on the sizes filter in layered navigation it would show only shirts that have stock in that size

But what happens is

Problem A: the count of products per size is 19 everywhere. But this is not correct, some of the 19 shirts are only available in size 38 or 39

Problem B: When I click to filter on size 38, I would expect to see only shirts on the next page that actually are available in size 38

Now how could we solve this? is this a configuration something that I am missing? Show out o stock products yes/no, in attribute settings? or do I need to change this in the code?

Expected behavior would be: - count only products that actually have a size available - show only products that actually have a size available

a example http://i.snag.gy/kwhO2.jpg

Help appreciated!!

3
  • There is no 1.8.2 - I can offer 1.7.0.2 or 1.8.1 Commented Jan 21, 2014 at 9:29
  • ha ha ha right Magento Never launch 1.8.2
    – Keyul Shah
    Commented Jan 21, 2014 at 13:01
  • Are you looking for something outside the functionality of System > Configuration > (Catalog) Inventory > Stock Options > Display Out of Stock Products? Commented Jan 21, 2014 at 14:09

3 Answers 3

2

Answer is here I think

https://digicloud.zendesk.com/entries/22144483-Show-hide-out-of-stock-products-in-Magento

I think we were asking for too much ...

  1. we wanted to show out of stock products in the overview (but with out of stock notice)
  2. and when filtering that it did not count the out-of-stock products

But this is not how it works. It's either on or off

Solution: Setting this to "Show products that are out of stock" to NO seems to solve the issue


How to hide products on Magento store that are "Out of stock" or have a QTY of 0

Hide out of stock message is a configurable item.

Admin >> System >> Configuration >> Catalog >> Inventory >> Stock Options

Display Out of Stock product -> No

1

Yes, you can get Magento to do this, by tweaking the product attribute index so that the attribute (e.g. size) value (e.g. 37.5) is not stored against the configurable product if the simple product with that value is out of stock (e.g. size 37.5 is out of stock). By changing this index, the layered navigation will follow suit.

Full answer and code here: https://magento.stackexchange.com/a/154654/13636

1
  • awesome! this saved us hours of research!
    – Haim
    Commented Jan 25, 2017 at 22:24
0

You can also show out of stock items with special note, like "Available in 3 days" with ability to subscribe to "back in stock". May be you get some new customers this way.

1
  • 1
    I understand. But this does not work related to the original problem where out of stock products are shown in the layered navigation filter.
    – snh_nl
    Commented Jan 22, 2014 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.