[-] BO : fix #PSCFV-4672
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17719 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -259,7 +259,7 @@
|
|||||||
else
|
else
|
||||||
$(".import_products_categories").hide();
|
$(".import_products_categories").hide();
|
||||||
|
|
||||||
if ($("#entity > option:selected").val() == 0 || $("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 3)
|
if ($("#entity > option:selected").val() == 0 || $("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 3 || $("#entity > option:selected").val() == 5 || $("#entity > option:selected").val() == 6)
|
||||||
$("label[for=forceIDs],#forceIDs").show();
|
$("label[for=forceIDs],#forceIDs").show();
|
||||||
else
|
else
|
||||||
$("label[for=forceIDs],#forceIDs").hide();
|
$("label[for=forceIDs],#forceIDs").hide();
|
||||||
|
|||||||
@@ -2124,10 +2124,16 @@ class AdminImportControllerCore extends AdminController
|
|||||||
|
|
||||||
AdminImportController::setDefaultValues($info);
|
AdminImportController::setDefaultValues($info);
|
||||||
|
|
||||||
if (array_key_exists('id', $info) && (int)$info['id'] && Manufacturer::existsInDatabase((int)$info['id'], 'manufacturer'))
|
if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id'])
|
||||||
$manufacturer = new Manufacturer((int)$info['id']);
|
$manufacturer = new Manufacturer((int)$info['id']);
|
||||||
else
|
else
|
||||||
$manufacturer = new Manufacturer();
|
{
|
||||||
|
if (array_key_exists('id', $info) && (int)$info['id'] && Manufacturer::existsInDatabase((int)$info['id'], 'manufacturer'))
|
||||||
|
$manufacturer = new Manufacturer((int)$info['id']);
|
||||||
|
else
|
||||||
|
$manufacturer = new Manufacturer();
|
||||||
|
}
|
||||||
|
|
||||||
AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $manufacturer);
|
AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $manufacturer);
|
||||||
|
|
||||||
$res = false;
|
$res = false;
|
||||||
@@ -2189,10 +2195,16 @@ class AdminImportControllerCore extends AdminController
|
|||||||
|
|
||||||
AdminImportController::setDefaultValues($info);
|
AdminImportController::setDefaultValues($info);
|
||||||
|
|
||||||
if (array_key_exists('id', $info) && (int)$info['id'] && Supplier::existsInDatabase((int)$info['id'], 'supplier'))
|
if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id'])
|
||||||
$supplier = new Supplier((int)$info['id']);
|
$supplier = new Supplier((int)$info['id']);
|
||||||
else
|
else
|
||||||
$supplier = new Supplier();
|
{
|
||||||
|
if (array_key_exists('id', $info) && (int)$info['id'] && Supplier::existsInDatabase((int)$info['id'], 'supplier'))
|
||||||
|
$supplier = new Supplier((int)$info['id']);
|
||||||
|
else
|
||||||
|
$supplier = new Supplier();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $supplier);
|
AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $supplier);
|
||||||
if (($field_error = $supplier->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
if (($field_error = $supplier->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||||
|
|||||||
Reference in New Issue
Block a user