Tags/topics: 
2
Answers
Vote up!
0
Vote down!

Where to put custom fields: Product type or product display content type?

I'm still getting my head wrapped around Drupal Commerce.

When I need to add custom fields (like taxonomy or tags describing a product), is it better to put the field in the product type (admin/commerce/products/types) or in the product display content type (admin/structure/types)?

I know the answer is going to be "it depends" so let me give you a few scenarios.

Suppose I have one product type ("Product") that covers a wide variety of widgets.

Now suppose I have several product types ("T-Shirts", "Robots" and "Telephones").

How does this change where the custom fields go?

Thanks.

Asked by: dpearceMN
on January 14, 2013

2 Answers

Vote up!
1
Vote down!

This is confusing at first, but ultimately the answer is pretty simple. If the field data will affect the price (obviously) or is a product variation choice (e.g., size, color etc) which may not affect price but is necessary to fulfill the order the field belongs on the product type. All other fields belong on the product display.

Answer by: drupalability
Posted: Jan 18, 2013
Vote up!
1
Vote down!

Hi dpearceMN!

You will get the answer here:
http://www.drupalcommerce.org/commerce-kickstart-2/adding-new-product

There you can read:
"The trick is now determining whether you want your fields to be on the Product Variations (things that change the price) or if you want to add fields to the Product Display (things that singularly describe the group of products for each URL)."

Answer by: Jörg
Posted: Jan 16, 2013