Search code examples
phphtmlsmartycs-cart

How to customize cs-cart to show both currencies in all pages but home?


I'm trying to customize my store to show two currencies at the same time , however I wish they were shown on all pages except the home. I tried to edit common_templates/price.tpl to this to test:

{* $Id$ *}
{strip}
{if $settings.General.alternative_currency == "Y" AND $controller == 'products'}
        {$value|format_price:$currencies.$primary_currency:$span_id:$class:false}{if $secondary_currency != $primary_currency}&nbsp;{if $class}<span class="{$class}">{/if}({if $class}</span>{/if}{$value|format_price:$currencies.$secondary_currency:$span_id:$class:true:$is_integer}{if $class}<span class="{$class}">{/if}){if $class}</span>{/if}{/if}
{else}
        {$value|format_price:$currencies.$secondary_currency:$span_id:$class:true}
{/if}
{/strip}

I guess only in the product page should be shown the price in both currencies...? What am I doing wrong? Thank you.


Solution

  • Please try

    ...
    {if $settings.General.alternative_currency == "Y" && $runtime.controller == 'products' && $runtime.mode == 'view'}
    ...