well that started well cant even fine the right file to edit![]()
where is the file located???????
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!
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!
Ok you lost me here. It works for the product info page. wouldn't the same code you have here work on the product listing page? Am i correct in saying?
If so i'm just having a problem with putting the code in the page so it would show between the price and the more info button. Everything that i try does not work either it is on the top or it just does not show at all or the page goes blank. I just needed help on where the code would go.Code:<?php if (zen_get_products_stock((int)$_GET['products_id']) >1) { $zc_stock_level_image = '' . $products_quantity . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_green.gif', '', 10, 10) . ''; } elseif (zen_get_products_stock((int)$_GET['products_id']) <1) { $zc_stock_level_image = '' . $products_quantity . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_red.gif', '', 10, 10) . ''; } else { $zc_stock_level_image = '' . $products_quantity . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_yellow.gif', '', 10, 10) . ''; } echo 'I SEE ' . $zc_stock_level_image; ?>
I've tried to do the above and do what Mrs. Linda says, but i just can't get it. Wish i knew a little more of coding. Can someone tell me how to do this, what code would i use, and what page, and where i would place it.
I'm going nuts trying to figure this out for the last few days.
Thank you
If you are working on the Product Listing, you are most likely working with the:
/includes/modules/product_listing.php
and would reference the products_id with:
$listing->fields['products_id']
See if that works better 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!
I Kind of understand what your saying tell me if i have the code right here?
Do i have that correct?Code:<?php if (zen_get_products_stock((int)$listing->fields['products_id']) >1) { $zc_stock_level_image = '' . $products_quantity . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_green.gif', '', 10, 10) . ''; } elseif (zen_get_products_stock((int)$listing->fields['products_id']) <1) { $zc_stock_level_image = '' . $products_quantity . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_red.gif', '', 10, 10) . ''; } else { $zc_stock_level_image = '' . $products_quantity . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_yellow.gif', '', 10, 10) . ''; } echo 'I SEE ' . $zc_stock_level_image; ?>
Now my second question is this where in that file would i place the code?
You would need to change the code in your templates and overrides directory for the file:
/includes/modules/products_listing.php
and copy that to:
/includes/modules/your_template_dir/products_listing.php
and if you had, for example, the Product Qty showing and wanted the dot next to it you can use:
Otherwise, you can add that to any active field that you are using in the CASE statements ...PHP Code:case 'PRODUCT_LIST_QUANTITY':
$lc_align = 'right';
$lc_text = $listing->fields['products_quantity'];
if (zen_get_products_stock((int)$listing->fields['products_id']) >1) {
$zc_stock_level_image = '' . $products_quantity . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_green.gif', '', 10, 10) . '';
}
elseif (zen_get_products_stock((int)$listing->fields['products_id']) <1) {
$zc_stock_level_image = '' . $products_quantity . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_red.gif', '', 10, 10) . '';
}
else {
$zc_stock_level_image = '' . $products_quantity . zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_yellow.gif', '', 10, 10) . '';
}
$lc_text .= $zc_stock_level_image;
break;
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!