Post by iWebdesign » Wed Jan 23, 2019 6:57 am

I have recently done a fresh install of 3.0.2.0 and added a Journal theme with maybe 2 or 3 extensions. I have done some test sales using Realex, Pay on delivery & Free Checkout.

On the payment success page for Realex i get this error message:
Notice: Undefined index: in /home/iwdstest/public_html/system/library/cart/currency.php on line 25Notice: Undefined index: in /home/iwdstest/public_html/system/library/cart/currency.php on line 26Notice: Undefined index: in /home/iwdstest/public_html/system/library/cart/currency.php on line 27Notice: Undefined index: in /home/iwdstest/public_html/system/library/cart/currency.php on line 30
Your payment has been authorised.
Please click here to continue

And when i try to view he order using the customer log in or within the admin panel it just goes to an error 500 page.

Here are lines 24 - 31 of my currency.php:
public function format($number, $currency, $value = '', $format = true) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = $this->currencies[$currency]['symbol_right'];
$decimal_place = $this->currencies[$currency]['decimal_place'];

if (!$value) {
$value = $this->currencies[$currency]['value'];
}

Any ideas on how to solve this issue?

Thanks

Newbie

Posts

Joined
Wed Jan 23, 2019 4:48 am

Post by straightlight » Sat Jan 26, 2019 11:33 pm

A currency setting has not been defined not properly in your admin - > systems - > localisation - > currencies.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by kevflood » Tue Oct 27, 2020 11:45 pm

I got this error on fresh install of 3.0.3.6 with Realex Redirect. I ended up hacking the code myself, changing \system\library\cart\currency.php:

Code: Select all

//$symbol_left = $this->currencies[$currency]['symbol_left'];
//$symbol_right = $this->currencies[$currency]['symbol_right'];
//$decimal_place = $this->currencies[$currency]['decimal_place'];
$symbol_left = '€';
$symbol_right = '';
$decimal_place = 2;
Not an ideal solution but at least customers can checkout without getting errors. Hopefully a proper fix emerges soon and I'll do that.

BTW, maybe it's related: I set up Euro as default currency and removed all others.

Newbie

Posts

Joined
Wed Sep 23, 2020 6:04 am

Post by straightlight » Wed Oct 28, 2020 2:01 am

Not a bug.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by kevflood » Thu Oct 29, 2020 4:37 am

I'm not sure what you mean by "not a bug". Some people are clearly getting the error in certain circumstances.

Anyway, I just wanted to post my hack/solution incase it was useful to anyone else experiencing this... phenomenon?

Newbie

Posts

Joined
Wed Sep 23, 2020 6:04 am

Post by sw!tch » Thu Oct 29, 2020 5:00 am

Its unlikely a : Undefined index: would throw a 500 error. You might have some other issue, check the server logs not opencart logs.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by kevflood » Thu Oct 29, 2020 4:23 pm

ok, there's been a slight misunderstanding. I was getting the first error, i.e.:

On the payment success page for Realex i get this error message:
Notice: Undefined index: in /home/iwdstest/public_html/system/library/cart/currency.php on line 25Notice: Undefined index: in /home/iwdstest/public_html/system/library/cart/currency.php on line 26Notice: Undefined index: in /home/iwdstest/public_html/system/library/cart/currency.php on line 27Notice: Undefined index: in /home/iwdstest/public_html/system/library/cart/currency.php on line 30
Your payment has been authorised.
Please click here to continue

I was not getting a 500 server error in orders (or anywhere else that I'm aware of).

Newbie

Posts

Joined
Wed Sep 23, 2020 6:04 am

Post by sw!tch » Thu Oct 29, 2020 6:46 pm

If it's happening on the success page then its most likely the payment module or callback from the payment module. If you paid for that extension reach out to the developer.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by labeshops » Wed Dec 02, 2020 6:54 am

And when i try to view he order using the customer log in or within the admin panel it just goes to an error 500 page.

Here are lines 24 - 31 of my currency.php:
public function format($number, $currency, $value = '', $format = true) {
$symbol_left = $this->currencies[$currency]['symbol_left'];
$symbol_right = $this->currencies[$currency]['symbol_right'];
$decimal_place = $this->currencies[$currency]['decimal_place'];

if (!$value) {
$value = $this->currencies[$currency]['value'];
}
I get the same issue on v3.0.3.2 using the default theme. Did you ever figure it out?

Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by sw!tch » Wed Dec 02, 2020 7:01 am

You need proper error logs. If getting a 500 check the server error log.

Just because its referencing the currency method doesn't mean that's the cause.

As mentioned above its most likely the extension failing to pass the required parameters back.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Who is online

Users browsing this forum: paulfeakins, shivankagrawal, SohBH and 37 guests