0

I'm trying to load a collection of simple products programmatically. However, for some reason, Magento is filtering out of stock products with

WHERE (IF(at_status.value_id > 0, at_status.value, at_status_default.value) = 1)

Even though I did not use addInStockFilterToCollection anywhere in the code! I tried setting Show Out of stock products both to true and false, and neither seemed to work..

What might be the reason?

1
  • Please post the actual code you use to summon the collection. I can test it out and see where the issue is. Commented Sep 1, 2016 at 14:56

1 Answer 1

1

status is not the stock status but the "Status" attribute (enabled or disabled). As soon as you add a store filter, only products enabled within this store are loaded

This question also might help you: Show Disabled products in collection

1
  • The products aren't disabled. I've tried to manually debug the query. It seems filtering by category seems to be the reason... Odd since the category is full of products..
    – Pat
    Commented Sep 1, 2016 at 15:15

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.