Let's assume we have one product with 2 product variations. Both the variations have 10 product attributes each; they are all filled with their option values, for example color = Blue, size = 10L, or height = 5.

How does the Commerce module decide which attributes are used for product variations on the product display page?

1 Answer 1


A product attribute in Drupal Commerce only ever refers to a field on the product type (Commerce 1.x) or product variation type (Commerce 2.x+) that differentiates one variation from another on a display. These fields are always explicitly declared - in Commerce 1.x using the checkbox on the field configuration and in Commerce 2.x using the attribute checkboxes on the product variation type configuration page. Only those explicitly declared fields will be used by the Add to Cart form for product variation selection.

You can add any additional fields to it that you want. They will only ever be used for display.

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.