Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Master] ECB bug currency rate? #12977

Closed
condor2 opened this issue Nov 18, 2023 · 17 comments
Closed

[Master] ECB bug currency rate? #12977

condor2 opened this issue Nov 18, 2023 · 17 comments

Comments

@condor2
Copy link
Contributor

condor2 commented Nov 18, 2023

What version of OpenCart are you reporting this for?
Master branch

Describe the bug

I have refreshed ECB currency and EURO vs USD is:

0.84602094 | 1.00000000

On 3.0.x.x is

0.91979397 | 1.00000000

Both oc version has this URL in ecb

https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

@condor2 condor2 changed the title [Master] ECB bug or Opencart? [Master] ECB bug currency rate? Nov 18, 2023
@ADDCreative
Copy link
Contributor

The calculations are different. Try.

$this->model_localisation_currency->editValueByCode($result['code'], $currencies[$result['code']] / $value);

@condor2
Copy link
Contributor Author

condor2 commented Nov 18, 2023

With that line changed work.

@mhcwebdesign
Copy link
Collaborator

Well, the value shown on OC 3.0.x.x is the correct one, the one from the OC 4 master branch appears to be wrong.

@TheCartpenter
Copy link
Contributor

So is the correct one from the opencart-3 originally.

@danielkerr
Copy link
Member

MOST LIKELY SOME NE POSTED A COMMIT TO MESS THINGS UP

@danielkerr
Copy link
Member

So is the correct one from the opencart-3 originally.

VERSION 3 DOES NOT HAVE ECB

@TheCartpenter
Copy link
Contributor

So is the correct one from the opencart-3 originally.

VERSION 3 DOES NOT HAVE ECB

It's sad to see that you seem to be a bit late in the news on this one since OC v3.0.x.x and opencart-3, both, have the ECB integrated already as you are the one who officially put the version number for it afterwards.

@danielkerr
Copy link
Member

versoin 3 stilll uses yahoo

@condor2
Copy link
Contributor Author

condor2 commented Nov 19, 2023

@condor2 condor2 closed this as completed Nov 19, 2023
@TheCartpenter
Copy link
Contributor

versoin 3 stilll uses yahoo

That's right, @danielkerr. Version 3 still uses Yahoo:

https://github.com/opencart/opencart/blob/3.0.x.x/upload/admin/controller/extension/currency/ecb.php

admin/controller/extension/currency/ecb.php
admin/model/extension/currency/ecb.php
admin/view/template/extension/currency/ecb.twig
catalog/controller/extension/currency/ecb.php
catalog/model/extension/currency/ecb.php
install/opencart.sql

@mhcwebdesign
Copy link
Collaborator

3.0.3.9 uses Yahoo, the latter has been defunct for quite a while now.
3.0.x.x uses the ecb, which I backported from OpenCart 4.
And it was also then copied over by @TheCartpenter to opencart-3.

Hope this clarifies it.

@TheCartpenter
Copy link
Contributor

The above is not entirely true in regard to 'copied'. It is not a verbatim copy while I did took portion of the MB as well to achieve this on the opencart-3 repository.

@danielkerr danielkerr reopened this Nov 19, 2023
@mhcwebdesign
Copy link
Collaborator

The above is not entirely true in regard to 'copied'. It is not a verbatim copy while I did took portion of the MB as well to achieve this on the opencart-3 repository.

OK, thanks for the clarification. BTW.: I can't see the Extensions > Extensions > Currency Rates in the admin backend of opencart-3, there should be one pointing to available currency engines.

@danielkerr
Copy link
Member

if anyone wants to maybe move some of the fixes accross

@danielkerr
Copy link
Member

i need to do another update foor opayo

@TheCartpenter
Copy link
Contributor

The above is not entirely true in regard to 'copied'. It is not a verbatim copy while I did took portion of the MB as well to achieve this on the opencart-3 repository.

OK, thanks for the clarification. BTW.: I can't see the Extensions > Extensions > Currency Rates in the admin backend of opencart-3, there should be one pointing to available currency engines.

Done.

@mhcwebdesign
Copy link
Collaborator

Done.

See also this issue: opencart/opencart-3#206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants