- 🇷🇺Russia Hamulus
@bolaghi, the guide is not usable in Field groups context
However I could get the proper result by this preprocess code in custom module:
function mytheme_preprocess_commerce_product(&$variables){ if ($variables['elements']['#view_mode'] == 'full') { $variables['elements']['#fieldgroups']['group_right']->children[] = 'variation_list_price'; $variables['elements']['#fieldgroups']['group_right']->children[] = 'variation_price'; $variables['elements']['#group_children']['variation_list_price'] = 'group_right'; $variables['elements']['#group_children']['variation_price'] = 'group_right'; } }
- 🇬🇧United Kingdom chrisscrumping
Been struggling with this issue today and in case its helpful to anyone else I have finally managed to get it working..... I wanted a field group for a product variation type.
Thanks Hamulus you pointed me in the right direction!
First I don't think its possible to use Field Groups that are created on Commerce Product Variations, you must create them on the Commerce Product.
Once you have created the required groups use the example Hamulus provided to move variation fields into the field groups.
Not great for a site builder but at least it works!
- 🇩🇪Germany Anybody Porta Westfalica
Re #48 any ideas from the Commerce maintainers / Centarro if this should be a follow-up and if there's a good way to solve that?
Is #3121339: Widget "Single variation (Product information)" ignores field groups → evantually related?