Forums / Templates, Stylesheets, Page Layout / Negative Stock Levels

Negative Stock Levels

Locked

Started by aloharover on 13 Nov 2008, 4:08 AM · Views: 1,121

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
13 Nov 2008, 4:08 AM
#1
aloharover avatar

aloharover

New Zenner

Join Date:
Aug 2008
Posts:
14
Plugin Contributions:
0

Negative Stock Levels

I allow people to order items even when they are out of stock.

The problem I am having is that people do not seem to notice the - sign in front of numbers when the QTY is below zero.

"Well it shows you have 7 on hand why haven't your shipped"

"Sorry, but we have -7 on hand"

How can I change the font color on the qty to red when the qty<0?

I know its just going to be a simple line if php code

if(product_qty<)
{
//display red
}
else
{
//code as it is now
}

But I am not sure where to place it or the exact specifics

Thanks

13 Nov 2008, 4:58 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Negative Stock Levels

You would need to alter the tpl_product_info_display.php and catch the value of:
$products_quantity

The line reads something like:

  <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>'  : '') . "\n"; ?>

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!