Attribute Value not set correctly in Add to Cart Form in a View of Product Variations

Created on 24 February 2024, 9 months ago
Updated 13 May 2024, 7 months ago

I installed a fresh Drupal 10.2.3 with Commerce 2.3.8 but the product attributes is not displayed correctly in the add to cart form in a view of product variations. Here are the steps to reproduce the product.

1) Add Color as product attributes. Add three colors: red, blue and yellow. Assign this attribute to the Default product type.
2) Add three products, with each assigned the red, blue yellow attribute value.
3) Create a view of Product Variations.
4) Add a relationship: Product (the parent product of the variation)
5) Add "Variations" as field and set the formatter to be "Add to Cart".

I would expect the blue case's color attribute to be set as blue in the Add to Cart form, the red case be set as red, the yellow case be set as yellow. But as you can see in screenshot below, the color attribute is all set as Blue instead of their respective color. The color attribute value doesn't respect the actual attribute value of the current variation. How to fix this?

🐛 Bug report
Status

Closed: won't fix

Version

2.38

Component

Cart

Created by

🇺🇸United States iseeaflyingcrane

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

Comments & Activities

Production build 0.71.5 2024