Poprawa aktywacji produktów w funkcji importu oraz dodanie komunikatu z nazwą produktu podczas aktualizacji.

This commit is contained in:
2025-06-09 21:24:38 +02:00
parent b5f9c95108
commit 05ca1bb29b
2 changed files with 69 additions and 17 deletions

View File

@@ -944,7 +944,7 @@
"defines.inc.php": { "defines.inc.php": {
"type": "-", "type": "-",
"size": 8349, "size": 8349,
"lmtime": 1748937559417, "lmtime": 1749162914328,
"modified": false "modified": false
}, },
"defines_uri.inc.php": { "defines_uri.inc.php": {
@@ -2541,9 +2541,9 @@
}, },
"import-product.php": { "import-product.php": {
"type": "-", "type": "-",
"size": 147, "size": 32215,
"lmtime": 1748902490178, "lmtime": 1749162948207,
"modified": true "modified": false
}, },
"index.php": { "index.php": {
"type": "-", "type": "-",
@@ -7370,7 +7370,18 @@
"sql": {}, "sql": {},
"translations": {}, "translations": {},
"upgrade": {}, "upgrade": {},
"views": {} "views": {
"templates": {
"front": {
"notification.tpl": {
"type": "-",
"size": 2734,
"lmtime": 1749162914353,
"modified": false
}
}
}
}
}, },
"leoproductsearch": { "leoproductsearch": {
"views": { "views": {
@@ -8440,6 +8451,42 @@
} }
}, },
"checkout": { "checkout": {
"cart-empty.tpl": {
"type": "-",
"size": 1636,
"lmtime": 0,
"modified": false
},
"cart.tpl": {
"type": "-",
"size": 2775,
"lmtime": 0,
"modified": false
},
"checkout-process.tpl": {
"type": "-",
"size": 1156,
"lmtime": 0,
"modified": false
},
"checkout.tpl": {
"type": "-",
"size": 2697,
"lmtime": 0,
"modified": false
},
"index.php": {
"type": "-",
"size": 1279,
"lmtime": 0,
"modified": false
},
"order-confirmation.tpl": {
"type": "-",
"size": 4359,
"lmtime": 1749162914364,
"modified": false
},
"_partials": { "_partials": {
"address-form.tpl": { "address-form.tpl": {
"type": "-", "type": "-",
@@ -8485,8 +8532,8 @@
}, },
"cart-summary-product-line.tpl": { "cart-summary-product-line.tpl": {
"type": "-", "type": "-",
"size": 1805, "size": 2280,
"lmtime": 0, "lmtime": 1749162914361,
"modified": false "modified": false
}, },
"cart-summary-totals.tpl": { "cart-summary-totals.tpl": {
@@ -8539,8 +8586,8 @@
}, },
"order-confirmation-table.tpl": { "order-confirmation-table.tpl": {
"type": "-", "type": "-",
"size": 5090, "size": 5334,
"lmtime": 0, "lmtime": 1749162914362,
"modified": false "modified": false
}, },
"order-final-summary-table.tpl": { "order-final-summary-table.tpl": {
@@ -8570,14 +8617,14 @@
}, },
"dr_materac.css": { "dr_materac.css": {
"type": "-", "type": "-",
"size": 83967, "size": 84196,
"lmtime": 1748904409873, "lmtime": 1749162914356,
"modified": false "modified": false
}, },
"dr_materac.css.map": { "dr_materac.css.map": {
"type": "-", "type": "-",
"size": 31547, "size": 31637,
"lmtime": 1748904409874, "lmtime": 1749162914358,
"modified": false "modified": false
}, },
"dr_materac.css.sync-conflict-20231027-200011-EDGUH2C.map": { "dr_materac.css.sync-conflict-20231027-200011-EDGUH2C.map": {
@@ -8588,8 +8635,8 @@
}, },
"dr_materac.scss": { "dr_materac.scss": {
"type": "-", "type": "-",
"size": 100127, "size": 100452,
"lmtime": 1748904409875, "lmtime": 1749162914359,
"modified": false "modified": false
}, },
"dr_materac.sync-conflict-20231027-195749-EDGUH2C.css": { "dr_materac.sync-conflict-20231027-195749-EDGUH2C.css": {

View File

@@ -55,7 +55,7 @@ foreach ( $products_array as $product )
$price = 0; // jeśli są kombinacje, to cena jest 0 $price = 0; // jeśli są kombinacje, to cena jest 0
$reference = $product['ean']; $reference = $product['ean'];
$active = 0; // Ustawienie produktu jako nieaktywny $active = 1; // Ustawienie produktu jako nieaktywny
// table `materac_product` // table `materac_product`
if ( $reference ) if ( $reference )
@@ -68,7 +68,11 @@ foreach ( $products_array as $product )
{ {
$sql_shop = 'UPDATE `' . _DB_PREFIX_ . 'product_shop` SET `price` = ' . (float)$price . ', `active` = ' . (int)$active . ' WHERE `id_product` = ' . (int)$id['id_product']; $sql_shop = 'UPDATE `' . _DB_PREFIX_ . 'product_shop` SET `price` = ' . (float)$price . ', `active` = ' . (int)$active . ' WHERE `id_product` = ' . (int)$id['id_product'];
$result_shop = Db::getInstance()->execute($sql_shop); $result_shop = Db::getInstance()->execute($sql_shop);
echo "Zaktualizowano produkt z referencją $reference, id_product: " . $id['id_product'] . ", cena: $price, active: $active<br>";
// get prduct name
$product_name = Db::getInstance()->getValue('SELECT name FROM `' . _DB_PREFIX_ . 'product_lang` WHERE `id_product` = ' . (int)$id['id_product'] . ' AND id_shop = 1 AND `id_lang` = 7');
echo '<br>Aktualizacja produktu: ' . $product_name . ' (ID: ' . $id['id_product'] . ')<br>';
echo "Zaktualizowano produkt z referencją $reference, id_product: " . $id['id_product'] . ", cena: $price, active: $active, nazwa: $product_name<br>";
} }
} }
@@ -85,6 +89,7 @@ foreach ( $products_array as $product )
echo "Zaktualizowano kombinację z referencją " . $combination['ean'] . ", id_product_attribute: " . $id_combination['id_product_attribute'] . ", cena: " . $combination['price'] . "<br>"; echo "Zaktualizowano kombinację z referencją " . $combination['ean'] . ", id_product_attribute: " . $id_combination['id_product_attribute'] . ", cena: " . $combination['price'] . "<br>";
} }
} }
echo '----------------------------------------<br>';
} }
exit; exit;