Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006
    Posts
    229
    Plugin Contributions
    0

    Default Stock quantity conditional statement?

    I need to find the code to check stock quantities for product info pages. I need to create a conditional statement so that, if the stock quantity is "0" (or out of stock), I have a div that appears on the top corner of the product info page.

    Would anyone know where I could find that? I've tried a few different ways, but nothing's happening.

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

    Default Re: Stock quantity conditional statement?

    In the
    /includes/templates/template_default/templates/tpl_product_info_display.php

    you can reference it with: $products_quantity

    Be sure to use your templates and overrides directory for this:
    /includes/templates/your_template_dir/templates/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. #3
    Join Date
    Jan 2006
    Posts
    229
    Plugin Contributions
    0

    Default Re: Stock quantity conditional statement?

    Yep - that's where I was editing, but nothing seems to be happening. From what I can tell, the only "quantity" stuff I see in that file is the input box (for how much the end user wants to purchase) - but I see nothing for the stock level of the product.

    Maybe I'm blind...I *thought* it was set up so that, if somethign was out of stock, it would display an "out of stock" image - but I'm just not seeing that info anywhere.

  4. #4
    Join Date
    Jan 2006
    Posts
    229
    Plugin Contributions
    0

    Default Re: Stock quantity conditional statement?

    AHA! There it is...

    I must have accidentally overwritten my template_default file. I just re-downloaded and unzipped, and there it was. Oops.

    Thank you!

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

    Default Re: Stock quantity conditional statement?

    Thanks for the update and glad that this worked 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!

 

 

Similar Threads

  1. Conditional statement in shopping_cart
    By The_Mech in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 9 Mar 2014, 11:29 PM
  2. Conditional Quantity Discounts
    By Alien in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 9 Nov 2012, 07:34 AM
  3. Conditional statement in product info
    By twdhosting in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Aug 2011, 02:44 AM
  4. Conditional Statement - Parent and Child Category Display Additional Information
    By crlannen in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 6 Feb 2011, 04:13 AM
  5. Php Conditional Statement
    By zforrest in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Jun 2006, 01:07 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