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

Providing extra input fields to customers in add-to-cart form

We would like to allow customers of the shop to add a comment or other details in editable fields for some of the products before they add them to the shopping cart.

What is the best way to go about that? I'm happy to develop a module for that, but need some guidance on where to get started.

The data provided by the customer should of course be stored together with the ordered product so that is can be display in the cart and later in the order history.

Shouldn't be too hard but I tried all day and couldn't find a working approach. Hopefully someonw can give me some hints?

Asked by: jurgenhaas
on December 17, 2013

1 Answer

Vote up!
1
Vote down!

Jurgen,

Saw you in #drupal-commerce but you left before I could answer your question :) Glad you put it here on dc.org!

This is a pretty simple request if you know what to look for Drupal Commerce. What you want to do is either add a field to the Order or add a field to the Line Item.

Video that shows you how to add a line item field:

http://www.drupalcommerce.org/videos/demo/introduction-line-item-fields

Video that show you how to add a field to an order:

http://www.drupalcommerce.org/videos/commerce-module-tuesday/commerce-fi...

Josh Miller
Answer by: Josh Miller
Posted: Dec 17, 2013

Comments