[-] BO : PSFV-365 - fixed bug
This commit is contained in:
@@ -157,7 +157,7 @@ class SpecificPriceCore extends ObjectModel
|
|||||||
public static function getPriority($id_product)
|
public static function getPriority($id_product)
|
||||||
{
|
{
|
||||||
if (!self::isFeatureActive())
|
if (!self::isFeatureActive())
|
||||||
return Configuration::get('PS_SPECIFIC_PRICE_PRIORITIES');
|
return explode(';', Configuration::get('PS_SPECIFIC_PRICE_PRIORITIES'));
|
||||||
|
|
||||||
if (!isset(self::$_cache_priorities[(int)$id_product]))
|
if (!isset(self::$_cache_priorities[(int)$id_product]))
|
||||||
{
|
{
|
||||||
@@ -174,6 +174,7 @@ class SpecificPriceCore extends ObjectModel
|
|||||||
if (!$priority)
|
if (!$priority)
|
||||||
$priority = Configuration::get('PS_SPECIFIC_PRICE_PRIORITIES');
|
$priority = Configuration::get('PS_SPECIFIC_PRICE_PRIORITIES');
|
||||||
$priority = 'id_customer;'.$priority;
|
$priority = 'id_customer;'.$priority;
|
||||||
|
|
||||||
return preg_split('/;/', $priority);
|
return preg_split('/;/', $priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2591,7 +2591,6 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
), $this->context->currency
|
), $this->context->currency
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($combinations as &$combination)
|
foreach ($combinations as &$combination)
|
||||||
$combination['attributes'] = rtrim($combination['attributes'], ' - ');
|
$combination['attributes'] = rtrim($combination['attributes'], ' - ');
|
||||||
$data->assign('specificPriceModificationForm', $this->_displaySpecificPriceModificationForm(
|
$data->assign('specificPriceModificationForm', $this->_displaySpecificPriceModificationForm(
|
||||||
@@ -2611,7 +2610,6 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
$this->displayWarning($this->l('You must save this product before adding specific prices'));
|
$this->displayWarning($this->l('You must save this product before adding specific prices'));
|
||||||
|
|
||||||
// prices part
|
// prices part
|
||||||
$data->assign('link', $this->context->link);
|
$data->assign('link', $this->context->link);
|
||||||
$data->assign('currency', $currency = $this->context->currency);
|
$data->assign('currency', $currency = $this->context->currency);
|
||||||
@@ -2619,24 +2617,20 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$data->assign('taxesRatesByGroup', TaxRulesGroup::getAssociatedTaxRatesByIdCountry($this->context->country->id));
|
$data->assign('taxesRatesByGroup', TaxRulesGroup::getAssociatedTaxRatesByIdCountry($this->context->country->id));
|
||||||
$data->assign('ecotaxTaxRate', Tax::getProductEcotaxRate());
|
$data->assign('ecotaxTaxRate', Tax::getProductEcotaxRate());
|
||||||
$data->assign('tax_exclude_taxe_option', Tax::excludeTaxeOption());
|
$data->assign('tax_exclude_taxe_option', Tax::excludeTaxeOption());
|
||||||
|
|
||||||
$data->assign('ps_use_ecotax', Configuration::get('PS_USE_ECOTAX'));
|
$data->assign('ps_use_ecotax', Configuration::get('PS_USE_ECOTAX'));
|
||||||
if ($product->unit_price_ratio != 0)
|
if ($product->unit_price_ratio != 0)
|
||||||
$data->assign('unit_price', Tools::ps_round($product->price / $product->unit_price_ratio, 2));
|
$data->assign('unit_price', Tools::ps_round($product->price / $product->unit_price_ratio, 2));
|
||||||
else
|
else
|
||||||
$data->assign('unit_price', 0);
|
$data->assign('unit_price', 0);
|
||||||
|
|
||||||
$data->assign('ps_tax', Configuration::get('PS_TAX'));
|
$data->assign('ps_tax', Configuration::get('PS_TAX'));
|
||||||
|
|
||||||
$data->assign('country_display_tax_label', $this->context->country->display_tax_label);
|
$data->assign('country_display_tax_label', $this->context->country->display_tax_label);
|
||||||
|
|
||||||
$unities = array(
|
$unities = array(
|
||||||
'PS_WEIGHT_UNIT' => Configuration::get('PS_WEIGHT_UNIT'),
|
'PS_WEIGHT_UNIT' => Configuration::get('PS_WEIGHT_UNIT'),
|
||||||
'PS_DISTANCE_UNIT' => Configuration::get('PS_DISTANCE_UNIT'),
|
'PS_DISTANCE_UNIT' => Configuration::get('PS_DISTANCE_UNIT'),
|
||||||
'PS_VOLUME_UNIT' => Configuration::get('PS_VOLUME_UNIT'),
|
'PS_VOLUME_UNIT' => Configuration::get('PS_VOLUME_UNIT'),
|
||||||
'PS_DIMENSION_UNIT' => Configuration::get('PS_DIMENSION_UNIT')
|
'PS_DIMENSION_UNIT' => Configuration::get('PS_DIMENSION_UNIT')
|
||||||
);
|
);
|
||||||
|
|
||||||
$data->assign(array(
|
$data->assign(array(
|
||||||
'currency', $this->context->currency,
|
'currency', $this->context->currency,
|
||||||
'product' => $product,
|
'product' => $product,
|
||||||
@@ -2895,7 +2889,8 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
';
|
';
|
||||||
|
|
||||||
// Not use id_customer
|
// Not use id_customer
|
||||||
unset($specific_price_priorities[0]);
|
if ($specific_price_priorities[0] == 'id_customer')
|
||||||
|
unset($specific_price_priorities[0]);
|
||||||
sort($specific_price_priorities);
|
sort($specific_price_priorities);
|
||||||
$content .= '
|
$content .= '
|
||||||
<div class="separation"></div>
|
<div class="separation"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user