Page 1 of 1

Opencart 3.1.0 alphacurrency issue

Posted: Tue Jul 10, 2018 4:58 pm
by 3PO2017
Currency is not being updated in 3.1.0 alpha
When click refresh currency button it shows "Success: You have modified currencies!" but exchange value always remain same.
I tried all free available fix in marketplace which are based on fixer.io , xe.com but non of them work anymore.
Same issue with OC 3.0.2
fixer.io fix was working with 3.0.2 but not anymore.
i tried to reinstall module but issue remains.

Re: Opencart 3.1.0 alphacurrency issue

Posted: Tue Jul 10, 2018 6:11 pm
by straightlight
Any error / access logs you could post regarding those refresh?

Re: Opencart 3.1.0 alphacurrency issue

Posted: Wed Jul 11, 2018 5:08 am
by 3PO2017
straightlight wrote:
Tue Jul 10, 2018 6:11 pm
Any error / access logs you could post regarding those refresh?
No , nothing in error log.

Re: Opencart 3.1.0 alphacurrency issue

Posted: Wed Jul 11, 2018 7:11 am
by straightlight
And the server access logs?

Re: Opencart 3.1.0 alphacurrency issue

Posted: Wed Jul 11, 2018 3:41 pm
by 3PO2017
straightlight wrote:
Wed Jul 11, 2018 7:11 am
And the server access logs?
No, nothing in server errors

Re: Opencart 3.1.0 alphacurrency issue

Posted: Wed Jul 11, 2018 5:12 pm
by 3PO2017
OK, Found that fixer.io have new API but opencart 3.1 and module available in market place using old api.
I try it with new api but no luck.

Step 1: Your API Access Key

This is your Access Key, your personal password for the fixer API.
Keep it safe! You can reset it at any time in your Account Dashboard.

Step 2: API Endpoints

There are 5 main API Endpoints (listed below) through which you can access different kinds of data, all starting out with this Base URL:

http://data.fixer.io/api/

Simply attach your unique Access Key to one of the endpoints as a query parameter:

http://data.fixer.io/api/latest?access_ ... dfwr324434

Endpoint URLs

// "latest" endpoint - request the most recent exchange rate data

http://data.fixer.io/api/latest

? access_key = YOUR_ACCESS_KEY
& base = GBP
& symbols = USD,AUD,CAD,PLN,MXN

//click on the URL above to get the most recent exchange
// rates for USD, AUD, CAD, PLN and MXN

Re: Opencart 3.1.0 alphacurrency issue

Posted: Wed Jul 11, 2018 7:37 pm
by straightlight
In your admin - > systems - > settings - > edit settings, ensure to enable the currency fixer. Then, in admin/controller/extension/currency/fixer.php file,

find:

Code: Select all

$response_info = json_decode($response, true);
add below:

Code: Select all

$this->log->write('Currency Fixer Log - ' . $response);
Retry the fixer. Then, check your OC error logs noticing a line beginning with: Currency Fixer Log . Do you see this line?

Re: Opencart 3.1.0 alphacurrency issue

Posted: Thu Jul 12, 2018 12:19 am
by 3PO2017
straightlight wrote:
Wed Jul 11, 2018 7:37 pm
In your admin - > systems - > settings - > edit settings, ensure to enable the currency fixer. Then, in admin/controller/extension/currency/fixer.php file,

find:

Code: Select all

$response_info = json_decode($response, true);
add below:

Code: Select all

$this->log->write('Currency Fixer Log - ' . $response);
Retry the fixer. Then, check your OC error logs noticing a line beginning with: Currency Fixer Log . Do you see this line?
with new api changed api link to this: curl_setopt($curl, CURLOPT_URL, 'http://data.fixer.io/api/latest?access_ ... HERE&base=' . $default);

now error log shows 2018-07-11 16:17:01 - Currency Fixer Log - {"success":false,"error":{"code":105,"type":"base_currency_access_restricted"}}

Re: Opencart 3.1.0 alphacurrency issue

Posted: Thu Jul 12, 2018 12:29 am
by 3PO2017
Ok, i found reason why its not working.
Fixer.io now have free and paid plans.
With free plan only works if you choose EUR as base currency.
So now if we want to use USD as base we have to pay $10/month

Re: Opencart 3.1.0 alphacurrency issue

Posted: Thu Jul 12, 2018 3:10 am
by straightlight
Good to know. Thank you for sharing this information. I will address this change on GitHub.

Re: Opencart 3.1.0 alphacurrency issue

Posted: Fri Jul 13, 2018 4:01 pm
by 3PO2017
Here is ocmod https://www.opencart.com/index.php?rout ... load_id=56
Which works perfectly.
It have update fixer.io and 3 other exchanger.
None of them totally free but openexchangerate.org have free plan with USD as base and 1000free api calls/month and also support all most all currencies.
fixer.io and other dont support all currencies.

Re: Opencart 3.1.0 alphacurrency issue

Posted: Mon Jul 30, 2018 3:00 am
by marnireges
Or maybe the blame is the lack of support for a given PHP version?