[-] MO : #PSFV-532 - Fix bug on the module Loyalty - "points" are not upgrading on changing combination

This commit is contained in:
mDeflotte
2012-02-17 13:36:29 +00:00
parent 8a53019e6c
commit c32c7c9dd3
4 changed files with 52 additions and 6 deletions
+3 -2
View File
@@ -449,7 +449,7 @@ class Loyalty extends Module
$points = 0;
$this->smarty->assign('no_pts_discounted', 1);
}
else
else
$points = (int)(LoyaltyModule::getNbPointsByPrice($product->getPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? false : true, (int)($product->getIdProductAttributeMostExpensive()))));
$pointsAfter = $points;
$pointsBefore = 0;
@@ -460,7 +460,8 @@ class Loyalty extends Module
'point_rate' => Configuration::get('PS_LOYALTY_POINT_RATE'),
'point_value' => Configuration::get('PS_LOYALTY_POINT_VALUE'),
'points_in_cart' => (int)$pointsBefore,
'voucher' => LoyaltyModule::getVoucherValue((int)$pointsAfter)));
'voucher' => LoyaltyModule::getVoucherValue((int)$pointsAfter),
'none_award' => Configuration::get('PS_LOYALTY_NONE_AWARD')));
return $this->display(__FILE__, 'product.tpl');
}