Adds the possibility to return from cart to the product form and change the selected options.
Once you enable the module, the user will be presented an edit link on the cart page.
Clicking on it brings the user back to the product page, with his previously selected options.
He may now change these options and the quantity and save his changes to the cart product.
You can see an older version of this module in action on:
http://www.oschatz-druckwerk.de
http://www.k-books.de
As this is an ubercart module, there is an ubercart project page available:
http://www.ubercart.org/project/uc_cart_edit
Installation
Just enable the module, it will work out of the box.
Modules with similar functionality
Ubercart attributes in cart: Use this module, if you want to let the user change the product's attributes directly in the cart.
If you want to use the product form instead, use "Ubercart Edit Cart Item".
Product kit issues
Right now this module does not support product kits.
We are working on a solution which won't involve hacking ubercart.
#1979412: Full product kit compatibility This has been fixed in the 7.x version, but still needs some review.
Project page:
http://drupal.org/sandbox/laborb/1418732
git clone --branch 6.x-1.x http://git.drupal.org/sandbox/laborb/1418732.git uc_cart_edit
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/laborb/1418732.git uc_cart_edit
Reviewed projects:
https://drupal.org/node/2014627#comment-7526515
https://drupal.org/node/2008852#comment-7526601
https://drupal.org/node/2014453#comment-7522033
Comment | File | Size | Author |
---|---|---|---|
#10 | Bildschirmfoto 2013-06-04 um 16.43.12.png | 48.08 KB | labor b |
#10 | Bildschirmfoto 2013-06-04 um 16.43.37.png | 19.31 KB | labor b |
#9 | Screen Shot 2013-06-04 at 3.52.26 PM.png | 22.86 KB | m1n0 |
#9 | Screen Shot 2013-06-04 at 3.53.30 PM.png | 63.52 KB | m1n0 |
Comments
Comment #1
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxlaborb1418732git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
labor b CreditAttribution: labor b commentedI just fixed the remaining errors in both the 6.x-1.x branch and the 7.x-1.x branch.
Comment #3
labor b CreditAttribution: labor b commentedSorry, forgot to reset the status.
Comment #4
labor b CreditAttribution: labor b commentedRight now the 7.x version fails, when using checkboxes as attribute display.
Comment #5
labor b CreditAttribution: labor b commentedRemaining issue has been fixed, I'm marking this as needs review again.
Comment #5.0
labor b CreditAttribution: labor b commentedAdded correct git clone link.
Comment #6
m1n0 CreditAttribution: m1n0 commentedHi,
Nice and simple module, here are some thoughts on the D7 version:
Please change the
package = Ubercart Extra
to
package = Ubercart extra
to put it in the same module group as other extra modules
I got the following error when hitting the edit field:
Notice: Undefined index: attributes in uc_cart_edit_form_alter() (line 65 of [path-to-drupal]/sites/all/modules/contrib/ubercart_edit_cart_item/uc_cart_edit.module).
This needs to be fixed.
Quick code review:
I don't get this condition:
Why is there a check for url "cart"?
Comment #7
m1n0 CreditAttribution: m1n0 commentedComment #8
labor b CreditAttribution: labor b commentedHi, thanks for your review. I fixed the parts you mentioned above.
For some reason ubercart loads the uc_product_add_to_cart_forms again inside the cart, but doesn't display them. I couldn't find a better way to deal with this problem as the forms are exactly the same as before, so I'm just checking the path to determin if we are inside the cart.
I updated the comment above this check to make this more comprehensible.
Comment #9
m1n0 CreditAttribution: m1n0 commentedHi
Sorry, I meant
Ubercart - extra
- you know, to put it in the same group as other extra modules
Ok now after quick code inspection, I started reviewing the functionality - what I dont understand is who would use this? When I click edit, I get the normal product node view with save button, but what is saved? Is it working as expected? (see screenshots)
On the 2nd screenshot, what am I supposed to do? There are GET parameters containing node ID (which is already there in node/[nid]) and nothing to change or edit.
Please explain
Comment #10
labor b CreditAttribution: labor b commentedModule package is fixed now. To be sure I copied it from uc_addresses. ;)
One of Ubercart's features is that you can add attributes & options to products. Unfortunately once put into cart, there is no way to change your previously configured product attributes. If you want to change a single option, you will have to delete your product from cart and do the whole configuration again. That's not very user friendly.
Imagine you want to buy a PC, configure all the stuff you want, put it into cart and then you notice you selected not enough RAM. Now you will have to do the whole configuration again... with uc_cart_edit, you can just hit the edit button, change your RAM and save you changes.
The GET parameter you see in the url is the cart item id. As ubercart also has product kits (combinations of single products) it is an array of cart item ids.
I hope I could clarify the use case for this module.
Comment #11
labor b CreditAttribution: labor b commentedOn second thought, it might be irritating to have edit links for products without attributes. As you pointed out, there is nothing to change in this case. In a shop there can live products with and without attributes, so it might be the best solution to just hide the edit links for those without attributes.
Also I found an error with product kits in the 7.x version. If display is switched to "individual products", the attributes are not processed correctly.
Comment #12
labor b CreditAttribution: labor b commentedBoth issues have been fixed. Check the links below for details:
#1979412: Full product kit compatibility
#2012438: Edit links irritating for products without attributes
Comment #13
m1n0 CreditAttribution: m1n0 commentedHi
It makes more sense to me now, thanks for explanation.
Further code inspection:
lines 21, 22:
from php doc (http://php.net/manual/en/function.strstr.php):
"If you only want to determine if a particular needle occurs within haystack, use the faster and less memory intensive function strpos() instead."
There is nothing else from my side for now.
Comment #14
labor b CreditAttribution: labor b commentedThanks, I didn't know that about strstr & strpos. Learned something today.
I replaced all occurences of strstr with strpos in 6.x & 7.x version.
Comment #14.0
labor b CreditAttribution: labor b commentedAdded product kit changes.
Comment #15
labor b CreditAttribution: labor b commentedAdding review bonus tag.
Comment #15.0
labor b CreditAttribution: labor b commentedAdded reviewed projects.
Comment #16
klausiThis project is too short to approve you as git vetted user. We are currently discussing how much code we need, but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed. However, we can promote this single project manually to a full project for you.
Otherwise looks good to me from a visual code review. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to ELC as he might have time to take a final look at this.
Comment #17
labor b CreditAttribution: labor b commentedThanks for your review. I would really like to see this as a full project.
Edit: As our modules are mostly pretty short, would it be possible to get "full project access" after getting multiple short modules through this validation process?
Comment #18
klausiSure, just make sure that you reference your existing projects in that application.
no objections for a week, so ...
Thanks for your contribution, labor b!
I promoted this project for you: https://drupal.org/project/uc_cart_edit
Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #19.0
(not verified) CreditAttribution: commentedAdded additional git clone command for 6.x version.