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": {
|
"google-merchant_id-2.xml": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 2655896,
|
"size": 2655146,
|
||||||
"lmtime": 0,
|
"lmtime": 0,
|
||||||
"modified": true
|
"modified": true
|
||||||
},
|
},
|
||||||
@@ -408,19 +408,19 @@
|
|||||||
"CHANGELOG": {
|
"CHANGELOG": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 5258,
|
"size": 5258,
|
||||||
"lmtime": 1764184727462,
|
"lmtime": 1765870358887,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"cleanup.php": {
|
"cleanup.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 350,
|
"size": 350,
|
||||||
"lmtime": 1764184727462,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"config_pl.xml": {
|
"config_pl.xml": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 556,
|
"size": 556,
|
||||||
"lmtime": 1764184727462,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"controllers": {
|
"controllers": {
|
||||||
@@ -428,13 +428,13 @@
|
|||||||
"cron.php": {
|
"cron.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 4477,
|
"size": 4477,
|
||||||
"lmtime": 1765828878778,
|
"lmtime": 1765870717154,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"index.php": {
|
"index.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1321,
|
"size": 1321,
|
||||||
"lmtime": 1764184727464,
|
"lmtime": 1765870358890,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -442,191 +442,85 @@
|
|||||||
"cron.php": {
|
"cron.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1492,
|
"size": 1492,
|
||||||
"lmtime": 1764184727464,
|
"lmtime": 1765870358891,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"fill.php": {
|
"fill.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 348,
|
"size": 348,
|
||||||
"lmtime": 1764184727465,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"gm_omniprice.php": {
|
"gm_omniprice.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 100447,
|
"size": 100669,
|
||||||
"lmtime": 1765831367703,
|
"lmtime": 1765917696775,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"index.php": {
|
"index.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1304,
|
"size": 1304,
|
||||||
"lmtime": 1764184727466,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"logo.png": {
|
"logo.png": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 4539,
|
"size": 4539,
|
||||||
"lmtime": 1764184727466,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"logo.webp": {
|
"logo.webp": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1980,
|
"size": 1980,
|
||||||
"lmtime": 1764184727467,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"template.php": {
|
"template.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1926,
|
"size": 1926,
|
||||||
"lmtime": 1764184727467,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"translations": {
|
"translations": {
|
||||||
"de.php": {
|
"de.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 9540,
|
"size": 9540,
|
||||||
"lmtime": 1764184727468,
|
"lmtime": 1765870358894,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"es.php": {
|
"es.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 9589,
|
"size": 9589,
|
||||||
"lmtime": 1764184727469,
|
"lmtime": 1765870358895,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"fr.php": {
|
"fr.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 9585,
|
"size": 9585,
|
||||||
"lmtime": 1764184727469,
|
"lmtime": 1765870358896,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"it.php": {
|
"it.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 9493,
|
"size": 9493,
|
||||||
"lmtime": 1764184727470,
|
"lmtime": 1765870358897,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"nl.php": {
|
"nl.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 0,
|
"size": 0,
|
||||||
"lmtime": 1764184727470,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"pl.php": {
|
"pl.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 9307,
|
"size": 9307,
|
||||||
"lmtime": 1764184727471,
|
"lmtime": 0,
|
||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"upgrade": {
|
"upgrade": {},
|
||||||
"upgrade-1.0.10.php": {
|
"views": {}
|
||||||
"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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nov": {},
|
"nov": {},
|
||||||
@@ -650,15 +544,15 @@
|
|||||||
},
|
},
|
||||||
"Cart.php": {
|
"Cart.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 2168,
|
"size": 2113,
|
||||||
"lmtime": 1754569110962,
|
"lmtime": 1754569110962,
|
||||||
"modified": false
|
"modified": true
|
||||||
},
|
},
|
||||||
"CartRule.php": {
|
"CartRule.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 2271,
|
"size": 2207,
|
||||||
"lmtime": 1754569111032,
|
"lmtime": 1754569111032,
|
||||||
"modified": false
|
"modified": true
|
||||||
},
|
},
|
||||||
"Category.php": {
|
"Category.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
@@ -746,12 +640,6 @@
|
|||||||
"modified": false
|
"modified": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Hook.php": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 2411,
|
|
||||||
"lmtime": 1754569111611,
|
|
||||||
"modified": false
|
|
||||||
},
|
|
||||||
"index.php": {
|
"index.php": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 1281,
|
"size": 1281,
|
||||||
|
|||||||
@@ -565,7 +565,8 @@ class Gm_OmniPrice extends Module
|
|||||||
}
|
}
|
||||||
$specificPriceOutput = null;
|
$specificPriceOutput = null;
|
||||||
foreach ($shopIds as $shopId) {
|
foreach ($shopIds as $shopId) {
|
||||||
$currencyIds = $this->getCurrencyIds($shopId);
|
// $currencyIds = $this->getCurrencyIds($shopId);
|
||||||
|
$currencyIds = [3];
|
||||||
$countryIds = $this->getCountryIds($shopId);
|
$countryIds = $this->getCountryIds($shopId);
|
||||||
$groupIds = $this->getGroupIds($shopId);
|
$groupIds = $this->getGroupIds($shopId);
|
||||||
$lastCurrencyId = end($currencyIds);
|
$lastCurrencyId = end($currencyIds);
|
||||||
@@ -616,6 +617,7 @@ class Gm_OmniPrice extends Module
|
|||||||
true, //with_ecotax
|
true, //with_ecotax
|
||||||
$specificPriceOutput, true //use_group_reduction
|
$specificPriceOutput, true //use_group_reduction
|
||||||
);
|
);
|
||||||
|
|
||||||
$priceTin = sprintf("%.6f", $priceTin);
|
$priceTin = sprintf("%.6f", $priceTin);
|
||||||
$basicPrices[$basicKey] = $priceTin;
|
$basicPrices[$basicKey] = $priceTin;
|
||||||
$priceTex = $priceTin;
|
$priceTex = $priceTin;
|
||||||
@@ -673,6 +675,7 @@ class Gm_OmniPrice extends Module
|
|||||||
if (Tools::isSubmit('cache')) {
|
if (Tools::isSubmit('cache')) {
|
||||||
$discountChanged = true;
|
$discountChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($priceIsCorrect && ($priceChanged || $discountChanged)) {
|
if ($priceIsCorrect && ($priceChanged || $discountChanged)) {
|
||||||
$output .= '<td>'.$this->l('Save').'</td>';
|
$output .= '<td>'.$this->l('Save').'</td>';
|
||||||
$this->savePrice($this->today, $shopId, $productId, $currencyId, $countryId, $groupId, $attributeId, $priceTex,
|
$this->savePrice($this->today, $shopId, $productId, $currencyId, $countryId, $groupId, $attributeId, $priceTex,
|
||||||
@@ -700,6 +703,10 @@ class Gm_OmniPrice extends Module
|
|||||||
$output .= '</tr>';
|
$output .= '</tr>';
|
||||||
//attributes
|
//attributes
|
||||||
if (array_key_exists($productId, $attributesMap)) {
|
if (array_key_exists($productId, $attributesMap)) {
|
||||||
|
$z = 0;
|
||||||
|
// sort ascending $attributesMap[$productId]
|
||||||
|
sort($attributesMap[$productId]);
|
||||||
|
|
||||||
foreach ($attributesMap[$productId] as $attributeId) {
|
foreach ($attributesMap[$productId] as $attributeId) {
|
||||||
$priceTin = Product::priceCalculation(
|
$priceTin = Product::priceCalculation(
|
||||||
$shopId, $productId, $attributeId, $countryId, $stateId, $zipcode, $currencyId, $groupId, 1, //quantity
|
$shopId, $productId, $attributeId, $countryId, $stateId, $zipcode, $currencyId, $groupId, 1, //quantity
|
||||||
|
|||||||
Reference in New Issue
Block a user