How to force a secondary currency as default ?

I want to force my secondary currency as default on the store.



Primary currency = USD

Secondary currency = INR (I want to show only this on store by default)



I have added the following code to config.local.php but it doesn't work any clues ?





if(empty($_GET['currency']) || ($_GET['currency']!='KD')){
$_GET['currency'] = 'KD' ;
}

Administration->Currencies->Drag your default to the top of the list.

Its already at the top, but its not primary. I don't think order matters.

isnt there a check box to set primary currency in edit?



John

I don't want to change my primary currency, I just want to force or make default the secondary currency on the store front.

Add this code (substituting the currency code for in a addons/my_changes/controllers/customer/init.post.php file

```php

if( !defined('AREA') ) die('Access denied');
if( CART_SECONDARY_CURRENCY != '')
fn_redirect(INDEX_SCRIPT."?currency=");
?>

```



If the secondary currency is not set to what you want this will cause it to be set to it. Note that the user's choice of currency is stored ina a cookie so it should be reset every time that user comes to your store.

thanks tbirnseth, but why is my code not working ? can't I simply set currency get var instead of redirecting ?

Your code requires currency to be passed for every page load.

The redirect happens once per user session.

Thank tbirnseth, you solution works like charm !!