Page 1 of 1

0 Attempt to assign property "exchange_rate" on bool

Posted: 19 Sep 2022, 19:28
by Nidzo
I'm playing with Phoca Cart 4.0.3 on my localhost and after changing currencies I can't access Orders anymore. I'm getting error
0 Attempt to assign property "exchange_rate" on bool

Everything else works O.K.
Here is debug trace

Code: Select all

error - Uncaught Throwable of type Error thrown with message "Attempt to assign property "exchange_rate" on bool". Stack trace: #0 [ROOT]\administrator\components\com_phocacart\views\phocacartorders\tmpl\default.php(242): PhocacartPrice->setCurrency(1, 4) #1 [ROOT]\libraries\src\MVC\View\HtmlView.php(410): include('C:\\wamp64\\www\\z...') #2 [ROOT]\libraries\src\MVC\View\HtmlView.php(203): Joomla\CMS\MVC\View\HtmlView->loadTemplate(NULL) #3 [ROOT]\administrator\components\com_phocacart\views\phocacartorders\view.html.php(68): Joomla\CMS\MVC\View\HtmlView->display(NULL) #4 [ROOT]\libraries\src\MVC\Controller\BaseController.php(639): PhocaCartCpViewPhocacartOrders->display() #5 [ROOT]\administrator\components\com_phocacart\controller.php(91): Joomla\CMS\MVC\Controller\BaseController->display(false, Array) #6 [ROOT]\libraries\src\MVC\Controller\BaseController.php(672): phocaCartCpController->display() #7 [ROOT]\administrator\components\com_phocacart\phocacart.php(25): Joomla\CMS\MVC\Controller\BaseController->execute('') #8 [ROOT]\libraries\src\Dispatcher\LegacyComponentDispatcher.php(71): require_once('C:\\wamp64\\www\\z...') #9 [ROOT]\libraries\src\Dispatcher\LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('C:\\wamp64\\www\\z...') #10 [ROOT]\libraries\src\Component\ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() #11 [ROOT]\libraries\src\Application\AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent('com_phocacart') #12 [ROOT]\libraries\src\Application\AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch() #13 [ROOT]\libraries\src\Application\CMSApplication.php(294): Joomla\CMS\Application\AdministratorApplication->doExecute() #14 [ROOT]\administrator\includes\app.php(61): Joomla\CMS\Application\CMSApplication->execute() #15 [ROOT]\administrator\index.php(32): require_once('C:\\wamp64\\www\\z...') #16 {main}

Image

Re: 0 Attempt to assign property "exchange_rate" on bool

Posted: 19 Sep 2022, 21:56
by Jan
Hi, do you get the same problem with latest Beta?
https://github.com/PhocaCz/PhocaCart/re ... 5Beta9.zip

What exactly mean "after changing currency"? Can you somehow describe it in more details so I can simulate it on my test servers.

Thank you, Jan

EDIT:

I see now. Did you remove the currency? If yes, the order cannot find such currency and it ends with error. I will try to add some solution there.

Re: 0 Attempt to assign property "exchange_rate" on bool

Posted: 19 Sep 2022, 22:18
by Nidzo
I was adding new currency, changing default one and ended with deleting Euro and leaving Serbian Dinar only. I tried to recreate both currencies but I get same error.
Tried latest beta but without luck.

Re: 0 Attempt to assign property "exchange_rate" on bool

Posted: 19 Sep 2022, 22:22
by Jan
Hi, try to test this version:
https://github.com/PhocaCz/PhocaCart/re ... Beta10.zip

There should not be any error displayed.

Jan

Re: 0 Attempt to assign property "exchange_rate" on bool

Posted: 19 Sep 2022, 22:50
by Nidzo
Thanks Jan! Works great 👍🏻.

Re: 0 Attempt to assign property "exchange_rate" on bool

Posted: 19 Sep 2022, 22:55
by Jan
Ok, great to hear it.

Jan