// Revert normalization
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8019 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -301,7 +301,7 @@ class Loyalty extends Module
|
||||
foreach ($order_states AS $order_state)
|
||||
{
|
||||
$html .= '<option value="' . $order_state['id_order_state'] . '" style="background-color:' . $order_state['color'] . ';"';
|
||||
if ((int)$this->loyaltyStateValidation->id_order_state == $order_state['id_order_state'] )
|
||||
if ((int)($this->loyaltyStateValidation->id_order_state) == $order_state['id_order_state'] )
|
||||
$html .= ' selected="selected"';
|
||||
$html .= '>' . $order_state['name'] . '</option>';
|
||||
}
|
||||
@@ -314,7 +314,7 @@ class Loyalty extends Module
|
||||
foreach ($order_states AS $order_state)
|
||||
{
|
||||
$html .= '<option value="' . $order_state['id_order_state'] . '" style="background-color:' . $order_state['color'] . ';"';
|
||||
if ((int)$this->loyaltyStateCancel->id_order_state == $order_state['id_order_state'] )
|
||||
if ((int)($this->loyaltyStateCancel->id_order_state) == $order_state['id_order_state'] )
|
||||
$html .= ' selected="selected"';
|
||||
$html .= '>' . $order_state['name'] . '</option>';
|
||||
}
|
||||
@@ -542,7 +542,7 @@ class Loyalty extends Module
|
||||
$loyalty->id_customer = (int)$params['customer']->id;
|
||||
$loyalty->id_order = (int)$params['order']->id;
|
||||
$loyalty->points = LoyaltyModule::getOrderNbPoints($params['order']);
|
||||
if (Configuration::get('PS_LOYALTY_NONE_AWARD') AND (int)$loyalty->points == 0)
|
||||
if ((int)(Configuration::get('PS_LOYALTY_NONE_AWARD')) AND (int)($loyalty->points) == 0)
|
||||
$loyalty->id_loyalty_state = LoyaltyStateModule::getNoneAwardId();
|
||||
else
|
||||
$loyalty->id_loyalty_state = LoyaltyStateModule::getDefaultId();
|
||||
@@ -567,13 +567,13 @@ class Loyalty extends Module
|
||||
{
|
||||
if (!Validate::isLoadedObject($loyalty = new LoyaltyModule(LoyaltyModule::getByOrderId($order->id))))
|
||||
return false;
|
||||
if (Configuration::get('PS_LOYALTY_NONE_AWARD') AND $loyalty->id_loyalty_state == LoyaltyStateModule::getNoneAwardId())
|
||||
if ((int)(Configuration::get('PS_LOYALTY_NONE_AWARD')) AND $loyalty->id_loyalty_state == LoyaltyStateModule::getNoneAwardId())
|
||||
return true;
|
||||
|
||||
if ($newOrder->id == $this->loyaltyStateValidation->id_order_state)
|
||||
{
|
||||
$loyalty->id_loyalty_state = LoyaltyStateModule::getValidationId();
|
||||
if ((int)$loyalty->points < 0)
|
||||
if ((int)($loyalty->points) < 0)
|
||||
$loyalty->points = abs((int)($loyalty->points));
|
||||
}
|
||||
elseif ($newOrder->id == $this->loyaltyStateCancel->id_order_state)
|
||||
|
||||
Reference in New Issue
Block a user