Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Drop-down Currency Box


jeffuk123

Recommended Posts

  • 2 weeks later...
  • 4 months later...
Posted

I have a similar problem

 

USD is at the top but my default currency is New Zealand Dollars

 

Does any one know how to re-order the list?

Posted

It looks like the currencies are listed in the order that they appear in the database, so getting the order you want is as simple as reordering the database currencies table. If you have access to phpMyAdmin you could just update the database using the raw SQL commands something like this...

 

TRUNCATE TABLE `currencies`;
INSERT INTO `currencies` VALUES (0, 'New Zealand Dollar', 'NZD', 'NZ$', '', '.', ',', '2', 2.70830011, '2008-09-16 13:17:31' );
INSERT INTO `currencies` VALUES (0, 'Australian Dollar', 'AUD', 'AU$', '', '.', ',', '2', 2.20700002, '2008-09-16 13:19:21' );
INSERT INTO `currencies` VALUES (0, 'Euro', 'EUR', '€', '', '.', ',', '2', 1.25899994, '2008-09-16 13:19:20' );
INSERT INTO `currencies` VALUES (0, 'British Pound', 'GBP', '£', '', '.', '', '2', 1.00000000, '2008-09-16 13:19:20' );
INSERT INTO `currencies` VALUES (0, 'US Dollar', 'USD', '$', '', '.', ',', '2', 1.79709995, '2008-09-16 13:19:19' );

Specifying an index of 0 for each line means SQL auto-increment will apply the new lines starting at 1, then 2, etc. The order in the pull down menu would then reflect the order you put above. As far as I can see, osC uses the 3 letter currency code and not the index in the database to record info about currencies, so this should work even for a shop that's been running for ages.

 

Make sure you put the exchange rates for your default currency though (or update them in the admin back office straight afterwards). The ones listed above are for GBP as my shop is UK based. :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...