// Fix #PSCFV-4676
This commit is contained in:
+3
-2
@@ -2488,8 +2488,8 @@ class ProductCore extends ObjectModel
|
|||||||
|
|
||||||
if ($context == null)
|
if ($context == null)
|
||||||
$context = Context::getContext()->cloneContext();
|
$context = Context::getContext()->cloneContext();
|
||||||
|
|
||||||
if ($context->shop->id != (int)$id_shop)
|
if ($id_shop !== null && $context->shop->id != (int)$id_shop)
|
||||||
$context->shop = new Shop((int)$id_shop);
|
$context->shop = new Shop((int)$id_shop);
|
||||||
|
|
||||||
if (!$use_customer_price)
|
if (!$use_customer_price)
|
||||||
@@ -2533,6 +2533,7 @@ class ProductCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
$sql->select('0 as id_product_attribute');
|
$sql->select('0 as id_product_attribute');
|
||||||
|
|
||||||
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||||
|
|
||||||
foreach ($res as $row)
|
foreach ($res as $row)
|
||||||
|
|||||||
@@ -329,6 +329,7 @@ class WebserviceRequestCore
|
|||||||
$arr_return = array();
|
$arr_return = array();
|
||||||
foreach($parameters as $name => $value)
|
foreach($parameters as $name => $value)
|
||||||
{
|
{
|
||||||
|
$id_shop = (int)Context::getContext()->shop->id;
|
||||||
$id_country = (int)(isset($value['country']) ? $value['country'] : (Configuration::get('PS_COUNTRY_DEFAULT')));
|
$id_country = (int)(isset($value['country']) ? $value['country'] : (Configuration::get('PS_COUNTRY_DEFAULT')));
|
||||||
$id_state = (int)(isset($value['state']) ? $value['state'] : 0);
|
$id_state = (int)(isset($value['state']) ? $value['state'] : 0);
|
||||||
$id_currency = (int)(isset($value['currency']) ? $value['currency'] : Configuration::get('PS_CURRENCY_DEFAULT'));
|
$id_currency = (int)(isset($value['currency']) ? $value['currency'] : Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||||
@@ -344,7 +345,7 @@ class WebserviceRequestCore
|
|||||||
$use_ecotax = (int)(isset($value['use_ecotax']) ? $value['use_ecotax'] : Configuration::get('PS_USE_ECOTAX'));
|
$use_ecotax = (int)(isset($value['use_ecotax']) ? $value['use_ecotax'] : Configuration::get('PS_USE_ECOTAX'));
|
||||||
$specific_price_output = null;
|
$specific_price_output = null;
|
||||||
$id_county = (isset($value['county']) ? $value['county'] : 0);
|
$id_county = (isset($value['county']) ? $value['county'] : 0);
|
||||||
$return_value = Product::priceCalculation(null, $value['object_id'], $id_product_attribute, $id_country, $id_state, $id_county, $id_currency, $id_group, $quantity,
|
$return_value = Product::priceCalculation($id_shop, $value['object_id'], $id_product_attribute, $id_country, $id_state, $id_county, $id_currency, $id_group, $quantity,
|
||||||
$use_tax, $decimals, $only_reduc, $use_reduc, $use_ecotax, $specific_price_output, null);
|
$use_tax, $decimals, $only_reduc, $use_reduc, $use_ecotax, $specific_price_output, null);
|
||||||
$arr_return[$name] = array('sqlId'=>strtolower($name), 'value'=>$return_value);
|
$arr_return[$name] = array('sqlId'=>strtolower($name), 'value'=>$return_value);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user