[PATCH] Coupon discount is displayed without '-' in the cart

Started by reinhold, December 21, 2012, 01:13:30 AM

Previous topic - Next topic

reinhold

If you have a coupon discount in the cart, the amount will be displayed without a leading minus sign, making it look like the amount is added rather than subtracted from the total.
Attached is a patch (for svn trunk) that creates the displayed coupon discount from the negative value. (Additionally, the invoice view prepended the string '- ', which will break if you have negative coupons, like an extra donation you can make to a charity by giving a particular coupon code. So the patch changed this to displaying the negative amount.)

The only thing I don't like about my patch is the explicit "-" prepended to the coupon description. It might not be strictly necessary, but IMO it looks better to have "String trio (-20%)" rather than "String trio (20%)", since the latter might not indicate it's a discount and not an additional fee.

Cheers,
Reinhold


[attachment cleanup by admin]

Bigitybossman

Thanks Reinhold for your help.

I didn't use the file completely, but i did take bits of it and it solved the problem for me.

Cheers