Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default how to show quantity when order is over available amount

    Hello,
    When someone adds an item to their cart that is over the quantity on hand, it marks the item in red in the shopping cart with ***. Is there a way to also show the customer how much quantity is available for this item so that they don't have to guess and keep entering a lower quantity and continue in circles until they get to an available amount?

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

    Default Re: how to show quantity when order is over available amount

    Using your templates and overrides you should be able to use something like this ...

    PHP Code:
      if ($product['flagShowFixedQuantity']) {
        echo 
    $product['showFixedQuantityAmount'] . '<br /><span class="alert bold">' $product['flagStockCheck'] . '</span><br /><br />' $product['showMinUnits'];
      } else {
        echo 
    $product['quantityField'] . '<br /><span class="alert bold">' $product['flagStockCheck'] . '</span><br /><br />' $product['showMinUnits'] . ($product['flagStockCheck'] ? ' left ' zen_get_products_stock($product['id']) : '');
      } 
    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
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: how to show quantity when order is over available amount

    Hi Ajeh,

    Thanks for the reply.

    I added this portion of the code because the other portion already exists:

    ($product['flagStockCheck'] ? ' left ' . zen_get_products_stock($product['id']) : '');
    }

    This is at the end of the code you provided. But now when I click on view cart, I get a blank page.

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

    Default Re: how to show quantity when order is over available amount

    Could you post everything in that area from the starting <?php to the closing ?> ... approximately lines 68 - 74 ...
    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
    Aug 2008
    Posts
    448
    Plugin Contributions
    0

    Default Re: how to show quantity when order is over available amount

    Hi Linda,
    I'm so sorry. It works! I think I might have cut and paste the wrong way. So tried again and it works wonderfully!
    Thanks so much.
    Did you see a bug that I reported on my other thread in regards to able to checkout with insufficient stock in the general forum? I did a fresh install and did a test and the bug still exists in the fresh install.

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

    Default Re: how to show quantity when order is over available amount

    Yeps ... now go post over there the info we need to help you out better ...
    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!

 

 

Similar Threads

  1. Adding a free item to cart when customer order over "X" amount of product?
    By petro in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 25 Jan 2014, 07:07 PM
  2. Show available stock level in cart when less than order
    By Scott Benton in forum General Questions
    Replies: 8
    Last Post: 6 Aug 2013, 04:23 AM
  3. How to hide quantity when it's over certain value?
    By Miro in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Jul 2010, 09:53 AM
  4. How do I show quantity discounts when user not logged in?
    By carystevens in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Jul 2009, 04:56 AM
  5. Show available stock level when less than order
    By Dunk in forum General Questions
    Replies: 4
    Last Post: 10 Feb 2009, 02:39 PM

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