Nsfr750 Posted April 22, 2011 Share Posted April 22, 2011 ho modificato il .tpl dell'home featured come nello special per visualizzare il prezzo prima dello sconto + percentuale/cifra di sconto e il prezzo scontato.mentre nello special vedo i prezzi giusti (senza iva)nell'homefeatured vedo il prezzo IVATO prima dello sconto e senza iva dopo lo sconto. <!-- MODULE Home Featured Products --> {l s='Featured products' mod='homefeatured'} {if isset($products) AND $products} {assign var='liHeight' value=342} {assign var='nbItemsPerLine' value=4} {assign var='nbLi' value=$products|@count} {assign var='nbLines' value=$nbLi/$nbItemsPerLine|ceil} {assign var='ulHeight' value=$nbLines*$liHeight} {foreach from=$products item=product name=homeFeaturedProducts} {$product.name|truncate:25:'...'|escape:'htmlall':'UTF-8'} {$product.description_short|strip_tags|truncate:100:'...'} getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" /> {if $product.on_sale} {if $product.reduction_percent} {displayWtPrice p=$product.price_without_reduction} (-{$product.reduction_percent}%) {elseif $product.reduction_price} {displayWtPrice p=$product.price_without_reduction} (-{$product.reduction_price}€) {/if} {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product.reduction_from))} {if $product.reduction_percent} {displayWtPrice p=$product.price_without_reduction} (-{$product.reduction_percent}%) {elseif $product.reduction_price} {displayWtPrice p=$product.price_without_reduction} (-{$product.reduction_price}€) {/if} {/if} {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {l s='View' mod='homefeatured'} {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} {l s='Add to cart' mod='homefeatured'} {else} {l s='Add to cart' mod='homefeatured'} {/if} {/foreach} {else} {l s='No featured products' mod='homefeatured'} {/if} <!-- /MODULE Home Featured Products --> come faccio a far visualizzare alle righe 20, 23, 28 e 31 il prezzo prima dello sconto senza iva? Link to comment Share on other sites More sharing options...
Nsfr750 Posted May 3, 2011 Author Share Posted May 3, 2011 ho risolto (da solo) nel seguente modo: {if ($product.on_sale !=0 || $product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product.reduction_from))} {assign var='oldprice' value=$product.price_without_reduction/1.2} <-- dove 1.2 e' l'iva al 20% {displayWtPrice p=$oldprice} {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {else} {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {/if} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now