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
http://www.ubercart.org/forum/ideas_and_suggestions/2821/change_attribut...
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
| Attachment | Size |
|---|---|
| uc_orderupdate.tar.gz | 2.69 KB |
| uc_orderupdate.zip | 3.11 KB |



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
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.
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!
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.