Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Feb 2010
    Posts
    237
    Plugin Contributions
    0

    Default Showing Products in Canadian Currency

    Hi. I'm sure this question has been asked before but I could not find anything doing a search.

    I am in Canada but almost all my products come from the U.S.

    Is there any way of having the U.S. as default currency but have Canadian be displayed?

    Using the U.S. as the default currency and having Zen Cart do the currency correction is great. My only issue is that my market is Canada and having to have the customer change the currency all the time is an inconvenience.

    Any help would be appreciated.

    Dave

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Showing Products in Canadian Currency

    My only issue is that my market is Canada and having to have the customer change the currency all the time is an inconvenience.
    One must decide the default currency to be displayed

    If it is more important for your customers to see their native Canadian currency then do that and you will have to make your correction for the orders manually
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Showing Products in Canadian Currency

    You could test this ...

    In the currencies class see if changing the last function does anything for you:
    /includes/classes/currencies.php
    Code:
      function display_price($products_price, $products_tax, $quantity = 1) {
        $us_display_price = $this->format(zen_add_tax($products_price, $products_tax) * $quantity);
        $cad_display_price = $this->format(zen_add_tax($products_price, $products_tax) * $quantity, 'true', 'CAD');
    
    //    return $this->format(zen_add_tax($products_price, $products_tax) * $quantity);
        return $us_display_price . ' ' . $cad_display_price;
      }
    I have not tested this everywhere and there are some places that are not using the display_price function such as on the subtotal in the shopping_cart but see if this gives you what you are trying to do ...

    NOTE: this assumes that the current currency is left are USD ...

    If you allow the change of currency on your site, you may want to alter the $us_display_price to be specific to USD ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Feb 2010
    Posts
    237
    Plugin Contributions
    0

    Default Re: Showing Products in Canadian Currency

    Thanks for your reply. I will try this and see if it works for me.

    The last sentence you said something about changing currencies?

    I would really like to be able to have Canadian display but still be able to change to U.S. currency if a customer is American.

    Anyway, thanks for your reply. I will try this and reply back.

    Dave

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Showing Products in Canadian Currency

    Then change the line for the US currency line to read:
    Code:
        $us_display_price = $this->format(zen_add_tax($products_price, $products_tax) * $quantity, 'true', 'USD');
    so that when the currency gets changed, the two lines do not both read CAD ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Feb 2010
    Posts
    237
    Plugin Contributions
    0

    Default Re: Showing Products in Canadian Currency

    Hi:

    Sorry it took so long for me to reply.

    I tried the code that you so graciously provided. When I installed the code it displayed BOTH currencies on the the Product Listing and the Product Description page.

    When I tried to switch currencies in the sidebox the entire display just went blank.

    I am not able to really play with the code. I am not a programmer but just a copier.

    Thanks again for the time you spent helping me.

    If you have any other suggestions, I would be happy to try them.

    Dave

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Showing Products in Canadian Currency

    I tried both the original code I gave you and the adjusted code to maintain USD and CAD with:
    Code:
      function display_price($products_price, $products_tax, $quantity = 1) {
        $us_display_price = $this->format(zen_add_tax($products_price, $products_tax) * $quantity, 'true', 'USD');
        $cad_display_price = $this->format(zen_add_tax($products_price, $products_tax) * $quantity, 'true', 'CAD');
    
    //    return $this->format(zen_add_tax($products_price, $products_tax) * $quantity);
        return $us_display_price . ' ' . $cad_display_price;
      }
    neither one breaks when I change the currencies back and forth ...

    Where are when you change the currency and it breaks?

    What debug messages do you see in the /cache directory when it breaks?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Feb 2010
    Posts
    237
    Plugin Contributions
    0

    Default Re: Showing Products in Canadian Currency

    Hi Ajeh:

    Thank you for your time with me. I got the code to work and it works great. Now the currency comes up in Canadian but can be switched to U.S. if the customer chooses.

    It is exactly what is was hoping for when I posted the question.

    Thanks again, I really appreciated the time and patience with me.

    Dave

  9. #9
    Join Date
    Mar 2011
    Posts
    1
    Plugin Contributions
    0

    customer issue Re: Showing Products in Canadian Currency

    Ajeh, many thanks, I had a similar problem with BGN (Bulgarian Lev). I used your code and replaced the display_price function in currencies.php and oh, miracle, all the zeros turned into prices

    However, both currencies displayed. Then I reviewed the code, uncommented the second last line and commented the last line, and the currencies switched properly upon language selection, wooo hooooo, many thanks for your help

    Quote Originally Posted by Ajeh View Post
    I tried both the original code I gave you and the adjusted code to maintain USD and CAD with:
    Code:
      function display_price($products_price, $products_tax, $quantity = 1) {
        $us_display_price = $this->format(zen_add_tax($products_price, $products_tax) * $quantity, 'true', 'USD');
        $cad_display_price = $this->format(zen_add_tax($products_price, $products_tax) * $quantity, 'true', 'CAD');
    
    //    return $this->format(zen_add_tax($products_price, $products_tax) * $quantity);
        return $us_display_price . ' ' . $cad_display_price;
      }
    neither one breaks when I change the currencies back and forth ...

    Where are when you change the currency and it breaks?

    What debug messages do you see in the /cache directory when it breaks?

  10. #10
    Join Date
    Apr 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Showing Products in Canadian Currency

    Hi:

    I tried to change the currency to Canadian but could not get it to work.

    I replaced the "function display price" with the new code in the catalog/includes/classes/currencies.php but it still comes up in U.S.

    I tried changing the admin/includes/classes/currencies.php file also but it did nothing either.

    I am using 1.3.9f.

    The website is http://www.poolcuesexpress.com

    Any help would be appreciated.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Currency showing zero products
    By Nic Castle in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 2 Aug 2010, 07:24 PM
  2. If a choose canadian currency give me error 10401
    By icikite in forum PayPal Express Checkout support
    Replies: 6
    Last Post: 19 Apr 2009, 08:14 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