0

I'm trying to display a handful of fields as tabs on my product detail pages, but it seems that the field-group tabs are being completely ignored by the Commerce product display. Anyone else have this problem? Did I miss something in the tab setup/display?

The fields display as any other field for the Product, just output as regularly expected. As mentioned, just seems to ignore the 'tabs' display.

Screen shot of field setup

1 Answer 1

0

Kind of late to the party, but I ran into this same problem earlier today and it appears to be caused by the fact that the Field Group module hardcodes the entity types that it latches onto.

The 1.x-dev version now includes a HOOK_field_group_content_element_keys_alter() that you can use to expose any entity type to the Field Group module.

To expose products and product variations you need to create a custom module and hook into the above alter function like this

MYMODULE_field_group_content_element_keys_alter(&$keys) {

  if (!isset($keys['commerce_product_variation'])) {
    $keys['commerce_product_variation'] = 'product_variation';
  }

  if (!isset($keys['commerce_product'])) {
    $keys['commerce_product'] = 'product';
  }

}

Hopefully this will be integrated into Drupal Commerce in the near future, but for now this is the only way.

Edit You can read up on the actual issue here https://www.drupal.org/node/2842280

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.