Hi

I am sure that when you had a webform with multible products on it, deleting one of these products from the cart would delete all product from the same submission.

But I am now allowed to just remove a single product from the webform.

Is this intentional? I liked the fact that all products from the same submission were 'locked' together. In my opinion you should not be able to adjust the products in the cart as it would render any conditionals in the webform moot.

Comments

karing’s picture

For us this would make sense as well - though I can see how for many orders it would make sense to be able to reduce quantity by just 1 at that stage.

To prevent users from editing the cart edit the view that generates the cart (commerce_cart_form). You can make it look just like the order/review summary (as opposed to an editable cart form).

johnennew’s picture

This functionality has not been deliberately removed.

A recent update to commerce may have broken this - it is supposed to be controlled via the implementation of hook_commerce_cart_product_comparison_properties_alter which is still there and looks to be implemented correctly.

johnennew’s picture

Actually, this isn't the same thing. hook_commerce_cart_product_comparison_properties_alter just stops the grouping of similar products if some came from a webform submission.

The behaviour should be that removing a required item from the cart would remove all the items. I also think this used to work and doesn't appear to be now.

ar-jan’s picture

Title: Prevent being able to delete single products from the cart » Prevet being able to delete single products from the cart

Also interested in this.

edit: remove irrelevant references to code.

ar-jan’s picture

Title: Prevent being able to delete single products that are required in the webform from the cart » Prevent being able to delete single products from the cart
Status: Needs review » Active
StatusFileSize
new1.27 KB

The module was looking for the 'mandatory' status, which was not available because webform 4.x switched to 'required' (#2020723: Rename "mandatory" to "required" for consistency with HTML5 and the rest of Drupal). Patch attached.

ar-jan’s picture

Title: Prevet being able to delete single products from the cart » Prevent being able to delete single products that are required in the webform from the cart
Status: Active » Needs review

Status.

johnennew’s picture

Issue summary: View changes
Status: Active » Fixed

Ah, good spot ar-jan. Thanks for the patch - committed to 7.x-2.x

@KarinG - are you using 7.x-2.x now? If not, is this a problem in 7.x-1.x?

Status: Fixed » Closed (fixed)

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