Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap
Conflicts: admin-dev/themes/default/css/admin.css admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl admin-dev/themes/default/template/controllers/categories/helpers/form/form.tpl admin-dev/themes/default/template/controllers/home/content.tpl admin-dev/themes/default/template/controllers/localization/content.tpl admin-dev/themes/default/template/controllers/orders/_customized_data.tpl admin-dev/themes/default/template/controllers/orders/_new_product.tpl admin-dev/themes/default/template/controllers/orders/_product_line.tpl admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl admin-dev/themes/default/template/footer.tpl controllers/admin/AdminCarrierWizardController.php controllers/admin/AdminCarriersController.php controllers/admin/AdminCmsController.php controllers/admin/AdminLocalizationController.php controllers/admin/AdminManufacturersController.php controllers/admin/AdminSuppliersController.php css/admin.css js/admin-products.js js/admin_carrier_wizard.js translations/fr.gzip
This commit is contained in:
@@ -2436,17 +2436,12 @@ class AdminImportControllerCore extends AdminController
|
||||
$discount_rate = (float)$info['discount_rate'];
|
||||
$tax_rate = (float)$info['tax_rate'];
|
||||
|
||||
// checks if one product is there only once
|
||||
if (isset($product['id_product']))
|
||||
{
|
||||
if ($product['id_product'] == $id_product_attribute)
|
||||
$this->errors[] = sprintf($this->l('Product (%d/%D) cannot be added twice (at line %d).'), $id_product,
|
||||
$id_product_attribute, $current_line + 1);
|
||||
else
|
||||
$product['id_product'] = $id_product_attribute;
|
||||
}
|
||||
// checks if one product/attribute is there only once
|
||||
if (isset($products[$id_product][$id_product_attribute]))
|
||||
$this->errors[] = sprintf($this->l('Product/Attribute (%d/%d) cannot be added twice (at line %d).'), $id_product,
|
||||
$id_product_attribute, $current_line + 1);
|
||||
else
|
||||
$product['id_product'] = 0;
|
||||
$products[$id_product][$id_product_attribute] = $quantity_expected;
|
||||
|
||||
// checks parameters
|
||||
if (false === ($supplier_reference = ProductSupplier::getProductSupplierReference($id_product, $id_product_attribute, $supply_order->id_supplier)))
|
||||
@@ -2659,6 +2654,13 @@ class AdminImportControllerCore extends AdminController
|
||||
Image::clearTmpDir();
|
||||
return true;
|
||||
}
|
||||
|
||||
public function clearSmartyCache()
|
||||
{
|
||||
Tools::enableCache();
|
||||
Tools::clearCache($this->context->smarty);
|
||||
Tools::restoreCacheSettings();
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
@@ -2716,10 +2718,12 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
case $this->entities[$import_type = $this->l('Categories')]:
|
||||
$this->categoryImport();
|
||||
$this->clearSmartyCache();
|
||||
break;
|
||||
case $this->entities[$import_type = $this->l('Products')]:
|
||||
$import_type = $this->l('Categories');
|
||||
$this->productImport();
|
||||
$this->clearSmartyCache();
|
||||
break;
|
||||
case $this->entities[$import_type = $this->l('Customers')]:
|
||||
$this->customerImport();
|
||||
@@ -2729,12 +2733,15 @@ class AdminImportControllerCore extends AdminController
|
||||
break;
|
||||
case $this->entities[$import_type = $this->l('Combinations')]:
|
||||
$this->attributeImport();
|
||||
$this->clearSmartyCache();
|
||||
break;
|
||||
case $this->entities[$import_type = $this->l('Manufacturers')]:
|
||||
$this->manufacturerImport();
|
||||
$this->clearSmartyCache();
|
||||
break;
|
||||
case $this->entities[$import_type = $this->l('Suppliers')]:
|
||||
$this->supplierImport();
|
||||
$this->clearSmartyCache();
|
||||
break;
|
||||
// @since 1.5.0
|
||||
case $this->entities[$import_type = $this->l('Supply Orders')]:
|
||||
|
||||
Reference in New Issue
Block a user