Is it possible to allow backordering on some products and not others?
As far as I can see from the code & admin, it's not.
I don't suppose there's a mod around for this is there?
Re: Is it possible to allow backordering on some products and not others?
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.
Re: Is it possible to allow backordering on some products and not others?
Excellent! Once I get the major functionality and look&feel, I'll give that a go.
Thank you.
Re: Is it possible to allow backordering on some products and not others?
Wow, this is very much what I'm looking for. Only problem is, if the quantity on hand is 0, it will allow that product to be added to cart for backorder, even if the maximum is set to 999 or some high number. Please can someone tell me if that is possible to fix that? (I need it so that even if the quantity on hand is 0, as long as the maximum is set to 999 it will not allow to be added to cart). Otherwise it's great, as long as the stock is over 0 it will not allow you to add to cart more than what's in stock. I need this badly, am willing to pay for a fix.
Re: Is it possible to allow backordering on some products and not others?
OK...I may have found a solution, in setting the "Units" field to 0. I'm not sure what that Units field was supposed to be used for?
Re: Is it possible to allow backordering on some products and not others?
Oops, I did not have the "allow checkout" switch turned on when trying out the aforementioned trick. I guess it doesn't work afterall, (still allows checkout when "units" field is set to 0) so I'm still in need of a solution.
Re: Is it possible to allow backordering on some products and not others?
In case anyone ever sees this and wants this function also, I did end of figuring out a manual solution to keeping certain "one of a kind" products with quantity 0 from being placed on backorder. Set the product to "call for price", I even customized the call for price text & image to read "out of stock/no longer available."