[Skip to main content](#vessel-content)

#   FX currency factor for SAR and XDR is 1

##

- **[hactic](/forum/user/32281-hactic "View hactic's Profile")**
- [![hactic's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32281-hactic "View hactic's Profile") Topic Author
- [ Offline](/forum/user/32281-hactic)

Less More

- Posts: 35
- Thank you received: 3
-
- [](https://shop.smartgart.com)
-

10 years 4 months ago [\#244697](#244697) by [hactic](/forum/user/32281-hactic "View hactic's Profile")  *[FX currency factor for SAR and XDR is 1](/forum/27-checkout/885406-fx-currency-factor-for-sar-and-xdr-is-1#244697 "-- url of the page with the problem -- :   shop.smartgart.com  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : SAR 1 XDR 1  Hi, I am running HikaShop Business on default currency Euro and consume hourly currency (FX) updates.  Looking into ... &gt; Hikashop &gt; Configuration &gt; System &gt; Currency, I am successfully using CHF, USD and other major currencies. But it looks like as if SAR (Saudi Ryial) and XDR (IMF special drawing rights) are not updated because they stand on 1 (rather than a meaningful fractional number).  Perhaps they can be included in the future because I am targeting Arabic clients, and XDR is useful for customs declarations (the 300 XDR limit for CN 23 exports).  best regards  Klaus")* was created by *[hactic](/forum/user/32281-hactic "View hactic's Profile")*

-- url of the page with the problem -- : [ shop.smartgart.com](http://shop.smartgart.com)
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.5
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : SAR 1
XDR 1

Hi, I am running HikaShop Business on default currency Euro and consume hourly currency (FX) updates.

Looking into ... &gt; Hikashop &gt; Configuration &gt; System &gt; Currency, I am successfully using CHF, USD and other major currencies. But it looks like as if SAR (Saudi Ryial) and XDR (IMF special drawing rights) are not updated because they stand on 1 (rather than a meaningful fractional number).

Perhaps they can be included in the future because I am targeting Arabic clients, and XDR is useful for customs declarations (the 300 XDR limit for CN 23 exports).

best regards

Klaus

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQwNi1meC1jdXJyZW5jeS1mYWN0b3ItZm9yLXNhci1hbmQteGRyLWlzLTE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

10 years 4 months ago [\#244699](#244699) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[FX currency factor for SAR and XDR is 1](/forum/27-checkout/885406-fx-currency-factor-for-sar-and-xdr-is-1#244699 "-- url of the page with the problem -- :   shop.smartgart.com  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : SAR 1 XDR 1  Hi, I am running HikaShop Business on default currency Euro and consume hourly currency (FX) updates.  Looking into ... &gt; Hikashop &gt; Configuration &gt; System &gt; Currency, I am successfully using CHF, USD and other major currencies. But it looks like as if SAR (Saudi Ryial) and XDR (IMF special drawing rights) are not updated because they stand on 1 (rather than a meaningful fractional number).  Perhaps they can be included in the future because I am targeting Arabic clients, and XDR is useful for customs declarations (the 300 XDR limit for CN 23 exports).  best regards  Klaus")*

Hi,

The currency rate auto update plugin uses the rates from either the European Central Bank or Yahoo Finances.
So for the rates to be updated for your currency, it requires that the service you selected supports that currency, and that this service uses the same currency code than the currency code set for that currency in HikaShop.
So either the currency code is different (you can check it in the menu System&gt;Currencies and change it if necessary) or the service you selected doesn't support the currency you're using.

The following user(s) said Thank You: [hactic](/forum/user/32281-hactic "View hactic's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQwNi1meC1jdXJyZW5jeS1mYWN0b3ItZm9yLXNhci1hbmQteGRyLWlzLTE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[hactic](/forum/user/32281-hactic "View hactic's Profile")**
- [![hactic's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32281-hactic "View hactic's Profile") Topic Author
- [ Offline](/forum/user/32281-hactic)

Less More

- Posts: 35
- Thank you received: 3
-
- [](https://shop.smartgart.com)
-

10 years 2 months ago -  10 years 2 months ago [\#250351](#250351) by [hactic](/forum/user/32281-hactic "View hactic's Profile")  Replied by *[hactic](/forum/user/32281-hactic "View hactic's Profile")* on topic *[FX currency factor for SAR and XDR is 1](/forum/27-checkout/885406-fx-currency-factor-for-sar-and-xdr-is-1#250351 "-- url of the page with the problem -- :   shop.smartgart.com  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : SAR 1 XDR 1  Hi, I am running HikaShop Business on default currency Euro and consume hourly currency (FX) updates.  Looking into ... &gt; Hikashop &gt; Configuration &gt; System &gt; Currency, I am successfully using CHF, USD and other major currencies. But it looks like as if SAR (Saudi Ryial) and XDR (IMF special drawing rights) are not updated because they stand on 1 (rather than a meaningful fractional number).  Perhaps they can be included in the future because I am targeting Arabic clients, and XDR is useful for customs declarations (the 300 XDR limit for CN 23 exports).  best regards  Klaus")*

Thanks Nicolas - I overlooked your answer by the time, became silly and coded a little workaround (and probably re-invented the wheel) and now directly insert into the database from a php page that is hourly called from a cron-job. Yahoo has all those exotic currencies; unfortunately PayPal does not handle them. Your suggestion is perfect.

best regards

Klaus

Code:

wget "http://www.....com/import/fx-xdr.php" -O /dev/null -o /dev/null fx-xdr.php: &lt;?php $content = file_get_contents('http://download.finance.yahoo.com/d/quotes.csv?s=EURXDR=X&amp;f=nab'); $tok = explode(',', $content); $fx = 0.1; // chose low value as default (currently roundabout 0.8) if($tok[1] &gt; 0 &amp;&amp; $tok[2] &gt; 0) $fx = ($tok[1] + $tok[2]) / 2; else if($tok[1] &gt; 0) $fx = $tok[1]; else if($tok[2] &gt; 0) $fx = $tok[2]; $time = time(); $mysqli = new MySQLi("localhost", ...); if($mysqli-&gt;connect_errno) printf("%d: %s&lt;br&gt;/n", $mysqli-&gt;connect_errno, $mysqli-&gt;connect_error); $update = "UPDATE joomla_hikashop_currency SET currency_rate = '$fx', currency_modified = '$time' WHERE currency_code = 'XDR'"; if ($mysqli-&gt;query($update) === TRUE) { echo "Record updated successfully"; } else { echo "Error updating record: " . $mysqli-&gt;error; } ?&gt;

Last edit: 10 years 2 months ago by [hactic](/forum/user/32281-hactic "View hactic's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQwNi1meC1jdXJyZW5jeS1mYWN0b3ItZm9yLXNhci1hbmQteGRyLWlzLTE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 2 months ago [\#250352](#250352) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[FX currency factor for SAR and XDR is 1](/forum/27-checkout/885406-fx-currency-factor-for-sar-and-xdr-is-1#250352 "-- url of the page with the problem -- :   shop.smartgart.com  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5 -- Browser(s) name and version -- : Chrome -- Error-message(debug-mod must be tuned on) -- : SAR 1 XDR 1  Hi, I am running HikaShop Business on default currency Euro and consume hourly currency (FX) updates.  Looking into ... &gt; Hikashop &gt; Configuration &gt; System &gt; Currency, I am successfully using CHF, USD and other major currencies. But it looks like as if SAR (Saudi Ryial) and XDR (IMF special drawing rights) are not updated because they stand on 1 (rather than a meaningful fractional number).  Perhaps they can be included in the future because I am targeting Arabic clients, and XDR is useful for customs declarations (the 300 XDR limit for CN 23 exports).  best regards  Klaus")*

Hi,

I recommend you to use the JDatabase structure in order to access to the website database.
It will be easier and more secure.
[ docs.joomla.org/Accessing\_the\_database\_using\_JDatabase](https://docs.joomla.org/Accessing_the_database_using_JDatabase)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [hactic](/forum/user/32281-hactic "View hactic's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTQwNi1meC1jdXJyZW5jeS1mYWN0b3ItZm9yLXNhci1hbmQteGRyLWlzLTE/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.060 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
