Product attributes do not update visually when switching variations

Created on 21 January 2020, over 4 years ago
Updated 19 June 2024, 11 days ago

When changing a product's attribute in the add to cart form, a secondary attribute will not be visually updated to reflect that it's checked even if it's the only option.
This may be due to the ajaxRefresh call or the renderer of radio buttons in drupal.

The commerce functions seem to return the correct values and defaults. Still no `checked` element is rendered on the attribute after the ajax call.

Unrelated to the active theme, has been tested on both the default and custom themes.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Product

Created by

🇨🇦Canada DerekCresswell

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 11 days ago
    795 pass
  • 🇮🇳India vinay.p

    Hi,
    I've implemented the fix in ProductVariationAttributesWidget. During an AJAX refresh, if the selected radio button from user input doesn't exist in the newly rebuilt #options, we just select the first radio button as fallback.
    Please review and confirm.

Production build 0.69.0 2024