[-] Core: Fix PSCFV-3161 storage specific prices in orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16432 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
d5dfb4cfdb
commit
30ea30c6f4
2 files changed
+7
-5
No files matched your search
@@ -295,16 +295,16 @@ class SpecificPriceCore extends ObjectModel
|
|||||||
');
|
');
|
||||||
|
|
||||||
$targeted_prices = array();
|
$targeted_prices = array();
|
||||||
$last_quantity = null;
|
$last_quantity = array();
|
||||||
|
|
||||||
foreach ($res as $specific_price)
|
foreach ($res as $specific_price)
|
||||||
{
|
{
|
||||||
if (!isset($last_quantity))
|
if (!isset($last_quantity[(int)$specific_price['id_product_attribute']]))
|
||||||
$last_quantity = $specific_price['from_quantity'];
|
$last_quantity[(int)$specific_price['id_product_attribute']] = $specific_price['from_quantity'];
|
||||||
else if ($last_quantity == $specific_price['from_quantity'])
|
elseif ($last_quantity[(int)$specific_price['id_product_attribute']] == $specific_price['from_quantity'])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
$last_quantity = $specific_price['from_quantity'];
|
$last_quantity[(int)$specific_price['id_product_attribute']] = $specific_price['from_quantity'];
|
||||||
if ($specific_price['from_quantity'] > 1)
|
if ($specific_price['from_quantity'] > 1)
|
||||||
$targeted_prices[] = $specific_price;
|
$targeted_prices[] = $specific_price;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -424,6 +424,8 @@ class OrderDetailCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
$this->reduction_amount = 0.00;
|
$this->reduction_amount = 0.00;
|
||||||
$this->reduction_percent = 0.00;
|
$this->reduction_percent = 0.00;
|
||||||
|
$this->reduction_amount_tax_incl = 0.00;
|
||||||
|
$this->reduction_amount_tax_excl = 0.00;
|
||||||
|
|
||||||
if ($this->specificPrice)
|
if ($this->specificPrice)
|
||||||
switch ($this->specificPrice['reduction_type'])
|
switch ($this->specificPrice['reduction_type'])
|
||||||
|
|||||||
Reference in new issue
Block a user