Jump to content

How can i modify the product_list.tpl to show original price?


Recommended Posts

Hi, i want to modify the product list to show the original price without discount. I found a couple of solutions but i tried to do it works and i can´t...i supose that are solutions of previous version of PS. I work with PS 1.3.6.
I think that i have tu put a piece of code in the product-list.tpl of the theme.
I leave here the code i have to modify and a image of what i want to do.
Thank you!

>
{if isset($products)}
   <!-- Products list -->
</pre>
<ul>
   {foreach from=$products item=product name=products}


getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" width="{$homeSize.width}" height="{$homeSize.height}" />
{if $product.new == 1}{l s='new'}{/if}{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}

{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'}
                                                                                 

               {if $product.on_sale}
{l s='On sale!'}
               {elseif ($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))}
{l s='Price lowered!'}
               {/if}

                   <!-- I THINK HERE WILL BE THE CODE -->
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}

{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}

               {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
{l s='Add to cart'}
               {else}
{l s='Add to cart'}
               {/if}
{l s='View'}


   {/foreach}
</ul>
<br>   <!-- /Products list --><br>{/if

38626_7DvMPEju02JGkBnazYIt_t

Link to comment
Share on other sites

Hi,

I am using an older version and my site is heavily modified, but this might be worth a try. Try using this line of code:

 {convertPrice price=$product.price_without_reduction}



I think the span class might be different for you either because it's different for PS by default or for the new versions... like I said my site including theme is heavily modified so I forget if I added this class into the global.css file or not.

HTH!

Link to comment
Share on other sites

Hi,

I am using an older version and my site is heavily modified, but this might be worth a try. Try using this line of code:

 {convertPrice price=$product.price_without_reduction}



I think the span class might be different for you either because it's different for PS by default or for the new versions... like I said my site including theme is heavily modified so I forget if I added this class into the global.css file or not.

HTH!



Thank you very much!!! It´s works in version 1.3.6 of PS!!
Link to comment
Share on other sites

  • 2 months later...
  • 2 years later...
×
×
  • Create New...