Zaktualizowano identyfikatory producentów i wartości cech w skrypcie, zmieniono rozmiar plików konfiguracyjnych oraz dodano nowe ustawienia dla kompilacji SASS.

This commit is contained in:
2025-01-27 22:23:21 +01:00
parent ec0ab141fd
commit 07386b437d
6 changed files with 552 additions and 1334 deletions

View File

@@ -64,7 +64,7 @@
},
"custom-script.php": {
"type": "-",
"size": 1031,
"size": 1991,
"lmtime": 0,
"modified": true
},
@@ -98,7 +98,7 @@
},
"google-merchant_id-1.xml": {
"type": "-",
"size": 18352829,
"size": 18341303,
"lmtime": 0,
"modified": true
},

16
.vscode/settings.json vendored
View File

@@ -1,3 +1,17 @@
{
"git.ignoreLimitWarning": true
"liveSassCompile.settings.formats": [
{
"format": "compressed",
"extensionName": ".css",
"savePath": "",
"savePathSegmentKeys": null,
"savePathReplaceSegmentsWith": null
}
],
"liveSassCompile.settings.generateMap": true,
"liveSassCompile.settings.autoprefix": "defaults",
"liveSassCompile.settings.watchOnLaunch": true,
"liveSassCompile.settings.includeItems": [
"/themes/InterBlue/assets/css/custom.scss"
]
}

View File

@@ -6,11 +6,11 @@ require_once dirname(__FILE__) . '/config/config.inc.php';
require_once dirname(__FILE__) . '/init.php';
// ID producentów, których produkty mają zostać zaktualizowane
$manufacturerIds = [185];
$manufacturerIds = [186];
// ID cechy oraz jej wartości do przypisania
$featureId = 20;
$featureValueId = 19003;
$featureValueId = 19010;
// Pobierz produkty od wybranych producentów
$sql = '
@@ -21,39 +21,46 @@ $sql = '
$productIds = Db::getInstance()->executeS($sql);
if ($productIds) {
foreach ($productIds as $product) {
$productId = (int)$product['id_product'];
if ($productIds)
{
foreach ($productIds as $product)
{
$productId = (int)$product['id_product'];
// Sprawdź, czy cecha już istnieje dla produktu
$sqlCheck = '
// Sprawdź, czy cecha już istnieje dla produktu
$sqlCheck = '
SELECT id_feature
FROM ' . _DB_PREFIX_ . 'feature_product
WHERE id_product = ' . $productId . ' AND id_feature = ' . (int)$featureId . '
';
$featureExists = Db::getInstance()->getValue($sqlCheck);
$featureExists = Db::getInstance()->getValue($sqlCheck);
if (!$featureExists) {
// Przypisz cechę do produktu
$insert = '
if (!$featureExists)
{
// Przypisz cechę do produktu
$insert = '
INSERT INTO ' . _DB_PREFIX_ . 'feature_product (id_feature, id_product, id_feature_value)
VALUES (' . (int)$featureId . ', ' . $productId . ', ' . (int)$featureValueId . ')
';
Db::getInstance()->execute($insert);
Db::getInstance()->execute($insert);
echo 'Product ID: ' . $productId . " - Feature ID: $featureId - Feature Value ID: $featureValueId\n";
echo '<br>';
echo "Dodano cechę dla produktu ID: $productId\n";
echo '<br>';
} else {
echo "Produkt ID: $productId już posiada tę cechę\n";
echo '<br>';
}
echo 'Product ID: ' . $productId . " - Feature ID: $featureId - Feature Value ID: $featureValueId\n";
echo '<br>';
echo "Dodano cechę dla produktu ID: $productId\n";
echo '<br>';
}
} else {
echo "Nie znaleziono produktów dla podanych producentów.\n";
echo '<br>';
else
{
echo "Produkt ID: $productId już posiada tę cechę\n";
echo '<br>';
}
}
}
else
{
echo "Nie znaleziono produktów dla podanych producentów.\n";
echo '<br>';
}
echo "Operacja zakończona.\n";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff