I have Ubercart up and running in a Drupal 7.8 system. I have a product which should not be added twice or more in the shopping cart. How can i limit that the product can only be added once?

I tried to define a rule that checks if the quantity of products exceeds the value of 1 and updates the property value of "order:products:0:qty" but i got the error message:

The integrity check failed with the following error message: "The selected data property doesn't support writing."

Maybe i am doing it too complicated.

Comments

raulmuroc’s picture

Contrib module 'Ubercart Restrict Quantity" needs to be ported: http://drupal.org/project/uc_restrict_qty

I'm off of time with other projects, as soon as I'm able I'm gonna help on that. Hope somebody decides to begin patching.

Drupal Association individual member

denisr’s picture

Can you export the rule?

I am trying to do the same thing, but the events "after adding a cart item" and "after updating a cart item" won't trigger for me :(