Line Items

The line items allow us to capture user input at the time of purchase. There are several ways to do this. I am using a module called "Commerce Customizable Product." This is Ryan Szrama's preferred approach to line items.

The use cases for this include business cards, registrations, and donations. We are using it to capture information from the user about meals and name tags.

The core Line Item module accommodates these scenarios by letting you add any number of fields to the Product line item type and expose them to the Add to Cart form. However, sites that sell multiple types of customizable products or a mixture of customizable and non-customizable products need to define multiple line item types to handle the different configurations of fields. That's where this Customizable Products module comes in!

It gives you the ability to define new line item types on the fly at Administration > Store > Configuration > Line item types. This is functionally equivalent to defining the new line item type in code, which is still recommended if you are able (see below). (rszrma)

So if we navigate to Administration > Store > Configuration > Line item types we can see the line items created there. Then, when we look at our product display content types, we see that are allowed to expose these new line items to the Add to cart form.