Friday, October 28, 2011

How To Truly Allow Backorders on Magento

Despite the easypeasy button that says "allow backorders" on Magento's backend there are a couple problems when you do this.

1) For instance if the product says out of stock the checkout button won't show up. So here is a fix for that...
Around line 62 on view.phtml under app/design/frontend/base/default/template/catalog/product remove the if saleable lines surrounding this
                        <?php echo $this->getChildHtml('addtocart') ?>
                        <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
                            <span class="or"><?php echo $this->__('OR') ?></span>
                        <?php endif; ?>
2)  The next problem you will find is after clicking checkout there is a red box that pops at the top saying that the product is out of stock - stopping you from moving further to actually put the items in the cart. Here is the fix for that...
Under code/core/mage/cataloginventory/model/stock/item.php comment out the following items
 if (!$this->getIsInStock()) {
                ->setMessage(Mage::helper('cataloginventory')->__('This product is currently out of stock.'))
                ->setQuoteMessage(Mage::helper('cataloginventory')->__('Some of the products are currently out of stock'))
            return $result;
Thats all there is to it. You should now be able to check out products listed as out of stock.

1 comment:

  1. will this still notify customer ie, This product is not available in the requested quantity. # of the items will be backordered.


Related Posts Plugin for WordPress, Blogger...
Web Design & Marketing - Click and get an instant quote on your project