Simple Pre Order System

By | November 18, 2012

One of my long standing clients needed a solution that allows customer to purchase “out of stock” products, and writes a prominent message telling them that their order will be dispatched when the product is back in stock.

Customer came up with the idea of some sort of flag based on products_stock (which is the correct way to do things). But what happens when the product is back in stock – the flagged message would disappear.

I spent 10 minutes thinking on this and decided to utilise the order_status_history feature. Why not set up a new order_status called “Pre Order” and write a message here that shows which products in the order are out of stock. This message would automatically in the account_history and in the admin/orders pages.

I then set out to make the code as quickly as I could to test out the idea, and it seems to work very well whilst keeping code changes to an absolute minimum.

In the Shop Side (account_history_info)

This status happens automatically for any product with a quantity of zero or less in stock. This is done on a per product basis, so the message only lists those products in the order that are problematic for delivery. This message is also repeated in the “thank you for your purchase” email as well.

All in all, a nice little modification that allows the customer to see exactly why they might have a delay in receiving their items, and allows the shopowner to receive fewer emails from customers wondering why they have not yet received their order.

2 thoughts on “Simple Pre Order System

  1. Matt

    Neat mod Gary! Unfortunately, I don’t think I can wait any longer to get my hands on a copy of Die Hard With A Vengeance!

  2. Gary Post author

    Die Hard is very rare to get hold of these days 😉

Leave a Reply

Your email address will not be published.