Comments (11)
Hi Andrew
Sorry for the delayed response - development was primarily based on the free version which converts values around the primary (USD) value.
What happens if you try including USD in the query (even if not specified as a currency in Commerce?), eg http://my.domain/actions/currency-layer/currency/fetch?currencies=THB,AUD,USD
then in the Currency Layer settings ensure that your primary currency is set to Thai Baht?
Cheers,
Cole
from currency-layer.
Hmmm, odd. If I set my Commerce currencies to THB and AUD (THB as primary) and then select THB as default/primary in Currency Layer settings. I get the Commerce settings updated.
Can you let me know the versions in use for Craft, Craft Commerce and Currency Layer?
from currency-layer.
We are facing the same issue, even with a setup that has USD (primary), EUR, GBP.
"source":"From Source (cached)",
"cacheDuration":21000,
"data":{
"success":true,
"terms":"https://currencylayer.com/terms",
"privacy":"https://currencylayer.com/privacy",
"timestamp":1591115765,
"source":"USD",
"quotes":{"USDUSD":1,
"USDEUR":0.8942799999999999638333747498109005391597747802734375,
"USDGBP":0.796769999999999978257392285740934312343597412109375
}}}
setup
PHP: 7.1.32
MySQL: 5.7.26
Craft CMS: 3.2.9
Craft Commerce: 2.1.11
from currency-layer.
Created a pull request that should fix this error
from currency-layer.
Hi folks. Got the same issue- all up to date; Craft 3.4.23, Commerce 3.1.7, currencylayer 1.0.3. PHP 7.4.2, MySQL 5.7.26. Base currency set to NZD
from currency-layer.
Hi Cole
I've got another project where I have the opportunity to use Currency Layer.
Any chance we could get that pull request integrated, to see if that fixes things.
Thanks in advance for any help or advice you may be able to give with this.
Cheers, Andrew
from currency-layer.
from currency-layer.
Hi Cole
Yes, of course! Your health is much more important than a plugin.
Please take as long as you need. Sorry if I was pushing too much.
Cheers, Andrew
from currency-layer.
Hi Cole
I really hate doing this to you, but it might be best to get everything done in one go, if possible. The other thing I would like to point out is a composer deprecation error:
Deprecation Notice: Class ournameismud\currencylayer\assetbundles\CurrencyLayer\CurrencyLayerAsset located in ./vendor/ournameismud/currency-layer/src/assetbundles/currencylayer/CurrencyLayerAsset.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
I believe Composer 2 is now in release candidate stage, so it would be great to have this fixed when you're back and healthy!
Thanks again for everything. I manually installed the patch, and with this working it's an absolutely wonderful and useful plugin!
Cheers, Andrew
from currency-layer.
Hi Cole
I know practically nothing about PHP and Composer and stuff, but I did happen to run across something that seems to fix that autoloading problem ... which is a very simple case issue.
It seems that all we need to do is change line 11 in CurrencyLayerAsset.php from this:
namespace ournameismud\currencylayer\assetbundles\CurrencyLayer;
to this:
namespace ournameismud\currencylayer\assetbundles\currencylayer;
Then the capitalisation on the namespace matches that of the directory path, and the deprecation notice goes away. And it did work in my test just now.
Hope this is of some help
Andrew
from currency-layer.
Hi
Thanks all for your ridiculous patients.
Unfortunately I have been unwell the last few months so not been able to pick up on these issues until now.
So, to note:
- I have pushed up a new version (1.04) that should fix the namespace issue with composer v2 (but please let me know
- I have pushed up a new version (1.05) that should provide some fixes for the following bugs:
- Commerce call if data from Cache (thanks for spotting/PR @boldenamsterdam)
- Build in more resilience for API callback (eg force object to array)
@boldenamsterdam @AndrewMac it would be great if you could pull down latest/composer update and confirm if these changes have fixed the problem
Ta, Cole
from currency-layer.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from currency-layer.