diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index 3c789d6c..efce8e2c 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -1083,8 +1083,8 @@ ".htaccess": { "type": "-", "size": 5737, - "lmtime": 1743169569305, - "modified": true + "lmtime": 1746726321526, + "modified": false }, ".htaccess.2025-01-27-1738009656": { "type": "-", diff --git a/modules/gm_omniprice/gm_omniprice.php b/modules/gm_omniprice/gm_omniprice.php index fa813335..cac7e2bb 100644 --- a/modules/gm_omniprice/gm_omniprice.php +++ b/modules/gm_omniprice/gm_omniprice.php @@ -1358,6 +1358,7 @@ class Gm_OmniPrice extends Module } $lowestCachedPrice = $this->getLowestCachedPrice($params); } + $realDiscount = ''; if ($showRealDiscount && $lowestCachedPrice && isset($hookParams['product']['price_amount'])) { @@ -1365,6 +1366,7 @@ class Gm_OmniPrice extends Module $previousPrice = $lowestCachedPrice['raw']; $realDiscount = $this->calculateRealDisount($currentPrice, $previousPrice); } + if (!$lowestCachedPrice) { //may have a promotion for an individual combination @@ -1376,7 +1378,10 @@ class Gm_OmniPrice extends Module ]; } } - if ($lowestCachedPrice) + + $checkIfProductIsDiscounted = self::checkIfProductIsDiscounted( $this->getDiscountedProductIds( $params['id_shop'], $params['id_currency'], $params['id_country'], $params['id_group'] ), $productId, $params['id_product_attribute'] ); + + if ( $lowestCachedPrice and $checkIfProductIsDiscounted ) { $this->context->smarty->assign( [