Merge branch 'ticket-fidelite' into develop
This commit is contained in:
commit
99316efe95
@ -510,7 +510,7 @@ class Loyalty extends Module
|
||||
foreach ($details AS $detail)
|
||||
{
|
||||
$orderDetail = Db::getInstance()->getRow('
|
||||
SELECT product_price * (1 + (tax_rate / 100)) price, product_quantity_discount, reduction_percent
|
||||
SELECT product_price * (1 + (tax_rate / 100)) price, product_quantity_discount, reduction_percent, id_order
|
||||
FROM '._DB_PREFIX_.'order_detail od
|
||||
WHERE id_order_detail = '.(int)($detail['id_order_detail']));
|
||||
|
||||
@ -521,8 +521,11 @@ class Loyalty extends Module
|
||||
$product_price = $price - $reduction;
|
||||
}
|
||||
$totalPrice += ($product_price * $detail['product_quantity']);
|
||||
if (!isset($id_order)) {
|
||||
$id_order = (int) $orderDetail['id_order'];
|
||||
}
|
||||
}
|
||||
$id_loyalty = LoyaltyModule::getByOrderId((int)($params['orderReturn']->id));
|
||||
$id_loyalty = LoyaltyModule::getByOrderId((int)$id_order);
|
||||
if ($id_loyalty) {
|
||||
$loyalty = new LoyaltyModule((int)$id_loyalty);
|
||||
$totalPrice = LoyaltyModule::getDiscountValueByPrice($totalPrice);;
|
||||
|
Loading…
Reference in New Issue
Block a user