Merge branch 'ticket-fidelite' into develop

This commit is contained in:
Marion Muszynski 2016-04-22 15:24:40 +02:00
commit 5764cda5b6

View File

@ -615,10 +615,10 @@ class Loyalty extends Module
die(Tools::displayError('Incorrect object Customer.'));
$details = LoyaltyModule::getAllByIdCustomer((int)$params['id_customer'], (int)$params['cookie']->id_lang);
$valid_orders = LoyaltyModule::getAllByIdCustomerCustom((int)$params['id_customer'], (int)$params['cookie']->id_lang, true, false, $nb = 10, $page = 1, false);
//$valid_orders = LoyaltyModule::getAllByIdCustomerCustom((int)$params['id_customer'], (int)$params['cookie']->id_lang, true, false, $nb = 10, $page = 1, false);
if (!empty($valid_orders)) {
$discount_value = LoyaltyModule::getVoucherValueByPercentOfOrder($valid_orders, (int)Configuration::get('PS_CURRENCY_DEFAULT'));
if (!empty($details)) {
$discount_value = LoyaltyModule::getVoucherValueByPercentOfOrder($details, (int)Configuration::get('PS_CURRENCY_DEFAULT'));
} else {
$discount_value = 0;
}