I have the Stock enabled for all products on my website, which shows the Only X Left right under In Stock on the Product Page. This is great and lets our customers know how many we currently have in stock. But as soon as the Quantity hits 0 or below, the Only X Left disappears.

I have been trying to get that message to stay visible but display the Negative Number. I have been adjusting the AbstractStockqty.php and default.phtml files within CatalogInventory in a custom module but no luck so far.

I would just let Magento switch the Product to Out of Stock but then our customers are unable to Add to Cart, which we want them to be able to do but just know that it may be a bit before we have the stock built again.

So I would really like the Only X Left to be visible at all times, regardless of positive or negative stock. Or we could get by with having Magento switch the product to Out of Stock, but we need the customers to still be able to order the product.

I kind of feel like this may be a bug that no one has really ever brought to Magento attention. Technically, I think the product should switch to say Out of Stock but still be able to place an order if you allow backorders.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.