Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
[-] MO : Proper negation of voucher discounts
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mcdado committed Dec 1, 2015
1 parent d923aed commit 2ed258b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mailalerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function hookActionValidateOrder($params)
$items_table .=
'<tr style="background-color:#EBECEE;">
<td colspan="4" style="padding:0.6em 0.4em; text-align:right;">'.$this->l('Voucher code:').' '.$discount['name'].'</td>
<td style="padding:0.6em 0.4em; text-align:right;">-'.Tools::displayPrice($discount['value'], $currency, false).'</td>
<td style="padding:0.6em 0.4em; text-align:right;">'.Tools::displayPrice(0 - $discount['value'], $currency, false).'</td>
</tr>';
}
if ($delivery->id_state)
Expand Down

0 comments on commit 2ed258b

Please sign in to comment.