Jump to content

Adding % discount and original price to Homefeature.tpl


Recommended Posts

Hi guys , I need to find out how can I add the percentage discounted like ( 50%) next to the original price cross-line ...I already set 50% discount to the default group but I cannot find out how to make it , I post my homefeature so you can have idea .
Is been modify to show price to registred customer only ....

Please advise


<!-- MODULE Home Featured Products -->

{l s='featured products' mod='homefeatured'}
   {if isset($products) AND $products}

           {assign var='liHeight' value=360}
           {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}
               {assign var='productLink' value=$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)}

{$product.name|escape:htmlall:'UTF-8'|truncate:35}




{if $logged} {* HANS *}
{displayWtPrice p=$product.price}

                       {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}
{else}
価格
{/if}






           {/foreach}


   {else}

{l s='No featured products' mod='homefeatured'}
   {/if}

<!-- /MODULE Home Featured Products -->

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...