Maybe I don't understand enough about the way this module works but should
a user be allowed to change the qty after they have added the item to cart?

Seeing as the node you are buying as created when adding to cart, if you then
up the qty on the cart you don't get to add more nodes. So you are paying
multiple times for the same node.

This patch disables the qty field on the cart screen (uses the same method as
uc_restrict_qty).

Comments

agileware’s picture

StatusFileSize
new1.48 KB

Getting pretty sick of patches not attaching :(

Here it is.

pydubreucq’s picture

Hi,
Thanks for this patch ;)
I would like to know the difference with the module uc_restrict_qty ?
Why should I use your patch rather than this module?
I think if you created this patch, it's because uc_restrict does not suit you?
Thanks by advance
Regards,
Pierre-Yves

agileware’s picture

Actually I'm using both uc_node_checkout and uc_restrict_qty.

I'm using uc_node_checkout for users to purchase a node and uc_restrict_qty
to make sure they can only ever purchase 3 nodes in a lifetime.

Because this module create a relationship between the product and the purchased node
when adding to cart it should also be this modules responsibility to make sure users
don't add more qty when they get to the cart.

You should not have to install uc_restrict_qty just to stop people from exploiting
a bug with this module.

So basically, this patch and uc_restrict_qty are really for different purposes.

djroshi’s picture

I agree - UC Node Checkout should definitely be responsible for altering the cart form and disabling the quantity.

Currently if a user changes the quantity, for example, to 2; only one content node is created, but two product nodes are added to cart. This isn't a good thing.

I personally use $form['items'][$i]['qty']['#disable'] = TRUE; rather than the theme option you have used in your patch. Might save a few lines of code...

Either way this functionality should be committed.

kmonty’s picture

Status: Needs review » Reviewed & tested by the community

This patch works great and is definitely needed.

+1

TripleEmcoder’s picture

Subscribing.

aidanlis’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in 6.x-2.x 98d42ea

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

millenniumtree’s picture

In our case, we need to adjust the quantity during checkout. The node is a 'customized' product with a user-uploaded logo attached to it. We still obviously want to sell more than one at a time.

Couldn't this have been made configurable??

For the moment, I've commented the lines out of the module, but another checkbox in the admin page would not be a bad thing.