Page 1 of 2 12 LastLast
Results 1 to 10 of 33

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Location
    United Kingdom
    Posts
    195
    Plugin Contributions
    0

    Default Re: traffic light stock level indicator

    ok lets see how bad i can break my site lol
    here goes..............

  2. #2
    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???????

  3. #3
    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!

  4. #4
    Join Date
    Jun 2008
    Posts
    47
    Plugin Contributions
    0

    Default Re: traffic light stock level indicator

    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?

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

    Default Re: traffic light stock level indicator

    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!

  6. #6
    Join Date
    Jun 2008
    Posts
    47
    Plugin Contributions
    0

    Default Re: traffic light stock level indicator

    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'''15080) . ''


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


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


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

    echo 
    'Stock level is ' $zc_stock_level_image
    ?>

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

    Default Re: traffic light stock level indicator

    You are using:
    Code:
    if (something = somethingelse) {
    More or less that is setting something to be the value of 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!

  8. #8
    Join Date
    Jun 2008
    Posts
    47
    Plugin Contributions
    0

    Default Re: traffic light stock level indicator

    thats cracked it Thanks alot

  9. #9
    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

  10. #10
    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!

 

 
Page 1 of 2 12 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