A client wants a coupon code that provides a 30% discount on the products MSRP. Currently, the site's products display the MSRP (crossed out) with the actual price next to them. They want the user to see that the 30% discount from the coupon is taken from the MSRP in the cart.

Is there some way to have this display in the cart?

Thank you.
Joe

Comments

wodenx’s picture

Let me understand: on the product page, it is being displayed whether or not a coupon is applied, but you want it to be displayed in the cart only if a coupon is applied, is that correct?
Currently coupons are applied as line items, not alterations to prices, so there's no build in way to do this. Your best bet at the moment would be to implement hook_entity_view for cart items and check whether the coupon in question is in the list returned by uc_coupon_session_validate(), but you'll have to implement your own UI if you want this to be configurable by the store admin.

pkchoo’s picture

Thank you for your reply. Yeah, I figured it would be something like that. Thanks again.