Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 33
  1. #11
    Join Date
    Sep 2006
    Location
    United Kingdom
    Posts
    195
    Plugin Contributions
    0

    Default Re: traffic light stock level indicator

    well that started well cant even fine the right file to edit
    where is the file located???????

  2. #12
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: traffic light stock level indicator

    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!

  3. #13
    Join Date
    Apr 2005
    Posts
    298
    Plugin Contributions
    0

    Default Re: traffic light stock level indicator

    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

  4. #14
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: traffic light stock level indicator

    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!

  5. #15
    Join Date
    Apr 2005
    Posts
    298
    Plugin Contributions
    0

    Default Re: traffic light stock level indicator

    Quote Originally Posted by Ajeh View Post
    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) ...
    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?
    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; 
    ?> 
    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.

  6. #16
    Join Date
    Apr 2005
    Posts
    298
    Plugin Contributions
    0

    help question Re: traffic light stock level indicator

    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

  7. #17
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: traffic light stock level indicator

    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!

  8. #18
    Join Date
    Apr 2005
    Posts
    298
    Plugin Contributions
    0

    Default Re: traffic light stock level indicator

    Quote Originally Posted by Ajeh View Post
    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 ...
    I Kind of understand what your saying tell me if i have the code right here?

    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; 
    ?> 
    Do i have that correct?

    Now my second question is this where in that file would i place the code?
    [FONT=Comic Sans MS]Don Scott
    http://dealz-r-us.com
    [/FONT]

  9. #19
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: traffic light stock level indicator

    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:
    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'''1010) . '';
    }

    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'''1010) . '';
    }

    else {
    $zc_stock_level_image '' $products_quantity zen_image(DIR_WS_TEMPLATE_ICONS 'icon_status_yellow.gif'''1010) . '';
    }
    $lc_text .= $zc_stock_level_image;

            break; 
    Otherwise, you can add that to any active field that you are using in the CASE statements ...
    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!

  10. #20
    Join Date
    Apr 2005
    Posts
    298
    Plugin Contributions
    0

    Default Re: traffic light stock level indicator

    Quote Originally Posted by Ajeh View Post
    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:
    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'''1010) . '';
    }

    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'''1010) . '';
    }

    else {
    $zc_stock_level_image '' $products_quantity zen_image(DIR_WS_TEMPLATE_ICONS 'icon_status_yellow.gif'''1010) . '';
    }
    $lc_text .= $zc_stock_level_image;

            break; 
    Otherwise, you can add that to any active field that you are using in the CASE statements ...
    Thanks that worked for me. THats twice you have helped me Linda i owe you.
    [FONT=Comic Sans MS]Don Scott
    http://dealz-r-us.com
    [/FONT]

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Traffic Light Units in Stock indicator
    By Digiblood in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 12 Jul 2011, 09:25 AM
  2. Stock Level Indicator installation
    By orien in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 9 Aug 2010, 11:14 AM
  3. Stock level indicator, for stock by attributes controller
    By vandiermen in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 13 Nov 2008, 09:49 AM
  4. product page stock level indicator
    By dscott1966 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Oct 2008, 04:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg