VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: HenrikS on October 06, 2022, 02:44:55 AM

Title: Currency changer
Post by: HenrikS on October 06, 2022, 02:44:55 AM
Currency changer not working just stays on the same amount on each currency instead of switching the value.

Also the currency list just says 0.0000 on all currencies.

Any ideas how the get that to work. Running on Joomla 4.2.3 Virtuemart 4.0.7.10717 ----- Php8.1.11 MariaDB 10.6.10
Title: Re: Currency changer
Post by: HenrikS on October 07, 2022, 05:01:26 AM
Does anyone have a solution for this?
Title: Re: Currency changer
Post by: Milbo on October 08, 2022, 23:11:07 PM
Works for me, you must press the button. We may should change that, so if you select a currency, it should reload the page directly. There is no reason for a button and waiting, right.
Title: Re: Currency changer
Post by: HenrikS on October 10, 2022, 14:59:40 PM
It only changes the currency symbol .. not the amount .. also tried with a fresh install.
Title: Re: Currency changer
Post by: HenrikS on October 14, 2022, 04:02:29 AM
I have tried everything now even a clean install og Joomla 4.2.3 and VM4.0.7.10720.

It only changes the Currency symbol NOT the amount.

Cowboy Hat

Base price for variant: £10.00
Sales price: £12.00
Sales price without tax: £10.00
Tax amount: £2.00

Base price for variant: $10.00
Sales price: $12.00
Sales price without tax: $10.00
Tax amount: $2.00

Base price for variant: 10,00 €
Sales price: 12,00 €
Sales price without tax: 10,00 €
Tax amount: 2,00 €
Title: Re: Currency changer
Post by: GJC Web Design on October 14, 2022, 11:08:48 AM
I assume the currency rates have been set?

administrator/index.php?option=com_virtuemart&view=currency
Title: Re: Currency changer
Post by: hazael on October 14, 2022, 11:10:19 AM
Quote from: HenrikS on October 14, 2022, 04:02:29 AM
It only changes the Currency symbol NOT the amount.
I confirm. I have the same problem on my test website.
https://szeregowe.pl

But I guess it might be a template problem. I don't see this bug everywhere
Title: Re: Currency changer
Post by: HenrikS on October 18, 2022, 03:42:12 AM
Did anyone find a solution for this yet?
Title: Re: Currency changer
Post by: Milbo on October 18, 2022, 14:56:27 PM
I just can say there is no problem on j3, currently. Maybe it is a PHP8.1 or J4.2 problem.
Title: Re: Currency changer
Post by: hazael on October 18, 2022, 15:08:21 PM
By default, the daily.xml file should be generated to the "/administrator/cache" directory
However, this is not in this case

Does not work with Joomla 4 and Joomla 3.
Does not work with PHP 8.0 and PHP 7.4

Maybe a problem with PHP setup to connect to ecb? but I don't think so. Older versions of VMs work fine on the same server

I think it stopped working for me - since was added to the configuration the option "price by currency". By default I have 0
Older VM versions worked with my new template. I used the default Virtuemart template - it doesn't change anything

Milbo - maybe it works only for you, because an incomplete update has been made available again?  ;)
Title: Re: Currency changer
Post by: jenkinhill on October 18, 2022, 15:46:22 PM
Just tested on VM 4.0.7 10720 on J3.10.11 and confirm that while the currency symbols change the figures do not.

The data file in the /cache/convertECB   ( ####-cache-convertECB-#### ) is not downloaded daily as it should be.
Title: Re: Currency changer
Post by: Milbo on October 18, 2022, 20:48:19 PM
Quote from: hazael on October 18, 2022, 15:08:21 PM
By default, the daily.xml file should be generated to the "/administrator/cache" directory
However, this is not in this case

Does not work with Joomla 4 and Joomla 3.
Does not work with PHP 8.0 and PHP 7.4

Maybe a problem with PHP setup to connect to ecb? but I don't think so. Older versions of VMs work fine on the same server

I think it stopped working for me - since was added to the configuration the option "price by currency". By default I have 0
Older VM versions worked with my new template. I used the default Virtuemart template - it doesn't change anything

Milbo - maybe it works only for you, because an incomplete update has been made available again?  ;)

Thank you for this intensive testing on different versions. The problem was indeed the last committ of the currencydisplay.php. It checked the value on empty, but it was set in the constructor with 1, so it was always executed. The value is in the constructor since all times, literally.  I had the old cache file and so it worked for me for a simpel test. But did not update the currency rates. Great that we found that one.
Title: Re: Currency changer
Post by: Milbo on October 19, 2022, 20:12:08 PM
Please test https://dev.virtuemart.net/attachments/1337/com_virtuemart.4.0.7.10722_package_or_extract.zip
Title: Re: Currency changer
Post by: sirius on October 20, 2022, 10:08:20 AM
Hello Milbo,
just an aside to point out that the transition from version 4.0.7 10720 to 4.0.7 10720 causes this error:
0 Call to undefined method VmConfig::updateDbEntry()
Title: Re: Currency changer
Post by: Jörgen on October 20, 2022, 13:09:02 PM
Quotetransition from version 4.0.7 10720 to 4.0.7 10720
:o

Try another update with the same version, error may go away.

Jörgen
Title: Re: Currency changer
Post by: Milbo on October 20, 2022, 13:19:13 PM
I tried in special this installer on a very old version to test for this error. I did not have that problem :-( . You can just repeat the installation, then vm loads in any case the new file with the new function.
Title: Re: Currency changer
Post by: HenrikS on October 20, 2022, 19:01:01 PM
Currency changer is working fine now on J4.2.3 VM4.0.7.10722 on php8.1.11

Great work ;-)