Change sequence of currencies in dropdown selectio

  • Jono
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 2 months ago #100516 by Jono
When enabling multiple currencies, is there a way to re-order these currencies in the drop down list for the frontend donors?

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #100652 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Change sequence of currencies in dropdown selectio
Hi Enoch,
You can change the order of currencies by modifying file: root > components > com_jdonation > helpers > currencies.php
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • Jono
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 1 month ago #101949 by Jono
Hi Dam,
Thank you for your help - I don't think that is the right file to edit.
I checked it and it has a long alphabetical list of currencies.
However, the dropdown list in the frontend of the web site when a user wants to make a donation has far fewer currencies, and is sorted quite differently - starting with Canadian Dollars and then Euros at the top.
How do I change the sequence of the currencies in this frontend dropdown?

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #101961 by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Change sequence of currencies in dropdown selectio
Hi,
Here are solution.
1. Open file: root > components > com_jdonation > view > donation > html.php
2. Find:
Code:
$query->clear(); $query->select('currency_code, currency_name') ->from('#__jd_currencies'); if ($config->active_currencies) { $activeCurrencies = explode(',', $config->active_currencies) ; $query->where('currency_code IN ("'.implode('","', $activeCurrencies).'")'); }

and add this line below:
Code:
$query->order('currency_code');

By this way, the currencies will be ordered by Currency Code (Alphabetic)

Thanks
Dam

Please Log in or Create an account to join the conversation.

Moderators: Dang Thuc DamDang Dam