we need to add some tags in the product detail page which should have the following code :
basically the same product price in different currencies converted using the currency rate set in currencies setting in cs-cart
ABC
INR
EUR
EUR
27.00
45.19
InStock
GBP
GBP
24.00
41.55
OutOfStock
if you want to do it from a template then you'd do something like:
{assign var="cart_currency" value=$smarty.const.CART_PRIMARY_CURRENCY}
{foreach from=$currencies key="ccode" item="cur"}
{if $ccode != $cart_currency}
{$cur.currency} = $product_info.price|fn_format_price:$ccode:2:1}
{/if}
{/foreach}
Off the top of my head, not tested!
thanks tbirn, it worked but the conversion dint happen, had to add math equation to convert it with the current currency rates.
There's a different function then the 'format' function that will convert the amounts. But I don't remember what it is. You can probably search for 'currency' in fn.common.php or fn.cart.php to find it....
I think, he meant the fn_format_price_by_currency function from the app/functions/fn.cart.php file. Try this code
{assign var="cart_currency" value=$smarty.const.CART_PRIMARY_CURRENCY}
{foreach from=$currencies key="ccode" item="cur"}
{if $ccode != $cart_currency}
{$cur.currency} = {$product_info.price|fn_format_price_by_currency:$cart_currency:$ccode}
{/if}
{/foreach}