Inject AJAX field for variations not add field with value

Created on 31 March 2023, about 1 year ago

Describe your bug or feature request.

Clean Drupal shop with example, we try to create technical detail sheet that include selected variation.

If a bug, provide steps to reproduce it from a clean install.

Add default type variation, check "Inject field" checkbox for field ajax update ( https://www.drupal.org/project/commerce/issues/2930775 )
Add 2 product variations fields (my example is SKU 'x-123')
Add first variation with all fields
-- Be sure it work all fine and switch etc --
Now add new variation field as required (my example is "Finish" field)
Add new product variation with that field filled (my example is SKU 'y-123')
New product variation isn't first on list (not as default variation)
Check on product page if fields are updating and see that new field won't show up (my SKU is updated but not the field of finish as field not exist before switch)

Solution for temporary fix

In template generate always render template (if empty then css hide) as jQuery replace selector can find field to update

Screen to show more exactly what field selector not show up in what combinations I use

Image 1: https://snipboard.io/1K7vGg.jpg
Image 2: https://snipboard.io/pkyn5q.jpg

🐛 Bug report
Status

Active

Version

2.33

Component

Product

Created by

🇵🇱Poland Patryk Padus

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

Comments & Activities

Production build 0.69.0 2024