ok lets see how bad i can break my site lol
here goes..............
ok lets see how bad i can break my site lol
here goes..............
well that started well cant even fine the right file to edit![]()
where is the file located???????
The original file is in:
/includes/templates/template_default/tpl_product_info_display.php
copy to your templates and overrides directory first:
/includes/templates/your_template_dir/tpl_product_info_display.php
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
Ok it works on the product info page. How do you get it to work on the product listing page. I tried everything.
I just want it to show the icons on the page the green, yellow, red icons. i want it to show between the price and more info button?
Can be seen here where i want to place it: http://dealz-r-us.com/index.php?main...ex&cPath=1_2_3
Thank you
You need to find the proper products_id ... on the product _info page it used:
(int)$_GET['products_id']
On the Listing, you need to locate the valid products_id for that page(s) ...
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!