Shopping Cart Operations > Security
Critical Error Message - Currency rate not updated
everchanging:
Hi guys,
I received the following Critical error message:
Message status:
critical
Date:
...
Number of repetitions:
3
Currency Auto Updater Warning: Currency rate code GBP not updated. Trace: #0
…/admin/model/localisation/currency.php on line 230 #1
…/admin/controller/pages/index/home.php on line 173 #2 on line #3
…/core/engine/dispatcher.php on line 293 #4
…/core/engine/dispatcher.php on line 328
How can I resolve this?
abolabo:
1. you have enabled currency updater.
2. every time you login into admin it make api request to 3d-party service and ask currency exchenge rates for all of your currencies.
3. Abantecart have hardcoded API-key to make these requests. This key is free and have limitation.
4. To solve issue you shoult to get your own API-key here https://www.alphavantage.co
5. Then go to phpMyAdmin, open table settings and add row with this SQL query
--- Code: ---INSERT INTO `{your table_prefix}settings`( `store_id`, `group`, `key`, `value`) VALUES ( 0, 'details', 'alphavantage_api_key', '-your-own-api-key-');
--- End code ---
Just paste your table prefix and your own api-key value.
Or make it via phpMyAdmin adding new row form
everchanging:
Hi abalabo and thank you for your reply.
I did go to alphavantage and I did get my API Key.
Just for clarification reasons and to see if I have understood you correctly.
In the following code:
--- Code: ---INSERT INTO `{your table_prefix}settings`( `store_id`, `group`, `key`, `value`) VALUES ( 0, 'details', 'alphavantage_api_key', '-your-own-api-key-');
--- End code ---
I do the following changes (if I am wrong please correct me):
--- Code: ---{your table_prefix}
--- End code ---
-> This I DO change
--- Code: ---( `store_id`, `group`, `key`, `value`)
--- End code ---
->This I do NOT change
--- Code: --- 0, 'details',
--- End code ---
->This I do NOT change
--- Code: ---'alphavantage_api_key',
--- End code ---
-> I insert the API Key that I did receive
--- Code: ---'-your-own-api-key-'
--- End code ---
-> and what do I do here since the API Key that I did receive goes in the previous section?
I thank you in advance
abolabo:
--- Quote from: everchanging on March 22, 2019, 02:18:35 PM ---Hi abalabo and thank you for your reply.
I did go to alphavantage and I did get my API Key.
Just for clarification reasons and to see if I have understood you correctly.
In the following code:
--- Code: ---INSERT INTO `{your table_prefix}settings`( `store_id`, `group`, `key`, `value`) VALUES ( 0, 'details', 'alphavantage_api_key', '-your-own-api-key-');
--- End code ---
--- Code: ---'alphavantage_api_key',
--- End code ---
-> I insert the API Key that I did receive
--- Code: ---'-your-own-api-key-'
--- End code ---
-> and what do I do here since the API Key that I did receive goes in the previous section?
I thank you in advance
--- End quote ---
do not change ''alphavantage_api_key' - it's a name of setting.
Just replace -your-own-api-key- with API-key that you got
everchanging:
Hi Abolado, thanks for the quick reply.
So the only thing that I do change in the following code is:
--- Code: ---INSERT INTO `{your table_prefix}settings`( `store_id`, `group`, `key`, `value`) VALUES ( 0, 'details', 'alphavantage_api_key', '-your-own-api-key-');
--- End code ---
Is
--- Code: ---'-your-own-api-key-'
--- End code ---
-> with the API KEY that I did receive?
Thanks again
***Update:***
I apologize for the bombardment of my questions, but which table do I use for "your table_prefix"? I am looking at a ton of tables right now and I do not want to mess with them?
***Update 2:***
Instead of going to the database, can I not do the following?
To change directly the Api Key with the new that I did receive in the code below?
--- Code: --- public function updateCurrencies()
{
$this->load->model( 'setting/setting' );
$settings = $this->model_setting_setting->getSetting( 'details', 0 );
$api_key = isset( $settings['alphavantage_api_key'] ) && $settings['alphavantage_api_key'] ? $settings['alphavantage_api_key'] : '************'; <<<------ This one here -------
$base_currency_code = $settings['config_currency'];
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version