Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2008
    Posts
    28
    Plugin Contributions
    0

    Default displaying a price effected by currency.

    i want to display a price which will automatically change if different currency is selected.

    For example on discount information page.
    10% discount for the order over US $100.

    if customer select GB Pound currency, then it can automatically change to:
    10% discount for the order over GB £70

    how can i do it?

    thanks for any answers.

  2. #2
    Join Date
    Sep 2004
    Location
    Rocky Mountains, Colorado
    Posts
    2,936
    Plugin Contributions
    5

    Default Re: displaying a price effected by currency.

    Make an override copy of includes/languages/english/discount_coupon.php and replace these two lines
    Code:
    define('TEXT_COUPON_HELP_FIXED', '');
    define('TEXT_COUPON_HELP_MINORDER', '');
    with
    Code:
    define('TEXT_COUPON_HELP_FIXED', '%s off');
    define('TEXT_COUPON_HELP_MINORDER', ' for orders over %s');
    Then edit your coupon and leave the description completely blank. The displayed currency for the minimim order value will then automatically change according to the selection the customer has made, and the currency exchange value you have set for your currencies.

    You will find that the percentage off will be shown with 2 decimal places, ie 10.00% off for orders over $100
    If you want to change that so the percentage is shown with no decimal places, you need to replace this line in includes/modules/pages/discount_coupon/header_php.php
    Code:
            $text_coupon_help .= sprintf(TEXT_COUPON_HELP_FIXED, number_format($coupon->fields['coupon_amount'],2). '%');
    with
    Code:
            $text_coupon_help .= sprintf(TEXT_COUPON_HELP_FIXED, number_format($coupon->fields['coupon_amount'],0). '%');
    Neville
    An assumption is what you arrive at when you get tired of thinking...
    www.customcartmods.com

  3. #3
    Join Date
    Dec 2008
    Posts
    28
    Plugin Contributions
    0

    Default Re: displaying a price effected by currency.

    Thank you bunyip!!!

    i will give it a try!

  4. #4
    Join Date
    Oct 2006
    Posts
    5,486
    Plugin Contributions
    12

    Default Re: displaying a price effected by currency.

    This is what you should use

    echo $currencies->format(100);
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #5
    Join Date
    Dec 2008
    Posts
    28
    Plugin Contributions
    0

    Default Re: displaying a price effected by currency.

    Great Thanks to Yellow1912

    it works perfect!!!

 

 

Similar Threads

  1. Using 4 decimal places (Currency) whilst displaying only 2?
    By guyp in forum Managing Customers and Orders
    Replies: 11
    Last Post: 29 Sep 2010, 11:19 AM
  2. Subtotal, order total displaying in wrong currency
    By lukemcr in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 29 Jan 2009, 08:03 PM
  3. Displaying GBP and another user selectable currency
    By robgt in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 16 Jan 2009, 11:43 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
  •