Why it's doing this:
The link / button graphic on the cart is disabled by default if the value of the hasError methods in checkout/cart.phtml template returns false:
<?php if(!$this->hasError()): ?> <ul class="checkout-types"> If this returns false all checkout methods are then suppressed from displaying on the cart page.
This error is triggered from the CatalogInventory module in the class Mage_CatalogInventory_Model_Stock_Item (~line 580) which explicitly sets the error if the item is not in stock.
Workaround:
So what's the workaround? You can set an observer to remove the item from the stock and place a message on the cart that some of the items were removed. To do so you will rewrite the method checkQuoteItemQty:
<?php class MyCompany_MyModule_Model_Stock_Item extends Mage_CatalogInventory_Model_Stock_Item { public function checkQuoteItemQty($qty, $summaryQty, $origQty = 0) { $helper = Mage::helper('cataloginventory'); $result = parent::checkQuoteItemQty($qty, $summaryQty, $origQty); //check for error and specifically for the flag that the item went out of stock if($result->getHasError() && $result->getItemUseOldQty()){ //remove the item from cart $this->subtractQty($qty); //set notification for the user Mage::getSingleton('checkout/session')->addError($helper->__('Some items have been removed from your cart as they were not available in the qty requested.')); } } } Disclaimer:
This suggested workaround is provided entirely top-of-mind and may have unforeseen consequences.
I suggest using this post as a guide of how the functionality flows so that you can make informed decisions about how to set up a proper workaround for your business and your set of rules that govern how you operate.