
Originally Posted by
DrByte
I'm not convinced that it's not your addon.
But if you've not set the out-of-stock product-status to 0 then it's not going to work either.
You can see that the code in a clean install of Zen Cart properly sets the product status to 0 by looking for this in the order.php class file:
Code:
if (SHOW_PRODUCTS_SOLD_OUT == '0') {
I am just looking at the code you said about, I have the follwoing:
PHP Code:
if ($stock_left <= 0) {
// only set status to off when not displaying sold out
if (SHOW_PRODUCTS_SOLD_OUT == '0') {
$db->Execute("update " . TABLE_PRODUCTS . " set products_status = 0 where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");
So does this database queery only take place when a product is checked out and stock then reaches 0? If so the option works differently to how i imagined, I thought that if you set the option to turn product status to 0 if out of stock it would just not show any products with stock less that 0 in the prduct listings???
Is there a way to do what I need it to do? so effectively hide all product_id's where their stock level is less than 0???
I really really dont want out of stock products showing