Zaktualizowano plik gm_omniprice.php, aby zdefiniować stałe identyfikatory walut oraz poprawić sortowanie atrybutów produktów.
This commit is contained in:
164
.vscode/ftp-kr.sync.cache.json
vendored
164
.vscode/ftp-kr.sync.cache.json
vendored
@@ -273,7 +273,7 @@
|
||||
},
|
||||
"google-merchant_id-2.xml": {
|
||||
"type": "-",
|
||||
"size": 2655896,
|
||||
"size": 2655146,
|
||||
"lmtime": 0,
|
||||
"modified": true
|
||||
},
|
||||
@@ -408,19 +408,19 @@
|
||||
"CHANGELOG": {
|
||||
"type": "-",
|
||||
"size": 5258,
|
||||
"lmtime": 1764184727462,
|
||||
"lmtime": 1765870358887,
|
||||
"modified": false
|
||||
},
|
||||
"cleanup.php": {
|
||||
"type": "-",
|
||||
"size": 350,
|
||||
"lmtime": 1764184727462,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"config_pl.xml": {
|
||||
"type": "-",
|
||||
"size": 556,
|
||||
"lmtime": 1764184727462,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"controllers": {
|
||||
@@ -428,13 +428,13 @@
|
||||
"cron.php": {
|
||||
"type": "-",
|
||||
"size": 4477,
|
||||
"lmtime": 1765828878778,
|
||||
"lmtime": 1765870717154,
|
||||
"modified": false
|
||||
},
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 1321,
|
||||
"lmtime": 1764184727464,
|
||||
"lmtime": 1765870358890,
|
||||
"modified": false
|
||||
}
|
||||
}
|
||||
@@ -442,191 +442,85 @@
|
||||
"cron.php": {
|
||||
"type": "-",
|
||||
"size": 1492,
|
||||
"lmtime": 1764184727464,
|
||||
"lmtime": 1765870358891,
|
||||
"modified": false
|
||||
},
|
||||
"fill.php": {
|
||||
"type": "-",
|
||||
"size": 348,
|
||||
"lmtime": 1764184727465,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"gm_omniprice.php": {
|
||||
"type": "-",
|
||||
"size": 100447,
|
||||
"lmtime": 1765831367703,
|
||||
"size": 100669,
|
||||
"lmtime": 1765917696775,
|
||||
"modified": false
|
||||
},
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 1304,
|
||||
"lmtime": 1764184727466,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"logo.png": {
|
||||
"type": "-",
|
||||
"size": 4539,
|
||||
"lmtime": 1764184727466,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"logo.webp": {
|
||||
"type": "-",
|
||||
"size": 1980,
|
||||
"lmtime": 1764184727467,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"template.php": {
|
||||
"type": "-",
|
||||
"size": 1926,
|
||||
"lmtime": 1764184727467,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"translations": {
|
||||
"de.php": {
|
||||
"type": "-",
|
||||
"size": 9540,
|
||||
"lmtime": 1764184727468,
|
||||
"lmtime": 1765870358894,
|
||||
"modified": false
|
||||
},
|
||||
"es.php": {
|
||||
"type": "-",
|
||||
"size": 9589,
|
||||
"lmtime": 1764184727469,
|
||||
"lmtime": 1765870358895,
|
||||
"modified": false
|
||||
},
|
||||
"fr.php": {
|
||||
"type": "-",
|
||||
"size": 9585,
|
||||
"lmtime": 1764184727469,
|
||||
"lmtime": 1765870358896,
|
||||
"modified": false
|
||||
},
|
||||
"it.php": {
|
||||
"type": "-",
|
||||
"size": 9493,
|
||||
"lmtime": 1764184727470,
|
||||
"lmtime": 1765870358897,
|
||||
"modified": false
|
||||
},
|
||||
"nl.php": {
|
||||
"type": "-",
|
||||
"size": 0,
|
||||
"lmtime": 1764184727470,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"pl.php": {
|
||||
"type": "-",
|
||||
"size": 9307,
|
||||
"lmtime": 1764184727471,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"upgrade": {
|
||||
"upgrade-1.0.10.php": {
|
||||
"type": "-",
|
||||
"size": 170,
|
||||
"lmtime": 1764184727471,
|
||||
"modified": false
|
||||
},
|
||||
"upgrade-1.0.11.php": {
|
||||
"type": "-",
|
||||
"size": 170,
|
||||
"lmtime": 1764184727472,
|
||||
"modified": false
|
||||
},
|
||||
"upgrade-1.0.13.php": {
|
||||
"type": "-",
|
||||
"size": 333,
|
||||
"lmtime": 1764184727472,
|
||||
"modified": false
|
||||
},
|
||||
"upgrade-1.1.0.php": {
|
||||
"type": "-",
|
||||
"size": 195,
|
||||
"lmtime": 1764184727473,
|
||||
"modified": false
|
||||
},
|
||||
"upgrade-1.1.11.php": {
|
||||
"type": "-",
|
||||
"size": 196,
|
||||
"lmtime": 1764184727473,
|
||||
"modified": false
|
||||
},
|
||||
"upgrade-1.2.0.php": {
|
||||
"type": "-",
|
||||
"size": 191,
|
||||
"lmtime": 1764184727473,
|
||||
"modified": false
|
||||
},
|
||||
"upgrade-1.2.3.php": {
|
||||
"type": "-",
|
||||
"size": 190,
|
||||
"lmtime": 1764184727474,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"views": {
|
||||
"css": {
|
||||
"gm_omniprice.css": {
|
||||
"type": "-",
|
||||
"size": 87,
|
||||
"lmtime": 1764184727475,
|
||||
"modified": false
|
||||
},
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 1304,
|
||||
"lmtime": 1764184727475,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 1304,
|
||||
"lmtime": 1764184727475,
|
||||
"modified": false
|
||||
},
|
||||
"js": {
|
||||
"gm_omniprice.js": {
|
||||
"type": "-",
|
||||
"size": 543,
|
||||
"lmtime": 1764184727476,
|
||||
"modified": false
|
||||
},
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 1304,
|
||||
"lmtime": 1764184727476,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"templates": {
|
||||
"hook": {
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 1304,
|
||||
"lmtime": 1764184727477,
|
||||
"modified": false
|
||||
},
|
||||
"price.tpl": {
|
||||
"type": "-",
|
||||
"size": 516,
|
||||
"lmtime": 1764184727478,
|
||||
"modified": false
|
||||
},
|
||||
"tab.tpl": {
|
||||
"type": "-",
|
||||
"size": 1009,
|
||||
"lmtime": 1764184727478,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 1304,
|
||||
"lmtime": 1764184727478,
|
||||
"modified": false
|
||||
}
|
||||
}
|
||||
}
|
||||
"upgrade": {},
|
||||
"views": {}
|
||||
}
|
||||
},
|
||||
"nov": {},
|
||||
@@ -650,15 +544,15 @@
|
||||
},
|
||||
"Cart.php": {
|
||||
"type": "-",
|
||||
"size": 2168,
|
||||
"size": 2113,
|
||||
"lmtime": 1754569110962,
|
||||
"modified": false
|
||||
"modified": true
|
||||
},
|
||||
"CartRule.php": {
|
||||
"type": "-",
|
||||
"size": 2271,
|
||||
"size": 2207,
|
||||
"lmtime": 1754569111032,
|
||||
"modified": false
|
||||
"modified": true
|
||||
},
|
||||
"Category.php": {
|
||||
"type": "-",
|
||||
@@ -746,12 +640,6 @@
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"Hook.php": {
|
||||
"type": "-",
|
||||
"size": 2411,
|
||||
"lmtime": 1754569111611,
|
||||
"modified": false
|
||||
},
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 1281,
|
||||
|
||||
@@ -565,7 +565,8 @@ class Gm_OmniPrice extends Module
|
||||
}
|
||||
$specificPriceOutput = null;
|
||||
foreach ($shopIds as $shopId) {
|
||||
$currencyIds = $this->getCurrencyIds($shopId);
|
||||
// $currencyIds = $this->getCurrencyIds($shopId);
|
||||
$currencyIds = [3];
|
||||
$countryIds = $this->getCountryIds($shopId);
|
||||
$groupIds = $this->getGroupIds($shopId);
|
||||
$lastCurrencyId = end($currencyIds);
|
||||
@@ -616,6 +617,7 @@ class Gm_OmniPrice extends Module
|
||||
true, //with_ecotax
|
||||
$specificPriceOutput, true //use_group_reduction
|
||||
);
|
||||
|
||||
$priceTin = sprintf("%.6f", $priceTin);
|
||||
$basicPrices[$basicKey] = $priceTin;
|
||||
$priceTex = $priceTin;
|
||||
@@ -673,6 +675,7 @@ class Gm_OmniPrice extends Module
|
||||
if (Tools::isSubmit('cache')) {
|
||||
$discountChanged = true;
|
||||
}
|
||||
|
||||
if ($priceIsCorrect && ($priceChanged || $discountChanged)) {
|
||||
$output .= '<td>'.$this->l('Save').'</td>';
|
||||
$this->savePrice($this->today, $shopId, $productId, $currencyId, $countryId, $groupId, $attributeId, $priceTex,
|
||||
@@ -700,6 +703,10 @@ class Gm_OmniPrice extends Module
|
||||
$output .= '</tr>';
|
||||
//attributes
|
||||
if (array_key_exists($productId, $attributesMap)) {
|
||||
$z = 0;
|
||||
// sort ascending $attributesMap[$productId]
|
||||
sort($attributesMap[$productId]);
|
||||
|
||||
foreach ($attributesMap[$productId] as $attributeId) {
|
||||
$priceTin = Product::priceCalculation(
|
||||
$shopId, $productId, $attributeId, $countryId, $stateId, $zipcode, $currencyId, $groupId, 1, //quantity
|
||||
|
||||
Reference in New Issue
Block a user