Order Updates


Allows a user to update (make changes to) the options of an existing item that is already in the user's cart.

This is a work in progress, in response to a need that has been discussed here http://www.ubercart.org/forum/bug_reports/2748/product_links_cart
and here

An "update cart" form is placed on the product page just above the "add to cart" form if the user already has the product in his/her cart. Thus there exists both the ability to change the existing items(s) in the cart as well as add new item.

Currently this module only works with single products and not product kits.

If you're a coder, your feed back would be greatly appreciated.
I am using hook_nodeapi with $op='view' to then call the update form. The update form code is pretty much a copy of similar code seen in the uc_cart, uc_product and uc_attributes modules. There are some additional comments in the code itself.

I am not if this is the best route to go. Maybe this is just a proof of concept.

I've attached in both .tar.gz and .zip

uc_orderupdate.tar.gz2.69 KB
uc_orderupdate.zip3.11 KB
surbir's picture
Joined: 08/08/2007
Juice: 113
Re: Order Updates

Its not working at all and can you tell me from where I should configure from?
I have searched in all places but couldn't found

rjl@drupal.org's picture
Joined: 01/18/2008
Juice: 28
No settings page

At this point, there are no administrative settings.

It should work like this.

Imagine a product that is a shirt, with a color attribute (red and blue) and a size attribute (small, medium and large). The first time you visit the product page you could order 2 large red shirts and click the "Add to Cart" button. Then in the shopping cart you see the Shirt product as a link to the product page and listed beneath that are Size: Large and Color: Red. If you click the link to go to the shirt page again, you should see a form that says, Currently In Your Cart, the color pulldown should indicate Red, the size pulldown should indicate Large and the Quantity field should indicate 2. The submit button should say "Update Cart" and the background color of the form should be grey. Below this form you should see the normal blank form with the color and size pulldowns and quantity field set at their defaults. The submit button will say "Add To Cart" You should be able to change your existing order of 2 large red shirts - maybe you wanted medium instead - click the "Update Cart" button. You can also order more shirts - such as 1 small blue shirt - click the "Add to Cart" button.

Hope that is helpful.

plousia's picture
Joined: 02/27/2008
Juice: 9
Re: Order Updates

Thanks, this is excellent! I've been setting up my first site with Ubercart and during testing realized there was no way to edit the cart, built-in...I googled it and came up with this and it works brilliantly! Thank you so much!

nlindley@drupal.org's picture
Joined: 09/10/2008
Juice: 8
Re: Order Updates

This is a great idea, and close to what I'm looking for. Here's where this method breaks for me.

I'm working on a site for a client that pretty much just has 1 product: person. The price of registration for this person is based on different attributes, but every person will have different attributes, e.g. name.

As the module is now, every person that has already been added appears above the form to add yet another new person. Ideally (for me, anyway), an edit link would be provided in the cart, which then takes you to the product with the attributes populated with the current values, and then just replaces the one cart item affected.

I believe this is essentially the flow described in one of the links before. I also realize that I don't have the most typical "store" as an example, but for stores where people will be ordering several variations of the same product, I think it would be better to populate rather than prepend current cart items.

Another example could be food stores, where you want one pizza with pepperoni, one with anchovy, and one with mushrooms. Then you decide to add onion to the one with mushrooms, you probably just want to edit the one you already have without seeing the other two.

If you decide to go this route, I may be able to help develop.

eoneillPPH's picture
Joined: 12/22/2008
Juice: 55
attributes and custom pricing

Hi, this module works pretty well for what we want to do. One thing I've not found is how to make this work with our custom pricing scheme (uc_custom_price module). Been looking for a hook to make the product read the new attributes and run our function that calculates the price; haven't found it yet. Just need to say: $item->price=my_function($item) when the item is being updated by THIS module. Can anybody help?

update: seems to have been coder error (mine). The order update looks for custom pricing code on its own.

Piyush@drupal.org's picture
Joined: 04/07/2009
Juice: 9
Ubercart 2.x port?

This sounds like just what I need to allow editing some text field attribute options.

Has anyone succeeded in porting this to Ubercart 2.x for Drupal 6?

I don't know enough on what to look for in trying to port but if someone gives me some pointers I'll have a go.


trucalling's picture
Joined: 04/01/2009
Juice: 27
Ubercart 2.x port?

Has any one managed to port it to 2.x?

kerberos's picture
Joined: 12/07/2009
Juice: 10
Ubercart 2.x port

Here is the converted one for Ubercart 2.x , Drupal 6

uc_orderupdate.zip 3.34 KB
texas-bronius@drupal.org's picture
Joined: 01/19/2010
Juice: 170
test Ubercart 2.0 version of Order Update module, and it works..

Is there ongoing work on this?

I found this contrib seeking to be able to update items in cart (beyond just quantities and removal). I assumed I would see an "Edit this item" or similar. Having not seen that, I came back and reread the original post... ok, so you click the product title-- that's kind of ok, too. I think more clear would be clicking the title (or some other edit link) and getting only the update for that particular item in the cart-- not a view of all items in your cart that are that product but with a different configuration.

Maybe another way (as an option?) would be to show the original add to cart form for the product? The goal here would be to include all attributes right there (perhaps in an expandable fieldset) inline as well as any cart hook_form_alter overrides (which I happen to have).

Thanks for sharing your development!