UPDATE: parameters - add remote database host configuration; ADD: AGENTS.md - repository guidelines and structure documentation

This commit is contained in:
2026-03-12 01:48:11 +01:00
parent 75f7b80664
commit b1008c0c9d
5 changed files with 47 additions and 3 deletions

View File

@@ -152,6 +152,7 @@ class OmnibusEuFree extends Module
{
$currency = $this->context->currency;
$lastMinimalPrice = $this->getLastMinimalPrice($params['product']['id_product'], $params['product']['id_product_attribute'], $currency->id);
$regularPrice = isset($params['product']['regular_price']) ? $params['product']['regular_price'] : null;
if (!empty($lastMinimalPrice)) {
$minimalPrice = PrestashopCompatibility::formatPrice(_PS_VERSION_, $lastMinimalPrice['price'], $currency);
@@ -164,6 +165,7 @@ class OmnibusEuFree extends Module
'OmnibuseufreeInfoVersion' => (int) Configuration::get('OMNIBUSEUFREE_INFORMATION_VERSION', null, null, null, 2),
'OmnibuseufreeProductPriceMin' => $minimalPrice,
'OmnibuseufreeProductPriceCurrent' => $params['product']['price'],
'OmnibuseufreeProductPriceRegular' => $regularPrice,
'OmnibuseufreeProductDiscount' => (bool) $params['product']['has_discount'],
'OmnibuseufreeNumberOfDays' => (int) Configuration::get('OMNIBUSEUFREE_DAYS', null, null, null, 30),
]);

View File

@@ -21,11 +21,11 @@
{l s='Lowest price in %d days before discount: ' sprintf=[$OmnibuseufreeNumberOfDays] mod='omnibuseufree'}<span class="presta-studio-price-history-price">{$OmnibuseufreeProductPriceMin}</span>
{else}
{* when history is empty *}
{l s='Lowest price in %d days: ' sprintf=[$OmnibuseufreeNumberOfDays] mod='omnibuseufree'}<span class="presta-studio-price-history-price">{$OmnibuseufreeProductPriceCurrent}</span>
{l s='Lowest price in %d days: ' sprintf=[$OmnibuseufreeNumberOfDays] mod='omnibuseufree'}<span class="presta-studio-price-history-price">{$OmnibuseufreeProductPriceRegular|default:$OmnibuseufreeProductPriceCurrent}</span>
{/if}
{else}
{l s='Lowest price in %d days: ' sprintf=[$OmnibuseufreeNumberOfDays] mod='omnibuseufree'}<span class="presta-studio-price-history-price">{$OmnibuseufreeProductPriceMin}</span>
{/if}
</p>
</div>
{/if}
{/if}