Active
Project:
Commerce Coupon (D7)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 May 2012 at 07:37 UTC
Updated:
16 Oct 2015 at 03:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pcambraWeird, the label of the line item should be type + coupon code, not just the type.
I think all these issues would be solved by adding a label to coupon entities.
Comment #2
jonathan_hunt commentedI see code in commerce_coupon_line_item_new() that defines a line item label as
but it doesn't look like this label is used anywhere. All instances of Percentage coupon in cart and order simply appear as "Percentage coupon".
Comment #3
arbel commentedI don't see why type is important, I agree a label is a great option, but the user wouldn't normally care what technical type of coupon it is, as long as he gets the discount he expects.
Idan
Comment #4
ericaack commentedActually, I think it's very important to show the coupon name in the admin order view. We need to be able to track which coupon was applied to which order. Some coupons, for example, are paid for out of one scholarship fund, some out of another. I would think that commercial sites would also want to be able to view this information easily.
Thanks for your work on this.
Comment #5
arbel commentedI agree that the copuon code or a label you use to identify the coupon should be displayed, but the type is just based on how the module is built and has nothing to do with the coupon. i
Comment #6
pcambraHere's how the coupon line item title is generated:
http://drupalcode.org/project/commerce_coupon.git/blob/refs/heads/7.x-1....
Any improvements in that area are welcome
Comment #7
mglamanComment #8
mglamanScratch my previous statement, discover function was commerce_coupon_commerce_price_component_type_info(). Here is my patch, uses entity_metadata_wrapper() to get coupon code and use as display title.
Attached is my patch and before/after screenshots.
Comment #9
finex commentedThe patch works fine. Thanks.
Comment #10
loze commentedyou can do this without a patch using hook_commerce_price_component_type_info_alter() in a custom module