On /cart commerce_cart_form view page views_entity_form Fields does not update each prodcuts(each row) order item types field

Created on 21 March 2025, 14 days ago

Problem/Motivation

I’m encountering an issue with the Views Entity Form Field module on our commerce cart form commerce_cart_form. When updating order item fields on the /cart page, all products are getting the same value (the last one entered) because the input names use the same identifier (the commerce order ID) for every row.
In our node view, each input is unique (thanks to unique IDs), but on the cart page, the input names look like this:
form_field_field_additional_requirements[892172][field_additional_requirements][0][value]
where 892172 is the same for every product row as it consider it order id. I tried altering the form with hook_form_alter to add a unique index, but it didn’t work.
Has anyone seen this before? Is there any way to update each products order item type fields for each product on commerce_cart_form /cart page
for example: on cart page i have a order item type field additional requirements i want to update this field with every product on cart with “update cart” or “checkout” button for each product in cart
Any help or pointers would be greatly appreciated.

🐛 Bug report
Status

Needs work

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024