Forums / Setting Up Categories, Products, Attributes / How can I dispaly stock quantities only if quantity in stock is greater than zero?

How can I dispaly stock quantities only if quantity in stock is greater than zero?

Started by liamv on 21 Feb 2013, 11:36 PM · Views: 894

Results 1 to 2 of 2
21 Feb 2013, 11:36 PM
#1
liamv avatar

liamv

New Zenner

Join Date:
Feb 2010
Posts:
73
Plugin Contributions:
0

How can I dispaly stock quantities only if quantity in stock is greater than zero?

Does anyone know a way not to dispaly stock quantities when the quantity in stock is zero.

We sill want to show stock quantities when the the stock is greater than zero but when the quantity is zero we do not wish to display stock quantity.

This is because for some of our products we have another warehouse and can still effect same day shipping to the customer.

21 Feb 2013, 11:39 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: How can I dispaly stock quantities only if quantity in stock is greater than zero?

Simply update that line of PHP+HTML in your template file by adding a conditional test for $products_quantity > 0

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.