Page 1 of 2
undefined index in currency.php lines 25, 26, 27, 30
Posted: Thu Jun 02, 2016 10:19 pm
by brik
as above on a clean install of 2.2.0.0
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Fri Jun 03, 2016 6:55 pm
by inactiveaccount9912
Its some module or extension that doesnt send the currecy code to format as required by opencart 2.2. Where does this happen exactly?
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Fri Jun 03, 2016 8:37 pm
by dragonfly-ie
brik wrote:undefined index in currency.php lines 25, 26, 27, 30 on a clean install of 2.2.0.0
Same error here.

Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Fri Jun 03, 2016 9:30 pm
by i2Paq
When do you see that error?
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Sat Jun 04, 2016 11:23 pm
by brik
i2Paq wrote:When do you see that error?
Changing the status on an order from 'Processing' to 'Shipped'.
It happens on orders that are not foreign currency (ie they're in UK GBP)
It happens on about 1 in 4 or 1 in 5 orders.
Not possible to say that there's anything unique about the orders where it does happen.
After the error occurred the order processing went on and completed correctly, it sent the email out that we expected it to.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Tue Jun 07, 2016 10:09 pm
by dragonfly-ie
I have refreshed currency values manually (system>localisation>currencies) and the error seems to have vanished. HTH.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Tue Jun 07, 2016 11:34 pm
by inactiveaccount9912
Ive checked the default order model and all currency formats have the currency param. Maybe try the above trick d by @dragonfly-ie
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 1:08 am
by ebuild
Did anyone have any luck with this. I'm still having this issue on a fresh install.
It happens after a user makes a payment.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 6:34 am
by straightlight
Can you provide the full path to currency.php file? Obviously, an error message wouldn't just pop-up a file name without its path.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 5:06 pm
by brik
straightlight wrote:Can you provide the full path to currency.php file? Obviously, an error message wouldn't just pop-up a file name without its path.
cart/system/library/cart/currency.php on line 30
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 6:08 pm
by pm-netti
brik wrote:straightlight wrote:Can you provide the full path to currency.php file? Obviously, an error message wouldn't just pop-up a file name without its path.
cart/system/library/cart/currency.php on line 30
Opencart 2.2 is bug currency in method 'format' call in file catalog/contoller/account/voucher.php. You add bugs fix file:
https://github.com/pekka2/OpenCart-Migr ... .ocmod.xml
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 6:39 pm
by straightlight
Thanks pm-netti. It is good to know that the currencies in the 2.2.0.0 are strictly based on the store ID nowadays.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 7:49 pm
by ebuild
Have installed the bugs fix file as mentioned by pm-netti and still get this after making payment through Realex sandbox:
Notice: Undefined index: in /home/customername/public_html/system/library/cart/currency.php on line 25Notice: Undefined index: in /home/customername/public_html/system/library/cart/currency.php on line 26Notice: Undefined index: in /home/customername/public_html/system/library/cart/currency.php on line 27Notice: Undefined index: in /home/customername/public_html/system/library/cart/currency.php on line 30
This error is above the line that says "Your payment has been authorised.Please click here to continue"
Any other suggestions?
Thanks.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 7:52 pm
by straightlight
That is because the XML modifications does not include Realex while I do agree that this module is part of the core, however.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 8:05 pm
by ebuild
straightlight wrote:That is because the XML modifications does not include Realex while I do agree that this module is part of the core, however.
So should I contact Realex for an update to their code to try resolve the issue, or do you think its still a Opencart bug?
Thanks for you help.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 8:18 pm
by straightlight
The issue you're reporting above is with Opencart, It is not non-relative to Realex, in this case. Additional patching needs to be done over the XML in order to resolved these error lines.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Wed Jun 08, 2016 9:09 pm
by ebuild
straightlight wrote:The issue you're reporting above is with Opencart, It is not non-relative to Realex, in this case. Additional patching needs to be done over the XML in order to resolved these error lines.
Okay good to know. Hopefully someone will find a solution to the error.
Fingers crossed.
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Thu Jun 09, 2016 12:18 am
by straightlight
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Sun Jun 19, 2016 12:03 am
by dragonfly-ie
@straightlight et al: Is there a fix to stop WARNING on front page with SSL?
Re: undefined index in currency.php lines 25, 26, 27, 30
Posted: Sun Jun 19, 2016 9:35 am
by straightlight
dragonfly-ie wrote:@straightlight et al: Is there a fix to stop WARNING on front page with SSL?
It has been known that the currency from forms may not redirect to its target due to a hidden input form which most of web providers these days may decline due to CSRF vulnerabilities. It is also not in common programming practice to generically assign a post URL as a hidden field from an HTML form to redirect the browser to another location.
I can, however, recommend the use of the CSRF protection form to see if that will solved the issue. It is also compatible over SSL but not yet tested on TLS encryption.
Contribution:
http://www.opencart.com/index.php?route ... on_id=4773
Take note that this contribution does not reflect on any Opencart version since it is a globalized library. The only difference on its integration is with the new nowadays functionality of Opencart v2.2.0.0 and above into the framework but is still NOT an obligation to integrate it globally into your store as I do rather recommend that you initiate this library directly into your catalog/controller/common/currency.php file into the index() method. Then, as per my documentation indicates, to add the
echo line right below the:
<form tag line into your catalog/view/theme/<your_theme>/template/common/currency.tpl file.
Afterwards, clear out your cache navigation. Close the browser, re-open the browser and see if that solves the issue.