Jump to content

Change currency on click


Szymon88

Recommended Posts

Hello,

i'm trying to modify currency switcher as follow:

if user click on first currency ISO name it automatically changes to second currency (without dropdown, just click on ISO name).

So i mofidied ps_currencyselector.tpl:

 

<div class="currency-selector dropdown js-dropdown popup-over" id="currency-selector-label">
    <span class="hidden-xs-up">{l s='Currency:' d='Shop.Theme.Global'}</span>
{if $currency.id = 3}
		<a title="{$currency.name}" rel="nofollow" href="/?SubmitCurrency=yes&id_currency=1"><span class="_gray-darker">{$current_currency.iso_code} </span></a>
{elseif $currency.id = 1}	  
	  <a title="{$currency.name}" rel="nofollow" href="/?SubmitCurrency=yes&id_currency=3"><span class="_gray-darker">{$current_currency.iso_code} </span></a>
{/if}
</div>

 

and it is not working.

 

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...