diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index d68143a5..c5595cb1 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -1638,8 +1638,8 @@ }, "import-product.php": { "type": "-", - "size": 32213, - "lmtime": 1749162688552, + "size": 32611, + "lmtime": 1749496861877, "modified": false }, "index.php": { diff --git a/import-product.php b/import-product.php index d38d2ed8..865ba428 100644 --- a/import-product.php +++ b/import-product.php @@ -78,6 +78,9 @@ foreach ( $products_array as $product ) foreach ( $product['combinations'] as $combination ) { + if ( empty( $combination['ean'] ) ) + continue; + $sql_combination = 'UPDATE `' . _DB_PREFIX_ . 'product_attribute` SET `price` = ' . (float)$combination['price'] . ' WHERE `reference` = \'' . pSQL($combination['ean']) . '\''; $result_combination = Db::getInstance()->execute($sql_combination);