fix insert product customs
This commit is contained in:
parent
89f72c7045
commit
83bd4d15c3
@ -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):'').'"
|
||||
');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user