Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Nov 2011
    Posts
    7
    Plugin Contributions
    0

    help question Force display of other currency than default?

    Hi there ladies! , I have scoured the vast ocean of zen cart related posts and cannot find the answer to this relatively simple problem:

    What I hope to achieve:

    Default/base currency: GBP
    (currency in which I buy from the supplier and base my pricing on)

    Displayed currency: Only EURO
    (customers only in euro zone)

    I dont want the customer to have the choice to select currencies, so I have gotten rid of the currency drop down. How do I get zen cart to always automatically display EURO when the a customer visists the store and not the default GBP.

    Seems simple enough, maybe I have been a bit of a noon and missed this one!

    Thanks in advanced,
    Joe Soap

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Force display of other currency than default?

    Well, you need to set the variable $_SESSION['currency'] to the right value.

    So basically you need to have GBP and EURO enabled. THis would normally mean that the user could choose between the two. When they choose it sets $_SESSION['currency']. Instead of letting them choose you force that variable to be what you want.

    If that is all greek to you just add this line

    Code:
    $_SESSION['currency'] = 'EUR';
    At the bottom of the file includes/init_includes/init_currencies.php. It needs to go just above the '?>' at the end of the file.

    And you need to check that you have euros enabled.

  3. #3
    Join Date
    Nov 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Force display of other currency than default?

    Hey nice work niccol,
    you nailed it on the head. Anyone else having issues with having a supplier based price list always in one currency and displaying it only in another do as was mentioned!

  4. #4
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,221
    Plugin Contributions
    1

    Default Re: Force display of other currency than default?

    Just got to say niccol, you've saved me a lot of heartache. I was having big difficulties in getting different currencies to work with subdomains on a single template with the multi-site mod, the currency kept getting 'stuck' on the main domain. Your helpful tip was exactly what I needed. Wish I had found it sooner.

    Thank you

    Simon

  5. #5
    Join Date
    Sep 2008
    Posts
    95
    Plugin Contributions
    0

    Default Re: Force display of other currency than default?

    Quote Originally Posted by niccol View Post
    Well, you need to set the variable $_SESSION['currency'] to the right value.

    So basically you need to have GBP and EURO enabled. THis would normally mean that the user could choose between the two. When they choose it sets $_SESSION['currency']. Instead of letting them choose you force that variable to be what you want.

    If that is all greek to you just add this line

    Code:
    $_SESSION['currency'] = 'EUR';
    At the bottom of the file includes/init_includes/init_currencies.php. It needs to go just above the '?>' at the end of the file.

    And you need to check that you have euros enabled.
    Hi,

    This thing actually work but if I implement this, it is restricting the user to change to any other currency even if it is available in currency drop down menu. It just refuse to change.

    Can anyone please suggest on how to manage non default currency on website but at the same time customers can still change if they want some other currency to show.

    Thanking you in advance.

    ~Time
    zen cart 1.5.4

  6. #6
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Force display of other currency than default?

    Try changing this line:

    Code:
    // If no currency is set, use appropriate default
    if (!isset($_SESSION['currency']) && !isset($_GET['currency']) ) $_SESSION['currency'] = DEFAULT_CURRENCY;
    to this:

    Code:
    // If no currency is set, use appropriate default
    if (!isset($_SESSION['currency']) && !isset($_GET['currency']) ) $_SESSION['currency'] = 'EUR';
    And getting rid of the other edit. Probably a better solution.


    Quote Originally Posted by time111 View Post
    Hi,

    This thing actually work but if I implement this, it is restricting the user to change to any other currency even if it is available in currency drop down menu. It just refuse to change.

    Can anyone please suggest on how to manage non default currency on website but at the same time customers can still change if they want some other currency to show.

    Thanking you in advance.

    ~Time
    zen cart 1.5.4

  7. #7
    Join Date
    Sep 2008
    Posts
    95
    Plugin Contributions
    0

    Default Re: Force display of other currency than default?

    Quote Originally Posted by niccol View Post
    Try changing this line:

    Code:
    // If no currency is set, use appropriate default
    if (!isset($_SESSION['currency']) && !isset($_GET['currency']) ) $_SESSION['currency'] = DEFAULT_CURRENCY;
    to this:

    Code:
    // If no currency is set, use appropriate default
    if (!isset($_SESSION['currency']) && !isset($_GET['currency']) ) $_SESSION['currency'] = 'EUR';
    And getting rid of the other edit. Probably a better solution.
    Hi,

    This was the first thing I tried, its given in other forum post but it failed to do any changes then I tried this post edit, it works but it stick to given value and no change possible thereafter on front-end.

    Any other suggestion?

    ~Time
    zen cart 1.5.4

  8. #8
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Force display of other currency than default?

    What is your setting in:

    admin>>My Store>> Switch To Default Language Currency

    After that check that you have removed the edit at the end of the file. If none of that works then you are going to have to post a URL so people can at least have a look.


    Quote Originally Posted by time111 View Post
    Hi,

    This was the first thing I tried, its given in other forum post but it failed to do any changes then I tried this post edit, it works but it stick to given value and no change possible thereafter on front-end.

    Any other suggestion?

    ~Time
    zen cart 1.5.4

  9. #9
    Join Date
    Sep 2008
    Posts
    95
    Plugin Contributions
    0

    Default Re: Force display of other currency than default?

    Hi,

    admin>>My Store>> Switch To Default Language Currency is False, changed to True but still make no difference.

    Thanks for your effort and time, will think of some alternate approach later.

    ~Time

  10. #10
    Join Date
    Nov 2004
    Location
    Varazdin Croatia
    Posts
    74
    Plugin Contributions
    0

    Default Re: Force display of other currency than default?

    Quote Originally Posted by time111 View Post
    Hi,

    admin>>My Store>> Switch To Default Language Currency is False, changed to True but still make no difference.

    Thanks for your effort and time, will think of some alternate approach later.

    ~Time
    hi do You find solution to Force display of other currency than default and have working user currency drop down menu ?

    thanx

    best
    emil

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Auth.net SIM currency other than default receives "Not allowed" error
    By RixStix in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 31 Dec 2015, 04:08 AM
  2. Display, checkout with different currency than default
    By jami1955 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 28 Oct 2010, 10:46 AM
  3. How to force checkout in default currency?
    By tj1 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 13 Oct 2008, 03:59 AM
  4. PayPal in USD and other currency (default)?
    By Preben in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 28 Feb 2007, 07:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR