Page 1 of 2 12 LastLast
Results 1 to 10 of 28

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    UK
    Posts
    24
    Plugin Contributions
    0

    Default Dual Currency Display Mod

    A few people have asked how to display a second currency on the product page. Here is a little mod that we use.
    Hope it helps,
    Matt
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2006
    Posts
    53
    Plugin Contributions
    0

    Default Re: Dual Currency Display Mod

    This works beautifully on my 1.3.6 cart. See it here for Japanese Yen and US Dollars http://tinyurl.com/34lg7l

  3. #3
    Join Date
    Dec 2006
    Posts
    53
    Plugin Contributions
    0

    Default Re: Dual Currency Display Mod

    Matt,

    It displays the prices throughout the catalog very well. I would like the cart to display in two currencies also (shipping, subtotals and totals...sidebox cart also). I don't know how or where to edit the code. Any ideas? Thanks again.

    BTW. My default currency is set to JPY.

  4. #4
    Join Date
    Jan 2005
    Location
    UK
    Posts
    24
    Plugin Contributions
    0

    Default Re: Dual Currency Display Mod

    Mike,

    Yes it can be done, but it requires hacking the core code.

    In includes/modules/pages/shopping_cart/header_php.php find:
    Code:
    $cartShowTotal = $currencies->format($_SESSION['cart']->show_total());
    then beneath it put:
    Code:
    $original_currency = $_SESSION['currency'];
    $_SESSION['currency'] = EXTRA_CURRENCY;
    $cartShowTotalExtraCurrency = $currencies->format($_SESSION['cart']->show_total());
    $_SESSION['currency'] = $original_currency;
    Now drop $cartShowTotalExtraCurrency anywhere you like into your cart template to display the subtotal in your second currency.

    You can repeat this process for other values as needed.

  5. #5
    Join Date
    Jan 2005
    Location
    UK
    Posts
    24
    Plugin Contributions
    0

    Default Re: Dual Currency Display Mod

    Oh, by the way, your site looks great, but being from the UK I thought when I saw your shopping cart that the prices were in pounds sterling! You may wish to emphasise the Yen.

  6. #6
    Join Date
    Dec 2006
    Posts
    53
    Plugin Contributions
    0

    Default Re: Dual Currency Display Mod

    Hi Matt,

    Thanks for the reply. nice comment and the heads up. I'll check out the code. If you don't mind, did the prices come up Pounds Sterling on top and Yen on the bottom? It should be coming up USD on top and Yen on the bottom.

  7. #7
    Join Date
    Feb 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Dual Currency Display Mod

    Quote Originally Posted by MattC View Post
    Mike,

    Yes it can be done, but it requires hacking the core code.

    In includes/modules/pages/shopping_cart/header_php.php find:
    Code:
    $cartShowTotal = $currencies->format($_SESSION['cart']->show_total());
    then beneath it put:
    Code:
    $original_currency = $_SESSION['currency'];
    $_SESSION['currency'] = EXTRA_CURRENCY;
    $cartShowTotalExtraCurrency = $currencies->format($_SESSION['cart']->show_total());
    $_SESSION['currency'] = $original_currency;
    Now drop $cartShowTotalExtraCurrency anywhere you like into your cart template to display the subtotal in your second currency.

    You can repeat this process for other values as needed.

    Hellos..

    I do it from total in all pages and it's great, but i want add in prices uniques, Price Total...

    For example, Shopping Cart Price on Price Unit, Price Total..

    I add on Sub-Total: RD $500 / US $14.28 and looks great..

    I want this format in any place with Price RD $500 / US $14.28 ..

    Regards..
    Jose Bourdier

  8. #8
    Join Date
    Feb 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Dual Currency Display Mod

    Quote Originally Posted by jabe00 View Post
    Hellos..

    I do it from total in all pages and it's great, but i want add in prices uniques, Price Total...

    For example, Shopping Cart Price on Price Unit, Price Total..

    I add on Sub-Total: RD $500 / US $14.28 and looks great..

    I want this format in any place with Price RD $500 / US $14.28 ..

    Regards..
    Jose Bourdier
    This code add on


    includes/templates/template_default/templates/tpl_shopping_cart_default.php

    <div id="cartSubTotal"><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $cartShowTotal?> <?php echo SUB_TITLE_SUB_TOTAL_DIVIDER; ?> <?php echo $cartShowTotalExtraCurrency ?></div>

    and get this RD $500 / US $14.28 is great..

    Now, how can do it same there...

    <td class="cartUnitDisplay"><?php echo $product['productsPriceEach']; ?></td>

    <td class="cartTotalDisplay"><?php echo $product['productsPrice']; ?></td>

    I wan see same format RD $500 / US $14.28...

    thanks again...

  9. #9
    Join Date
    Apr 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: Dual Currency Display Mod

    Quote Originally Posted by Kansai_mike View Post
    This works beautifully on my 1.3.6 cart. See it here for Japanese Yen and US Dollars http://tinyurl.com/34lg7l
    Cheers for the work done on this great mod.

    Mike, I notice that you also have dual pricing on your product listing pages. Can you please pont me in the right direction to set this up? I can only get dual pricing on my product info page (tpl_product_info_display.php).

    Many thanks,

    Geo

  10. #10
    Join Date
    Apr 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: Dual Currency Display Mod

    I found the answer to my Q in the previous post:

    In the product_lisitng.php find this code:

    Code:
     $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
    Replace with this:

    Code:
    $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />' . zen_get_products_display_price_extra_currency($listing->fields['products_id']);

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v138a Super Orders mod for Dual Pricing mod to show Reseller on Packing Slip
    By kavlito in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 29 Dec 2012, 08:17 PM
  2. Google sometimes crawls with currency in URL.. USER CURRENCY mod
    By gaffettape in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 22 May 2011, 05:05 AM
  3. Making Dual Pricing Mod and Add Customer from Admin Mod Work Together
    By r2llc1605 in forum Customization from the Admin
    Replies: 5
    Last Post: 19 May 2009, 04:37 AM
  4. Dual Currency with Dual Gateways (USD/CAD)
    By farhansabir in forum General Questions
    Replies: 3
    Last Post: 30 Mar 2009, 07:31 PM
  5. A slightly different dual currency question -- certain products in a certain currency
    By gordonblack in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 18 Jul 2007, 01:10 AM

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