[-] CO : incorrect left join conditions in getTaxRules
This commit is contained in:
1 parent
42ee4cd8d9
commit
d6a6afd7cf
1 file changed
+2
-1
+2
-1
@@ -282,7 +282,7 @@ class CartCore extends ObjectModel
|
||||
SELECT *
|
||||
FROM `'._DB_PREFIX_.'cart_cart_rule` cd
|
||||
LEFT JOIN `'._DB_PREFIX_.'cart_rule` cr ON cd.`id_cart_rule` = cr.`id_cart_rule`
|
||||
LEFT JOIN `'._DB_PREFIX_.'cart_rule_lang` crl ON (cd.`id_cart_rule` = cr.`id_cart_rule` AND crl.id_lang = '.(int)$this->id_lang.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'cart_rule_lang` crl ON (cd.`id_cart_rule` = crl.`id_cart_rule` AND crl.id_lang = '.(int)$this->id_lang.')
|
||||
WHERE `id_cart` = '.(int)$this->id);
|
||||
|
||||
foreach ($result as &$row)
|
||||
@@ -1053,6 +1053,7 @@ class CartCore extends ObjectModel
|
||||
$result = $this->getCartRules();
|
||||
foreach (ObjectModel::hydrateCollection('CartRule', $result, Configuration::get('PS_LANG_DEFAULT')) AS $cartRule)
|
||||
$order_total_discount += Tools::ps_round($cartRule->getContextualValue($withTaxes));
|
||||
|
||||
$order_total_discount = min(Tools::ps_round($order_total_discount), $wrapping_fees + $order_total_products + $shipping_fees);
|
||||
$order_total -= $order_total_discount;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user