[*] BO: It is now possible to apply a specific price of 0 euros
This commit is contained in:
@@ -336,14 +336,10 @@ jQuery(document).ready(Customer.init);
|
|||||||
<span id="spm_currency_sign_pre_0" style="font-weight:bold; color:#000000; font-size:12px">
|
<span id="spm_currency_sign_pre_0" style="font-weight:bold; color:#000000; font-size:12px">
|
||||||
{$currency->prefix}
|
{$currency->prefix}
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="sp_price" value="0" size="11" />
|
<input type="text" name="sp_price" value="{$product->price|string_format:'%.2f'}" size="11" />
|
||||||
<span id="spm_currency_sign_post_0" style="font-weight:bold; color:#000000; font-size:12px">
|
<span id="spm_currency_sign_post_0" style="font-weight:bold; color:#000000; font-size:12px">
|
||||||
{$currency->suffix}
|
{$currency->suffix}
|
||||||
</span>
|
</span>
|
||||||
<p class="preference_description">
|
|
||||||
{l s='You can set this value to 0 in order to apply the default price.'}
|
|
||||||
({l s='Current:'}<span id="sp_current_ht_price">{displayWtPrice p=$product->price}</span>)
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label>{l s='Apply a discount of:'}</label>
|
<label>{l s='Apply a discount of:'}</label>
|
||||||
|
|||||||
+2
-2
@@ -2453,12 +2453,12 @@ class ProductCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
$result = self::$_pricesLevel2[$cache_id_2];
|
$result = self::$_pricesLevel2[$cache_id_2];
|
||||||
|
|
||||||
if (!$specific_price || $specific_price['price'] == 0)
|
if (!$specific_price)
|
||||||
$price = (float)$result['price'];
|
$price = (float)$result['price'];
|
||||||
else
|
else
|
||||||
$price = (float)$specific_price['price'];
|
$price = (float)$specific_price['price'];
|
||||||
// convert only if the specific price is in the default currency (id_currency = 0)
|
// convert only if the specific price is in the default currency (id_currency = 0)
|
||||||
if (!$specific_price || !($specific_price['price'] > 0 && $specific_price['id_currency']))
|
if (!$specific_price || !($specific_price['price'] >= 0 && $specific_price['id_currency']))
|
||||||
$price = Tools::convertPrice($price, $id_currency);
|
$price = Tools::convertPrice($price, $id_currency);
|
||||||
|
|
||||||
// Attribute price
|
// Attribute price
|
||||||
|
|||||||
@@ -42,9 +42,9 @@
|
|||||||
{if $language.iso_code != $lang_iso}
|
{if $language.iso_code != $lang_iso}
|
||||||
{assign var=indice_lang value=$language.id_lang}
|
{assign var=indice_lang value=$language.id_lang}
|
||||||
{if isset($lang_rewrite_urls.$indice_lang)}
|
{if isset($lang_rewrite_urls.$indice_lang)}
|
||||||
<a href="{$lang_rewrite_urls.$indice_lang}" title="{$language.name}">
|
<a href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}" title="{$language.name}">
|
||||||
{else}
|
{else}
|
||||||
<a href="{$link->getLanguageLink($language.id_lang)}" title="{$language.name}">
|
<a href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}">
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user