From 3680560da14259c68ba62f2575a2742e6b737f03 Mon Sep 17 00:00:00 2001 From: dMetzger Date: Tue, 24 Jul 2012 09:11:29 +0000 Subject: [PATCH] [-] FO : fixed price display precision in the product sheet template #PSCFI-6111 --- themes/default/product.tpl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/themes/default/product.tpl b/themes/default/product.tpl index fce3793e2..1361afabf 100644 --- a/themes/default/product.tpl +++ b/themes/default/product.tpl @@ -70,11 +70,14 @@ var productShowPrice = '{if !$PS_CATALOG_MODE}{$product->show_price}{else}0{/if} var productUnitPriceRatio = '{$product->unit_price_ratio}'; var idDefaultImage = {if isset($cover.id_image_only)}{$cover.id_image_only}{else}0{/if}; +{if !isset($priceDisplayPrecision)} + {assign var='priceDisplayPrecision' value=2} +{/if} {if !$priceDisplay || $priceDisplay == 2} - {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, 2)} + {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {elseif $priceDisplay == 1} - {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, 2)} + {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} {/if} @@ -368,10 +371,10 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
{if !$priceDisplay || $priceDisplay == 2} - {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL)} + {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {elseif $priceDisplay == 1} - {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL)} + {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} {/if}