Merge branch 'ticket-12957-BugCustoms' into develop

This commit is contained in:
Marion Muszynski 2017-04-07 10:22:40 +02:00
commit 946eec61cd

View File

@ -801,17 +801,18 @@ class AdminImport extends AdminTab
}
else
{
if((isset($product->nc8) && $product->nc8)
|| (isset($product->origin_country_id) && $product->origin_country_id)) {
// @Add Antadis
if((isset($product->nc8) && $product->nc8) || (isset($product->origin_country_id) && $product->origin_country_id)) {
Db::getInstance()->ExecuteS('
INSERT INTO `'._DB_PREFIX_.'product_customs`
VALUES (
'.(int) $product->id.',
"'.pSQL($product->nc8).'",
"'. pSQL($product->origin_country_id).'"
"'.((isset($product->nc8) && $product->nc8)?pSQL($product->nc8):'').'",
"'.((isset($product->origin_country_id) && $product->origin_country_id)?pSQL($product->origin_country_id):'').'",
0
)
ON DUPLICATE KEY UPDATE `nc8` = "'.pSQL($product->nc8).'",
`id_country` = "'.pSQL($product->origin_country_id).'"
ON DUPLICATE KEY UPDATE `nc8` = "'.((isset($product->nc8) && $product->nc8)?pSQL($product->nc8):'').'",
`id_country` = "'.((isset($product->origin_country_id) && $product->origin_country_id)?pSQL($product->origin_country_id):'').'"
');
}