Forums / General Questions / Currency Sidebox Sort Order

Currency Sidebox Sort Order

Locked

Started by steven300 on 10 Mar 2008, 10:10 PM · Views: 2,182

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
10 Mar 2008, 10:10 PM
#1
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Currency Sidebox Sort Order

I was just wondering how to change the sort order for the currencies in the drop down sidebox. At the moment, when selected, it displays Euro, then GB Pound. I would like it the other way round. I can't see any sort order field in admin>localization>currencies.

13 Mar 2008, 3:02 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Currency Sidebox Sort Order

The display order is in tandem with the currency_ID setting in the database. In your case, Euro has a lower ID number than GB Pound.

I don't know enough about how currency is cross-referenced in the database to advise if you can just arbitrarily change the ID's to suit your desired display order, but I would imagine that there may be some "dangers" in doing this.

You would have to firstly determine how the database cross-references currency data, and if this is based on their ID's, it would be inadvisable to mess with it.

20 years a Zencart User

13 Mar 2008, 3:16 PM
#4
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Currency Sidebox Sort Order

Not sure, but in Admin/Localization/Currencies, can't you set the GB Pound as default, and make it show first?

Oh, Schoolboy beat me to it. He's probably right. You might not want to do that.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

13 Mar 2008, 3:20 PM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Currency Sidebox Sort Order

Get Em Fast:

Not sure, but in Admin/Localization/Currencies, can't you set the GB Pound as default, and make it show first?

Setting the default currency in Admin has no influence on its ID in the database.

The ID increment seems to be set chronologically, however - so if you start off with GB Pound as your FIRST and ONLY currency - then later ADD euro, it may then give GBP an ID of "1" and Euro an ID of "2" in the dbase.

If your store is not trading yet, try getting rid of ALL currencies, then add them again in the sort-order you want them to display. (Not sure if zencart will allow you to delete ALL currencies... ???)

20 years a Zencart User

13 Mar 2008, 3:24 PM
#6
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Currency Sidebox Sort Order

Well, schoolboy, sound like you know at least a little more about this than I do. I really wasn't sure, as I've never used anything but the U.S. Dollar, so I wasn't sure if making one default would change the sort order, or not. We need DrByte or Linda to answer this one, with a bit more insight, huh?

And, no........you can't delete the default currency......I just tried on test install.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

13 Mar 2008, 5:53 PM
#7
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Currency Sidebox Sort Order

Thanks for your replies.

I had a look at the database schema on the Wiki and searched for currencies_id and it just brought up the currencies table only, so I assume it's not cross-referenced.

I wasn't totally sure though so instead of changing the IDs around in the database, I deleted Euro from admin and installed it again. The auto-increment in the database has now issued Euro a higher number than GB. Before, GB was higher. However, it's still not changed the sort order. I tried clearing the cache in my browser.

I first thought it's displayed alphabetically, and not according to the DB ID. But I've seen many Zen sites with non-alphabetically displayed currencies.

22 May 2008, 4:16 PM
#8
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: Currency Sidebox Sort Order

I, too, was stumped by this but then came across this cool fix by Kuroi.