[-] BO: Fix PSCFV-3186
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16422 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -229,7 +229,7 @@ class SpecificPriceCore extends ObjectModel
|
|||||||
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
|
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
|
||||||
)
|
)
|
||||||
AND id_cart IN (0, '.(int)$id_cart.')'.
|
AND id_cart IN (0, '.(int)$id_cart.')'.
|
||||||
(($real_quantity != 0 && !Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION')) ? ' AND `from_quantity` <= IF(id_product_attribute=0,'.(int)$quantity.' ,'.(int)$real_quantity.')' : 'AND `from_quantity` <= '.(int)$real_quantity).'
|
(($real_quantity != 0 && !Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION')) ? ' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= IF(id_product_attribute=0,'.(int)$quantity.' ,'.(int)$real_quantity.')' : 'AND `from_quantity` <= '.(int)$real_quantity).'
|
||||||
ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC');
|
ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC');
|
||||||
}
|
}
|
||||||
return self::$_specificPriceCache[$key];
|
return self::$_specificPriceCache[$key];
|
||||||
|
|||||||
@@ -257,15 +257,16 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
|
|||||||
'class' => 'button'
|
'class' => 'button'
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if ($value = $this->getFieldValue($this->object, 'price') != -1)
|
if (($value = $this->getFieldValue($this->object, 'price')) != -1)
|
||||||
$price = number_format($value, 2);
|
$price = number_format($value, 2);
|
||||||
else
|
else
|
||||||
$price = '';
|
$price = '';
|
||||||
|
|
||||||
$this->fields_value = array(
|
$this->fields_value = array(
|
||||||
'price' => $price,
|
'price' => $price,
|
||||||
'from_quantity' => (($value = $this->getFieldValue($this->object, 'from_quantity')) ? $value : 1),
|
'from_quantity' => (($value = $this->getFieldValue($this->object, 'from_quantity')) ? $value : 1),
|
||||||
'reduction' => number_format((($value = $this->getFieldValue($this->object, 'reduction')) ? $value : 0), 2),
|
'reduction' => number_format((($value = $this->getFieldValue($this->object, 'reduction')) ? $value : 0), 2),
|
||||||
'leave_bprice_on' => ($value = $this->getFieldValue($this->object, 'price')) ? $value : 1
|
'leave_bprice_on' => $price ? 0 : 1
|
||||||
);
|
);
|
||||||
|
|
||||||
$attribute_groups = array();
|
$attribute_groups = array();
|
||||||
|
|||||||
Reference in New Issue
Block a user