As far as I know there is no built in option to allow you to flag some products as allowing back order and others not.
However, I have modded a cart to allow this. What I did was use the 'Product Qty Maximum' field. You normally set this field to state that there is a maximum quantity of the product that the customer is allowed to add to their basket. Trouble is, if you set it to 10 and you only have 6 in stock then the customer can still over order by 4 units. The mod I did was to change the way this worked so that if the 'Product Qty Maximum' field was set you could not order more than was in stock or more than the field was set to. To do this I had to change the zen_get_products_quantity_order_max() function which is in the includes/functions/functions_prices.php file. You have to change the function so that it says...
PHP Code:
function zen_get_products_quantity_order_max($product_id) {
global $db;
$the_products_quantity_order_max = $db->Execute("select products_id, products_quantity_order_max, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
$order_max = $the_products_quantity_order_max->fields['products_quantity_order_max'];
if ($order_max != 0)
$order_max = min ($order_max, $the_products_quantity_order_max->fields['products_quantity']);
return $order_max;
}
Note that includes/functions/functions_prices.php is a core file and cannot be overridden so make a backup of it before changing it and be careful.
When that change has been made, to prevent backorder of a product set the 'Product Qty Maximum' field on the product to 999 or some other high number. Or you could set it to 1 if you only want the product to be ordered 1 at a time etc.
It is a bit of a hack but it works. There may well be a more elegant solution out there.
Regards,
Christian.
Bookmarks