Search code examples
magentomagento-1.9

Magento related products disappears with item max qty in cart


In Magento we have set "Display Out of Stock Products" => "Yes"

On product pages, we have a "Related products" section (related.phml => if($this->getItems()->getSize()):)

However when Maximum Qty Allowed in Shopping Cart has been reached, the product disappears from the related products (as well as upsells).

Why is this and how can I display these products anyway?


Solution

  • Turns out is had nothing to do with the max_qty, but at any time, when a product is in the cart, it disappears from the related products or upsells.

    In the Related.php file, Mage::getSingleton('checkout/session')->getQuoteId() needs to be removed / commented out.