The coupon value column in the checkout pane is not user friendly. It has a label and then a decimal representation of a percentage. Much better for it just to say "10% off" - and at least if we're talking to end users, we should always convert those decimals to percentage strings. Otherwise it can look like 10 cents off even if the label says "Percentage."

I'd just get rid of the label altogether and make it the concise "10% off" or perhaps "10% off the order" if you need to differentiate it against a percentage off a specific product.

CommentFileSizeAuthor
coupon-value-fix-1.png115.74 KBrszrama
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Issue summary: View changes
pcambra’s picture

Shall we add some label callback calculation in the coupon entity? maybe something like "[Type] coupon added: [discount label]" that would be "Order coupon added: 10% off"

rszrama’s picture

I'm not sure I have a strong recommendation. You could always make it a configurable part of the coupon entity or even just use the same string you use for the price component type. fwiw, Dan has implemented a temporary solution for use on a current site, but I think this is still an open issue.

dpolant’s picture

Take a look at commerce_coupon_commerce_coupon_discount_value_display_alter - this is how the labels get set and can be overridden. I just committed a fix that cleans up this display. Originally it was using field_view_field which was why the "percentage" label kept showing up. Now it just formats a string which seems better because there is no UI for people to customize Discount offer fields anyway.

I like the idea of using callbacks instead of an alter hook for this though. I may try that approach. Still would like some feedback on the value description updates though.

http://drupalcode.org/project/commerce_coupon.git/commit/0ec43f5