[-] CORE : Fix bug last part #PSCFV-8636, cart rule with a reduction and free shipping

This commit is contained in:
gRoussac
2013-04-16 18:56:00 +02:00
parent d6b1ae8877
commit 27212bd126
4 changed files with 14 additions and 7 deletions
+3 -2
View File
@@ -429,13 +429,14 @@ abstract class PaymentModuleCore extends Module
// Set the new voucher value
if ($voucher->reduction_tax)
$voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt;
$voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt - $order->total_shipping_tax_incl;
else
$voucher->reduction_amount = $values['tax_excl'] - $order->total_products;
$voucher->reduction_amount = $values['tax_excl'] - $order->total_products - $order->total_shipping_tax_excl;
$voucher->id_customer = $order->id_customer;
$voucher->quantity = 1;
$voucher->quantity_per_user = 1;
$voucher->free_shipping = 0;
if ($voucher->add())
{
// If the voucher has conditions, they are now copied to the new voucher