Disabling quantity field on cart page.

Posts: 27
Joined: 02/03/2008

For some items, and not just overall, is it possible to disable the quantity input field on the actual cart page? Like if some items can only be one per order. On the product edit page, I saw "Default quantity to add to cart" and how it said, "Leave blank or zero to disable the quantity field in the add to cart form." I enabled that just to see what it did. Since the quantity field isn't even available on my individual product pages that didn't make a difference. I need to disable for specific products on the cart page.

p.s. Sorry for asking so many questions in here in such a short time.

Posts: 25
Joined: 12/26/2007

Hey! Something I can answer. Look at admin/store/settings/tables/uc_cart_view_table and uncheck the Qty. field.

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

A robust solution would require a custom module that could limit a product's qty. to 1 and remove its qty. box from the cart page. The danger in removing the qty. column altogether is that someone could feasibly add 5 of the same product and try to checkout when they should only checkout with 1.

Posts: 17
Joined: 03/27/2008

At first glance it looks as though this has been sorted as there is a 'Default Quantity to add to shopping cart' box on the product page with the words :
"Leave blank or zero to disable the quantity field in the add to cart form"
below it.

However, it doesn't seem to work at the moment as I have left it blank and saved the product, but the shopping cart still displays the quantity field.

Tim

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Aye, that's for the add to cart form but not the Qty. box on the shopping cart view page. That's a known deficiency that will be addressed in the next version.

Posts: 6
Joined: 03/28/2008

Removing quantity is very useful if the product is really a service. I'm having great fun with Ubercart - it's a great package!

Posts: 19
Joined: 04/06/2008

The problem is that if you remove the quantity column from the table on checkout the user can still add multiple items by adding it to cart twice. also if you have some items that you want to allow multiples, you cant do it!

I used this:
http://www.ubercart.org/contrib/2155

I just set the max to 1.