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!
$5, $10, $50 ... $500 ...
The Free Forums are, just that, Free ...
We do, however, always extend the offer to our users to consider the 1 time or Monthly Donations to help support both the software and the Free Forums ...
The more everyone supports us, the more we can support each and every one of you in keeping your Online Shops running and your incomes growing and growing and growing ... with the current release as well as future releases ...
Good luck with your shop!
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!
Hi what i want to do is add a 4th state as there are thing that i sell that i dont stock and order on demand. so what i was thinking is that if i have.
>1 is good(Green)
=1 is Low stock (yellow)
=0 is Out of stock (Red)
<0 is Pre order (Blue) or =-1 is Pre order
but if I try to put = in the code the page won't work i must be missing something but I don't know what.
can anyone help with this?
Either you have a code issue or you have space(s) or blank line(s) at the bottom of the file after the closing php bracket ?> and that will cause errors ...
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!
this is the code when i edited it but it don't seem to work aye clues?PHP Code:<?php
if (zen_get_products_stock((int)$_GET['products_id']) >1) {
$zc_stock_level_image = '' . "In Stock " . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_green.gif', '', 150, 80) . '';
}
elseif (zen_get_products_stock((int)$_GET['products_id']) =0) {
$zc_stock_level_image = '' . "out of Stock " . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_red.gif', '', 10, 10) . '';
}
elseif (zen_get_products_stock((int)$_GET['products_id']) =-1) {
$zc_stock_level_image = '' . "Pre order " . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_blue.gif', '', 10, 10) . '';
}
elseif (zen_get_products_stock((int)$_GET['products_id']) =1) {
$zc_stock_level_image = '' . "Low Stock " . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_yellow.gif', '', 10, 10) . '';
}
echo 'Stock level is ' . $zc_stock_level_image;
?>
You are using:
More or less that is setting something to be the value of somethingelseCode:if (something = somethingelse) {
Try using == instead of = and see if that doesn't fix things for you ...
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!
thats cracked it Thanks alot
You are most welcome ... Thanks for the update that this worked and glad that this helped get you back on track ...![]()
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!
The code works great! How can I show the dot without the number in stock. Just the image. I must be a little slow but I can't figure it out.