cancel
Showing results for 
Search instead for 
Did you mean: 

Pre-order code

Pre-order code

I have been playing around with the option of having some sort of pre-order facility within Magento. I have used the back order option that is already a part of Magento but have then written some code to display a message on the product page to show the item is pre order only.

 

I thought I would share this with others as I'm sure a few will find it helpful.

 

1. Within your selected product go to "Inventory" set 'Qty' to 0, set "Backorders" to Allow qty below zero and notify customer. Ensure stock availablity is set to IN STOCK, this will allow someone to purchase a product on pre-order.

2. Paste this code to your view.phtml within app/design/frontend/default/YOUR THEME/template/catalog/product 

put the code in your desired location. It will be best near to your order button so that it can be seen. 

 

<?php
$manageStock = $_product->getStockItem()->getManageStock();
$inventoryQuantity = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
	
if($inventoryQuantity <= 1): ?>
<?php
			
<strong><font color="red"><?php echo $this->__('PRE-ORDER - Our supplier(s) is waiting for shipments of this product. You can still order but we can not ship until stock arrives. You can e-mail us at YOUREMAIL@DOMAIN.COM for more information.') ?></font></strong>
<?php else:?>
<?php echo $this->__('') ?> <?php endif; ?>

 

This is a demo of what it will/can look like. Obviously edit how you wish.

 

 

Pre order demo

 

Your cart should also note that the item is on pre order/back order.

 

Pre order demo1

 

I'm sure my coding is quuite shoddy by most of your standards and I expect a few of you here could clean the code up, something I am welcoming of.

 

Enjoy

1 REPLY

Re: Pre-order code

Its very interesting. However can I differentiate pre-order in the admin order list page? For example, if a customer orders and pays for what he is not going to get immediately then how to handle the payment process?

 

I think there needs to be a extension that handles this.