Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2008
    Posts
    7
    Plugin Contributions
    0

    Default Displaying Product Quantity for some products only

    Hello,

    I hope that there is a Zen expert that can help me!

    I would like to be able to display the amount of products available for the 'seconds' (products with slight flaws) only. For the regular products I don't want to have any quantity displayed.

    Does anyone know if it's possible? If so how do I do it?!

    Many thanks for any tips!
    Cheers,
    Tiff

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

    Default Re: Displaying Product Quantity for some products only

    What distinguishes the Products you want to see the quantity and the ones that you don't want to see the quantity ...
    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. #3
    Join Date
    Dec 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Displaying Product Quantity for some products only

    Hi Ajeh,

    The Products that I want to see the quantity in are listed a seperate category named 'Seconds'. These are the products in my store that have slight flaws and are only available in limited quantities.

    All remaining products (each with their own category) always have plenty in stock and I don't wish to have an amount displayed of how many are available.

    Is that the information you needed?

    Hope you might be able to help!
    Cheers,
    Tiff

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

    Default Re: Displaying Product Quantity for some products only

    You could put a conditional IF around the display of the Units based on master_categories_id for that Seconds Category ...

    You can customize the template using your overrides so that if the Seconds categories_id is 10, then use:
    Code:
    <?php
    $show_seconds = $db->Execute("SELECT master_categories_id from " . TABLE_PRODUCTS . " WHERE products_id ='" . $product_info->fields['products_id'] . "'");
    if ($show_seconds->fields['master_categories_id'] == 10) {
      // show quantity
      $show_quantity_seconds = true;
    } else {
      // do not show quantity
      $show_quantity_seconds = false;
    }
    ?>
      <?php echo ($show_quantity_seconds && ($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>'  : '') . "\n"; ?>
    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. #5
    Join Date
    Dec 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Displaying Product Quantity for some products only

    Hi Linda,
    Wow, thanks so much!

    Are you able to help me just one little bit more ... which template file should I be editing? I'm still learning!

    Many thanks,
    Tiff

    PS Will this work for the Product Listing (where I have quantity turned on) - not the Product Information display (which I have quantity turned off permantly)?
    Last edited by bumboo; 12 Apr 2009 at 06:43 AM. Reason: after thought

  6. #6
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,197
    Plugin Contributions
    0

    Default Re: Displaying Product Quantity for some products only

    Bum
    Use all the tools that Zen provides...

    Ajeh, has written the .php code for you, so lets look at the code

    1. admin panel/ tools/ developers tool kit
    2. bottom left hand side
    3. search for:
    4. TEXT_PRODUCT_QUANTITY
    5. drop down box, to right, Click: category
    6. then click search
    7. Now we see all the files associated with this Code..
    8. Looks like you will add the code here:
    9. includes/ templates/ your_template/ templates/ tpl_product_info_display.php

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

    Default Re: Displaying Product Quantity for some products only

    That's the one ... thanks haredo ...
    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
    Dec 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Displaying Product Quantity for some products only

    thanks so much for the help

  9. #9
    Join Date
    Mar 2009
    Location
    Somerset West, South Africa
    Posts
    11
    Plugin Contributions
    0

    Default Re: Displaying Product Quantity for some products only

    Hi Zenners:

    Im very new to Zencart and i know very little, but i cant get this right, ive been looking for a way to only show units left in one category, but even though i read this topic i still cant get it, please guys could you give me a hand here!

    Thanks in advance

 

 

Similar Threads

  1. Stock control for some products only?
    By rebelIT in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 13 Aug 2011, 11:27 AM
  2. pickup only for some products
    By FredZ in forum General Questions
    Replies: 25
    Last Post: 25 Mar 2011, 05:38 AM
  3. Products for sales as well as some just for display only
    By neilg in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 10 Jul 2010, 11:12 AM
  4. Can I make some products ship-only, some pickup-only, some both?
    By TheToe in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 7 Nov 2006, 12:33 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