Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12358
Latest: KekoWorld
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 40096
Total Topics: 7060
Most Online Today: 79
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 63
Total: 63

Author Topic: Currency issues  (Read 14034 times)

0 Members and 1 Guest are viewing this topic.

Offline gibbs

  • Newbie
  • *
  • Posts: 33
  • Using SMF Gallery and Classifieds
    • View Profile
Currency issues
« on: August 08, 2008, 07:12:25 am »
Dear support,

I am in the UK and wish my default currency to be in Pounds Sterling.

I have set the currency in the SMF Classified Settings to "Pounds Sterling" but that does not seem to make it default throughout the rest of the site.

Examples are:

1. When a user lists a new item for sale, it defaults to "U.S. Dollars." in the picklist.

2. When a user views a listing that has been placed in Pounds Sterling, it shows the currency sign as a square (�) rather than a Pound sign ().

That is all I have found so far on this subject. I'll look out for more. If you have any suggestions on how I can make it default completely to pounds sterling, that would be most appreciated.

Cheers.

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Currency issues
« Reply #1 on: August 08, 2008, 12:08:27 pm »
In classifieds.template.php change every instance of
Code: [Select]
<option value="GBP">',$txt['class_cur_GBP'],'</option>to
Code: [Select]
<option selected value="GBP">',$txt['class_cur_GBP'],'</option>
...or change the order of the option values in the select object (put <option value="GBP">',$txt['class_cur_GBP'],'</option> at the top)

Offline gibbs

  • Newbie
  • *
  • Posts: 33
  • Using SMF Gallery and Classifieds
    • View Profile
Re: Currency issues
« Reply #2 on: August 08, 2008, 04:37:18 pm »
And again, thanks for the help. much appreciated.  :)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15052
    • View Profile
Re: Currency issues
« Reply #3 on: August 08, 2008, 06:45:26 pm »
Hold up on using that it may cause some issues with paypal payments if you change the values.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Currency issues
« Reply #4 on: August 09, 2008, 01:44:02 am »
SMFHacks, you are talking about the change of the order?
What will happen to paypal payments? A wrong currency will be passed to paypal?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15052
    • View Profile
Re: Currency issues
« Reply #5 on: August 09, 2008, 08:40:49 am »
If you change the value="GBP"  it may not work.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline gibbs

  • Newbie
  • *
  • Posts: 33
  • Using SMF Gallery and Classifieds
    • View Profile
Re: Currency issues
« Reply #6 on: August 11, 2008, 10:47:33 am »
So is there a better way to go about it please?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15052
    • View Profile
Re: Currency issues
« Reply #7 on: August 11, 2008, 07:20:19 pm »
1. Will have a fix for that.

2. What version of the classifieds are you running. I do have it defined for GBP
Code: [Select]
function formatprice($price,$currency)
{
if ($currency == 'USD')
return  '$' .  number_format($price, 2, '.', '');
else if ($currency == 'GBP')
return  '' .  number_format($price, 2, '.', '');
elseif ($currency == 'CAD')
return  '$' .  number_format($price, 2, '.', '');
elseif ($currency == 'AUD')
return  '$' .  number_format($price, 2, '.', '');
else
return $price . ' ' . $currency;

}
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Currency issues
« Reply #8 on: August 12, 2008, 05:33:23 am »
SMFhacks,

I am not changing any values. In my first solution I just add selected to the option tag. This only tells to the select box what is the default value.

In my second solution, a problem could exist only if you refer to the values with their number, for example: document.cprofile.currency.options[2].text

Anyway, I see that you have a first option:
Code: [Select]
<option value="', $modSettings['class_set_currency'], '">', $modSettings['class_set_currency'], '</option>in some of the selects. Maybe this should be added to all.


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15052
    • View Profile
Re: Currency issues
« Reply #9 on: August 12, 2008, 06:59:56 pm »
Added a fix like that.
But sill need a response about

2. What version of the classifieds are you running? I do have it defined for GBP so it should display the right character. Unless it is a character set issue.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline gibbs

  • Newbie
  • *
  • Posts: 33
  • Using SMF Gallery and Classifieds
    • View Profile
Re: Currency issues
« Reply #10 on: August 14, 2008, 11:05:15 am »
Sorry for the delay.

I have SMF version 1.1.5 and running Classifieds 1.2.4

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15052
    • View Profile
Re: Currency issues
« Reply #11 on: August 14, 2008, 08:11:15 pm »
1.2.6
!Fixed default currency to show the one in settings when adding an auction/listing
!Fixed possible pound sterling character display issue.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline gibbs

  • Newbie
  • *
  • Posts: 33
  • Using SMF Gallery and Classifieds
    • View Profile
Re: Currency issues
« Reply #12 on: August 18, 2008, 10:51:15 am »
Worked a treat. Thanks!

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
7590 Views
Last post July 02, 2008, 02:32:47 am
by vkot
Currency

Started by BRC MODELS « 1 2 » Support

17 Replies
12067 Views
Last post February 27, 2013, 11:03:56 am
by luiswr
1 Replies
1794 Views
Last post December 06, 2010, 07:29:19 pm
by SMFHacks
2 Replies
1860 Views
Last post June 17, 2012, 12:35:38 pm
by Maloxan
9 Replies
3902 Views
Last post June 18, 2012, 02:09:08 pm
by Maloxan

+- Recent Topics

[Mod]Telegram AutoPost Bot by SMFHacks
April 06, 2020, 03:38:36 pm

[Mod]SMF2WPBridge - Wordpress Login Bridge by SMFHacks
April 04, 2020, 07:16:59 pm

BUG Message Editor Pro1.0.5 by marcimila
April 04, 2020, 09:01:21 am

MOVED: BUG Message Editor Pro1.0.5 by SMFHacks
April 03, 2020, 07:54:07 pm

Only variables should be passed by reference by Zaphod
April 02, 2020, 11:19:11 am

Cannot install Gallery Pro on SMF 2.1 RC2 by Hatshepsut
March 19, 2020, 12:55:00 am

Newbie questions by SMFHacks
March 08, 2020, 09:28:17 am

Update detect mobile mode PHP5 to PHP7 by Plus
March 05, 2020, 11:19:05 am

Just a hello by Plus
March 05, 2020, 11:05:56 am

Enotify Copyright Problem by SMFHacks
March 04, 2020, 09:21:09 pm

Powered by EzPortal