Page 1 of 1

Disable Quantity

Posted: Sun Jun 12, 2016 8:15 pm
by kurtisane
Hello,

is there a way to disable quantity on the product page ?

I mean it is allowed to have the product multiple times in the cart, but because I have a textfield on the productpage, where the customer needs to add some information to it and this information needs to be added for each product that the customer wants to put in the shopping cart individually, I need to disable quantity on the product page.

Re: Disable Quantity

Posted: Sun Jun 12, 2016 8:26 pm
by tabook
You can edit template file (product.tpl) and hide #input-quantity element and it's label. It can be done dynamically by JS script after page loading complete or simple add new style "display:none" to the elements above.

Re: Disable Quantity

Posted: Mon Jun 13, 2016 1:29 am
by kurtisane
Thanks for the reply, but I´m totally new to this.
Could you explain it a little bit more in details ?

Thanks for your time!

Re: Disable Quantity

Posted: Mon Jun 13, 2016 7:46 pm
by tabook
Do you have a stock theme for the store ?

Re: Disable Quantity

Posted: Mon Jun 13, 2016 9:42 pm
by kurtisane

Re: Disable Quantity

Posted: Tue Jun 14, 2016 1:27 am
by tabook
Ok,
Open this file \catalog\view\theme\pav_protector\template\product\product.tpl

Find following line
<div class="product-qyt-action space-20">
and add word hidden
<div class="hidden product-qyt-action space-20">

* pav_protector - needs to be checked for actual name

Re: Disable Quantity

Posted: Sun Jun 19, 2016 3:51 am
by tabook
No need for thanks, of course ...

Re: Disable Quantity

Posted: Mon Jun 20, 2016 12:43 am
by kurtisane
I'm sorry I was not online for the last couple days.

But ofc thanks for your help !
Appreciate it a lot !

Re: Disable Quantity

Posted: Mon Oct 22, 2018 2:06 am
by BadgesOnboard
Hi there,
Does this work for one product only or does it stop the quantity for all products ?? I just want to disable QTY on 5 of my products if possible
Many thanks

Re: Disable Quantity

Posted: Tue Oct 23, 2018 2:35 am
by cmsroom
Hi BadgesOnboard,
It will hide for all product for only 5 product you need to check the is of those product and and base don the product id you can hide the same, but it will be a little hard coding. The proper way is to do the same is create an extension. In the extension there will be an option to choose the product for which you need to hide the quantity.