Forums / Templates, Stylesheets, Page Layout / Hide Qty on Product Page

Hide Qty on Product Page

Locked

Views: 945

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
29 Apr 2008, 6:10 AM
#1
mimran avatar

mimran

New Zenner

Join Date:
Apr 2008
Posts:
68
Plugin Contributions:
0

Hide Qty on Product Page

HI

Slightly stuck if anyone PLEASE can help.
I want no Quantity box to appear with 'ADD TO CART' button, just by default the minimum Quantity (which i already have set in Admin/config) on the product page, but once 'ADD TO CART' is clicked and user goes to 'shopping_cart' page qty box is displayed.

Please help

regards
mimran

29 Apr 2008, 6:26 AM
#2
mimran avatar

mimran

New Zenner

Join Date:
Apr 2008
Posts:
68
Plugin Contributions:
0

Re: Hide Qty on Product Page

Don't worry guys i have figured it out.

For anyone else if they wish to achieve it:

in the 'product_info_tpl' file

there is an 'if / else' statement which checks what the admin settings are, if the admin is saying '0' quantity status (which means turn off the quantity box completely or max qty = 1) either of that case just show the 'add to cart' button only.
Else
show both qty and add to cart.

with that else statement copy the code given in if' statement and paste it and disable the already existing line.

and that will work fine, i can't think of any disadvantage as all other settings in admin will still work fine if you needed to apply anything else. All it is doing is hiding the qty box on the product main page and automatically picking up your minimum qty unit. Then when in the shopping cart page it does show qty box and if needed buyer can alter there.

Hope this helps, if i am in correct in my understanding i do request more experience zenners to comment please.

regards
mimran

29 Apr 2008, 6:35 AM
#3
mimran avatar

mimran

New Zenner

Join Date:
Apr 2008
Posts:
68
Plugin Contributions:
0

Re: Hide Qty on Product Page

sorry guys further to the above explanation, when a buyer has done 'add to cart' click and they come back to the product page it will display 'qty in cart x' e.g. if you don't want that to appear as well, just under the else statement, there is a div ' cart add' two statements in there ' display quantity & display button' just disable 'display qty'

p.s. Just wanted to say thankyou to zen cart team, the application is awesome, more i am using it, it is making sense, code is somewhat simpler and design is good as well.