Merge branch 'ticket-fidelite' into develop
This commit is contained in:
commit
82882a9b5b
@ -520,7 +520,6 @@ class Loyalty extends Module
|
|||||||
if ($id_loyalty) {
|
if ($id_loyalty) {
|
||||||
$loyalty = new LoyaltyModule((int)$id_loyalty);
|
$loyalty = new LoyaltyModule((int)$id_loyalty);
|
||||||
$loyalty->discount_value = LoyaltyModule::getDiscountValueByPrice($totalPrice);
|
$loyalty->discount_value = LoyaltyModule::getDiscountValueByPrice($totalPrice);
|
||||||
echo "<pre>";var_dump('hookorderreturn',$loyalty->discount_value);echo "</pre>";die();
|
|
||||||
if ($loyalty->discount_value<=0) {
|
if ($loyalty->discount_value<=0) {
|
||||||
$loyalty->id_loyalty_state = (int)LoyaltyStateModule::getCancelId();
|
$loyalty->id_loyalty_state = (int)LoyaltyStateModule::getCancelId();
|
||||||
}
|
}
|
||||||
@ -680,7 +679,7 @@ class Loyalty extends Module
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$price = (number_format($orderDetail->product_price * (1 + $orderDetail->tax_rate / 100), 2, '.', '') * ($orderDetail->product_quantity - $orderDetail->product_quantity_refunded));
|
$price = ($params['order']->total_paid - $params['order']->total_shipping) - (number_format($orderDetail->product_price * (1 + $orderDetail->tax_rate / 100), 2, '.', '') * ($orderDetail->product_quantity - $orderDetail->product_quantity_refunded));
|
||||||
if ($price>0) {
|
if ($price>0) {
|
||||||
$loyalty->discount_value = LoyaltyModule::getDiscountValueByPrice($price);
|
$loyalty->discount_value = LoyaltyModule::getDiscountValueByPrice($price);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user