1 reply [Last post]
jawadams's picture
Offline
Joined: 11/20/2009
Juice: 30
Was this information Helpful?

Hi,

I was looking into a way to change products to Back order status but still allow orders.

Right now I am using the Out of Stock Notifier and that does not allow customers to purchase something that is out of stock.

What I would like is to have the products come up as "Back Order - Ships in 5-10 days" or something like that. This way they can still purchase them, but they know they will have to wait.

I have looked extensively and found nothing.

Please note my coding abilities are very basic:

I am comfortable copying and pasting coding into one of the template files and changing a few variables, but that's it.

Thanks in advance!

bhallnc's picture
Offline
Joined: 03/23/2009
Juice: 81
Re: Change product availability, back order, etc...

I do this with CCK Date Module. I have it set so that if there is no date in the CCK field, or if there is a date in the CCK field and it is before or equal to today's date, the product will show "in stock". If there is a date in the field and it is after today's date, the product is shown as "out of stock".

Here is our code, which is placed in node-product-page.tpl.php

<?php
  $instockdate
= substr($node->field_instock_date[0][value], 0, 10);
 
$todaydate = date("Y-m-d");
  if (
$instockdate <= $todaydate) {
    print
'<img class="ready-to-be-shipped"  src="/sites/default/files/ready.png" height="30" width="200" />';
  }
  else {
    print
'<div id="out-of-stock" class="clearfix">';
    print
$node->content['field_instock_date']['#children'];
    print
$node->content['field_stock_notes']['#children'];
    print
'</div>';
  }   
?>

It is a pretty simple solution for us and is all we really need.

Hope this helps.