Closed (won't fix)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Line item
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 May 2013 at 10:23 UTC
Updated:
13 May 2013 at 16:36 UTC
Currently the line item label will just get the SKU of the product it contains. I'm not entirely sure how that happens, but it does. And it happens in such a way that it cannot be influenced with Auto Entitylabel. Also, it doesn't seem that the line item entity label is really displayed anywhere to the user. The cart, for example, uses the title, not the label field. And I'm not even sure what exactly the title field is, as is doesn't seem to be defined in commerce_line_item_entity_info().
Comments
Comment #1
rszrama commentedThe line item title is generated by a callback on the line item type (see commerce_line_item.api.php) and can include HTML. The line item label for product line items is generated by commerce_product_line_item_new(). You could alter the line item before it gets saved if you want. I don't know how Auto Entitylabel works, but I don't see us adding support for it - in the case of Commerce Line Items, I'd prefer the modules in charge of them to be handling it.
Comment #2
a.ross commentedRight. Reason I was asking was for a workaround of an i18n issue, but I suppose using a translatable field as the title of the product instead is better. And if someone ever starts the i18n_commerce project, then editing the title in a callback shouldn't be an issue :)