Reorder button doesn't show up when an item is out of stock. How can I make the code to ignore this condition and allow customer to reorder by excluding the out of stock item.
The "Reorder" button only appears on some orders in order history.
The method responsible for reordering is Mage_Sales_Model_Order::_canReorder(). The method _canReorder is called by Mage_Sales_Model_Order::canReorder(). This is actually called to see if you can reorder. Inside the canReorder() function:
if (!$ignoreSalable && !$product->isSalable()) {
return false;
}
"isSalable" checks product’s “status”, stock availability.
Right now, how the "reorder" button works is that, if an order history X has n items. if 1 item out of the n items is out-of-stock, the reorder button doesn't appear. I'm wondering how can I make the reorder button to always appear, so when a customer clicks on the reorder button, it will create the new shopping cart with the items that are available.
Can I just remove the "isSalable()" from this if statement?