hi,
I encounter a problem for currency.php syntax error,it happened after i work out a gift voucher and tried to send out.
The screen pop out a message box as attached,said that unexpected token and undefined index syntaxt parsererror happened in system/library/cart/currency.php line25,26,27 and 30
and then i checked out the corresponding code mentioned in the tip,but so far have no idea how to correct this code.
If i click the ok button to ignore,the gift voucher still could be received by recipient,but no green bar of response message tell sender like when it works good.
is someone have the same issue?
I encounter a problem for currency.php syntax error,it happened after i work out a gift voucher and tried to send out.
The screen pop out a message box as attached,said that unexpected token and undefined index syntaxt parsererror happened in system/library/cart/currency.php line25,26,27 and 30
and then i checked out the corresponding code mentioned in the tip,but so far have no idea how to correct this code.
If i click the ok button to ignore,the gift voucher still could be received by recipient,but no green bar of response message tell sender like when it works good.
is someone have the same issue?
Last edited by kate_brightman on Sun Aug 21, 2016 12:18 pm, edited 1 time in total.
We are not sure but blank values in currency setting can cause such issue.
Please ensure that you have values for following fields in System->localization->currencies->Your currency
1. Symbol Left: or Symbol Right:
2. Decimal Places:
Please ensure that you have values for following fields in System->localization->currencies->Your currency
1. Symbol Left: or Symbol Right:
2. Decimal Places:
Regards,
Knowband Team
Opencart Plugins: Knowband Store
Email: support@knowband.com
Yes,in edit currency page,there are values for each label,only there is one blank for symbol left or right.
However,we still tested to fill the same value,say $ to test if its caused by blank,but the same message alert popup.
Decimal we fill 2 all the time.
Actually,we never edit the currency page for the line 25,26 and 30,its weird why popup alert parser error,so we paid attention to the undefined index and unexpected token like system tip,its weird again,finally the gift voucher email can be received by customer successfully even though with the popup the error alert,only difference is that there is no green bar message to tip sender the email is successfully sent which is what we want.
However,we still tested to fill the same value,say $ to test if its caused by blank,but the same message alert popup.
Decimal we fill 2 all the time.
Actually,we never edit the currency page for the line 25,26 and 30,its weird why popup alert parser error,so we paid attention to the undefined index and unexpected token like system tip,its weird again,finally the gift voucher email can be received by customer successfully even though with the popup the error alert,only difference is that there is no green bar message to tip sender the email is successfully sent which is what we want.
Exactly which version of Opencart are you using?
Are you using some third party module to send gift voucher?
Did you recently upgrade your Opencart version?
Are you using some third party module to send gift voucher?
Did you recently upgrade your Opencart version?
Regards,
Knowband Team
Opencart Plugins: Knowband Store
Email: support@knowband.com
I installed oc 2.2,not upgrade,but i almost used the last version 2.2 before 2.3 comes out,and the gift voucher module is default,not a 3rd party one.I checked out the codes page and think maybe the error is coming from script code fragment,but not so sure,the send button script on the right above corner,just guess.
I also use 2.2 opencart with default gift certificate system and got the same error as well. I added currencies but none is left blank and they're actually working fine. And no, no gift is being actually sent besides the error. Did someone figure out what's up with that?
Update: 20 minutes later I actually got the gift I sent myself (lol). Still, why is there an error? Would appreciate some closure on the subject. 

Ok so this should led some light on the subject:
"Congratulations, You have received a Gift Certificate worth 10
This Gift Certificate has been sent to you by Ana"
10 what? See that's the problem. It doesn't know what currency is by default, so at the moment of producing it, it won't generate a conversion to a specific currency. Now this is a problem, as it may mean that it does not convert by currency at all, meaning that it can be 10€ and 10$ all the same, which is of course incorrect.
"Congratulations, You have received a Gift Certificate worth 10
This Gift Certificate has been sent to you by Ana"
10 what? See that's the problem. It doesn't know what currency is by default, so at the moment of producing it, it won't generate a conversion to a specific currency. Now this is a problem, as it may mean that it does not convert by currency at all, meaning that it can be 10€ and 10$ all the same, which is of course incorrect.
So I checked and it actually converts into other currencies. So the only problem besides the error itself is the syntax presented to the costumer as it 'rewards it with a number, not an actual currency value'.
p.s. Sorry for all the updates, my workflow does not allow me to be testing it step by step and then send a full conclusion on the subject. Just hope it was helpful.
p.s. Sorry for all the updates, my workflow does not allow me to be testing it step by step and then send a full conclusion on the subject. Just hope it was helpful.
Who is online
Users browsing this forum: No registered users and 9 guests