I have turned on the feature in Magento that shows only x remaining when the stock is less than 5 which works fine.

However on products that are set to stock manage = no, it's showing there's only 0 left which isn't true as it's set to not stock manage.

I've found it's bringing it in because of this function $block->isMsgVisible() in module-catalog-inventory

When I look at that function it's simply doing the following

    public function isMsgVisible()
    return $this->getStockQty() > 0
        && $this->getStockQtyLeft() > 0
        && $this->getStockQtyLeft() <= $this->getThresholdQty();

Which doesn't take into consideration the fact it's set to stock manage = no.

How would I add in a check to see if it's stock manage = yes or no? I've tried a couple of things with no luck.

2 Answers 2


From the description and linked code snipped it seems that this case was not accounted for during the development.

I've created a ticket for MSI to verify this behavior in different setups, fix it, and cover with manual / automated tests: https://github.com/magento-engcom/msi/issues/2299

  • thanks @eugene I'll keep an eye on that ticket Jun 5, 2019 at 7:15

was you able to find the solution for this issue? In my case we have MSI enabled & for products set with Manage-stock as false, its always showing product is OOS on PDP

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.