In Ubercart, there is a little feature for adding "empty line items" to an admin created order. This allowed an admin to manually enter a custom title for the line item and a custom amount. Essentially allowing you to add line items without going through the process of creating a product first, then attaching it to the order. Very helpful for creating invoices for custom services. Is there any way I can get this feature in Drupal Commerce?

This is how it looks and works in Ubercart:

enter image description here

enter image description here

enter image description here


I've just created and submitted a module that might suit your needs. It is currently in sandbox. Let me know!


In Drupal Commerce, we made the decision to add line item type dependent callbacks to the line item API. A product line item will function differently from a shipping line item will function ... etc. As a side effect, this means there is no such thing as a "generic" line item, just like there is no such thing as a typeless node.

What needs to happen, if it doesn't already exist, is a small contrib module could be made that adds a basic line item type whose "line item add form" in the order edit page lets you specify all the information needed to manage and display that line item. Where it's gonna break down are things like pricing rules - should these line items have taxes? Should other discounts apply? Or display rules - should these show up on customer order pages?

There is no such feature in core (as you can see, it'd be a small contrib, but it wouldn't be trivial to make), but if it were tested and proved as a concept in contrib, I don't see why we couldn't consider it for inclusion in Commerce 2.x.

  • So, how does your Commerce Customizable Product module allow an admin to set whatever customizable items are need to the product when they adds it to an admin created order? Feb 8 '13 at 20:07
  • I just tried do this by creating a custom line item with Commerce Customizable Product. Then setting a textfield for user input (in theory this could be a description of the custom service). Then created a generic custom product. However it appears that adding the product to an admin created order reference the product entity and not the node display, therefore an admin cannot enter text into this field. Essentially it appears that if you have a customizable product then you cannot have something like a phone in order and let an admin create it. It must be done through the add to cart process. Feb 8 '13 at 20:25
  • Seems to me that the Line items field on the order entity should be a node reference, rather than a line item reference with a modified add to cart form. Feb 8 '13 at 20:27
  • any response to this? Feb 11 '13 at 22:21
  • I'm not sure what a node reference would be doing here - there's a line item entity, and that's what's being referenced. Commerce Customizable Products works by inheriting the callbacks from the core Product line item type. It lets you create new product line item types in cases where you need different line item types to contain different fields. The module itself doesn't define any of those callbacks or UI components; it just uses what's in the Product Reference module. Feb 12 '13 at 16:48

Maybe a workaround could be to create a generic product and use Commerce Customizable Products. Here is an excerpt about it from the module's project page:

Drupal Commerce allows you to sell customizable products that require customer input when added to the cart. Use cases for this functionality include:

  • Business cards that require contact information and a logo upload.
  • Event registrations that require attendee information.
  • Donations the allow the customer to specify a donation amount.

What do you think about?

  • This is as I suggested above in my comment to @Ryan Szrama however the customizable portion of the product is not exposed to an admin created order. Feb 10 '13 at 23:39

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.