Post by kurtisane » Sun Jun 12, 2016 8:15 pm

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.

Newbie

Posts

Joined
Sun Jun 12, 2016 3:44 am

Post by tabook » Sun Jun 12, 2016 8:26 pm

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.

Forget complex and inconvenient stock Categories and Products in OpenCart - use Acute Category Manager +!
Ready for 1.5.x and 2.x Editions


New member

Posts

Joined
Sun Mar 01, 2015 6:27 pm

Post by kurtisane » Mon Jun 13, 2016 1:29 am

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!

Newbie

Posts

Joined
Sun Jun 12, 2016 3:44 am

Post by tabook » Mon Jun 13, 2016 7:46 pm

Do you have a stock theme for the store ?

Forget complex and inconvenient stock Categories and Products in OpenCart - use Acute Category Manager +!
Ready for 1.5.x and 2.x Editions


New member

Posts

Joined
Sun Mar 01, 2015 6:27 pm

Post by kurtisane » Mon Jun 13, 2016 9:42 pm


Newbie

Posts

Joined
Sun Jun 12, 2016 3:44 am

Post by tabook » Tue Jun 14, 2016 1:27 am

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

Forget complex and inconvenient stock Categories and Products in OpenCart - use Acute Category Manager +!
Ready for 1.5.x and 2.x Editions


New member

Posts

Joined
Sun Mar 01, 2015 6:27 pm

Post by tabook » Sun Jun 19, 2016 3:51 am

No need for thanks, of course ...

Forget complex and inconvenient stock Categories and Products in OpenCart - use Acute Category Manager +!
Ready for 1.5.x and 2.x Editions


New member

Posts

Joined
Sun Mar 01, 2015 6:27 pm

Post by kurtisane » Mon Jun 20, 2016 12:43 am

I'm sorry I was not online for the last couple days.

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

Newbie

Posts

Joined
Sun Jun 12, 2016 3:44 am

Post by BadgesOnboard » Mon Oct 22, 2018 2:06 am

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

New member

Posts

Joined
Sat Nov 18, 2017 8:43 pm

Post by cmsroom » Tue Oct 23, 2018 2:35 am

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.

You may like these extension : - https://www.opencart.com/index.php?rout ... r=cmsrooms


New member

Posts

Joined
Fri Sep 28, 2018 1:37 am
Who is online

Users browsing this forum: No registered users and 41 guests