0

Is there a way I can create the capability for an admin to add a one-off product when creating an order through the admin interface? (For example, it could have a SKU of "CUSTOM" but we'd need the ability to enter a custom description that would show up in the line item in the receipt).

These are for customizations that are not available to the general public/only available if an admin enters them and would only be useful one time, so creating a full-fledged product for each one is not feasible.

I have done some testing with Commerce Customizable Products but it seems to allow customizable fields on the front end, but not in the admin "Add Order" screen where I need it.

1 Answer 1

1

The line item title in 1.x is derived from the line item type's title callback. Your simplest option is going to be to define a new line item type, as you've surmised, and have its title callback pull the value from a field you add to the line item type and expose to administrators to edit. Alternately you could edit the various Views to render this field directly ... but then you'd still need some way to allow creating ad hoc line items on the back end.

Sorry, I wish it were easier.

2
  • 1
    Thanks Ryan! I've had some success (perhaps enough to get me where I need to be on this particular project/issue) with this module: drupal.org/project/commerce_basic_line_item
    – Laryn
    Commented Feb 28, 2018 at 17:40
  • Awesome, didn't know that existed! : ) Commented Mar 1, 2018 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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