Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Show "Units In Stock" for certain product only.

Show "Units In Stock" for certain product only.

Locked

Views: 2,117

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
6 Jun 2008, 8:51 AM
#1
laydiefa avatar

laydiefa

New Zenner

Join Date:
May 2008
Posts:
13
Plugin Contributions:
0

Show "Units In Stock" for certain product only.

Hi,

I sell few types of product.
However I want to display one of the product without "Units In Stock" notification.

I've tried Catalog >> Product Type >> Edit Layout >> Show Quantity in Stock = '0'.. but this thing turn off quantity display for EVERY product.

Then I tried Catalog >> Categories/Products >> Product Settings = 'No, Do not show Quantity Box'.... was given the following warning:

Warning: Does not show Quantity Box, Default to Qty 1

but the "units in stock" is still there. :frusty:

any idea how i can turn this off only for this particular product?

26 Nov 2008, 6:46 AM
#2
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Show "Units In Stock" for certain product only.

Did you figure this out? I have the same question.

26 Nov 2008, 1:48 PM
#3
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Show "Units In Stock" for certain product only.

When you want to do something like this for only one product, and there is no switch in admin product details to do it, use the custom page-specific stylesheet, as discussed in the readme file in your css folder.

For example, to turn off, say, the Add To Cart button for product ID# 23 you create a stylesheet called p_23.css and put only this definition in it...
#cartAdd { display: none; }

So you just have to figure out the id or class of the part you want to remove, substitute that for #cartAdd in my example, and name the css file with the proper page id number, and upload that custom stylesheet to your css folder.

Rob

26 Nov 2008, 2:30 PM
#4
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Show "Units In Stock" for certain product only.

rstevenson:

So you just have to figure out the id or class of the part you want to remove.

Rob

Thanks Rob. Now the question is, how do you figure out the id for things?

After I posted last night, I did more digging and found that since the product I want to have this exception for is virtual, I can change the layout for virtual products. I did what the book said for "services", under catalog<product types<Product free shipping. Then I clicked on edit layout and changed "Show Quantity in Stock" to false, but the quantity still shows for that product, even though I have it as:
"Product is Virtual:"--yes
"Always Free Shipping:"--no

26 Nov 2008, 3:43 PM
#5
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Show "Units In Stock" for certain product only.

Also, if I did it this way, doesn't that mean for each product that I don't want the stock qty to show, I'd have to make a style sheet for it? I'd like to set it up so that for each service (or virtual product) that I offer, it doesn't show.

26 Nov 2008, 7:08 PM
#6
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Show "Units In Stock" for certain product only.

With some searching, I found a thread with a solution that worked for me. I'll post the link in case someone has the same situation.