From a185c6e99472f911fe446eaa0092a81195f8b43f Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Mon, 9 Jun 2025 23:32:33 +0200 Subject: [PATCH] =?UTF-8?q?Dodano=20sprawdzenie,=20aby=20pomin=C4=85=C4=87?= =?UTF-8?q?=20kombinacje=20produkt=C3=B3w=20bez=20kodu=20EAN=20podczas=20a?= =?UTF-8?q?ktualizacji=20cen=20w=20funkcji=20importu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/ftp-kr.sync.cache.json | 8 ++++---- import-product.php | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index 35c13787..863cd04c 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -11,13 +11,13 @@ }, "1_index_sitemap.xml": { "type": "-", - "size": 460, + "size": 234, "lmtime": 0, "modified": true }, "1_pl_0_sitemap.xml": { "type": "-", - "size": 261664, + "size": 2903247, "lmtime": 0, "modified": true }, @@ -2541,8 +2541,8 @@ }, "import-product.php": { "type": "-", - "size": 32215, - "lmtime": 1749162948207, + "size": 32613, + "lmtime": 1749496641396, "modified": false }, "index.php": { diff --git a/import-product.php b/import-product.php index f81a7721..e557d334 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);