From db40cef900dee49fae1b47131181a701352fdf4e Mon Sep 17 00:00:00 2001 From: David Gasperoni Date: Tue, 1 Dec 2015 21:58:09 +0100 Subject: [PATCH] MO: Correct negation of voucher discounts Besides being more elegant and correct, this way enables developers to create custom behaviors with Cart Rules, where instead of offering discounts, they could increase the price. However, this change will not effect anybody else. See for example these screenshots: http://cl.ly/image/0e0g2D1u0Y45 (before) http://cl.ly/image/3b020a303N2v (after) You can see how now the normal case is still a normal minus, while with our custom built override we have a positive value, that is they way it's meant to be. --- mailalerts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailalerts.php b/mailalerts.php index 3b31064..7948b01 100644 --- a/mailalerts.php +++ b/mailalerts.php @@ -325,7 +325,7 @@ public function hookActionValidateOrder($params) $items_table .= ' '.$this->l('Voucher code:').' '.$discount['name'].' - -'.Tools::displayPrice($discount['value'], $currency, false).' + '.Tools::displayPrice(0 - $discount['value'], $currency, false).' '; } if ($delivery->id_state)