2

How do I add input fields to the commerce products (in Drupal 8) in order to save the information of those fields when the user purchases the product?

For example, if I want to sell t-shirts I would like an extra field to add some text and print it in the t-shirt.

4

Instead of adding the field to the product, consider adding the field to order items.

Then make it available in 'manage form display' -> 'add to cart'.

in Drupal 7 this functionality was provided by Commerce customizable Products module, now it has been moved into Commerce 2.x itself.

1

You can add fields to products by following this path: Commerce -> Configuration -> Product Types (/admin/commerce/config/product-types). Then choose Manage Fields for the relevant product type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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