Page 1 of 1
options
Posted: Wed Aug 24, 2011 6:29 pm
by yest
hello..
im using oc 1.5.1.1 and have a problem... when i add a checkbox option i can see that the option added to the shopping cart but when i try to confirm the order its not leting me to go on ...
the second problem is that in the shopping cart i see the output text of the options with Questions marks and a half of the text .. i using an hebrew lang...
i uploded a pic and and point to the problem with an arrow..
please help me
Re: options
Posted: Wed Aug 24, 2011 6:38 pm
by i2Paq
Does it work with the default theme and English language?
Re: options
Posted: Wed Aug 24, 2011 6:59 pm
by yest
i supose yes...
Re: options
Posted: Wed Aug 24, 2011 8:37 pm
by uksitebuilder
problem is due to substr() function shortening option values names etc
Because of hebrew language, php interpretter is getting the count incorrect of where to shorten the text and is cutting a character in half. Therefore rendering a '?'
Answer is to change substr() to mb_substr()
Problem with this is not all servers have the mbstring function installed.
This is a bug, but needs to be posted to the bug forum/topic
Re: options
Posted: Wed Aug 24, 2011 8:49 pm
by yest
thank u for u answer... u mean that i have to contact my server and asked theme to change to that ?
this is the reasen that the order confirm is stuck ?
Re: options
Posted: Wed Aug 24, 2011 9:56 pm
by yest
help please
Re: options
Posted: Thu Aug 25, 2011 3:33 am
by yest
uksitebuilder wrote:problem is due to substr() function shortening option values names etc
Because of hebrew language, php interpretter is getting the count incorrect of where to shorten the text and is cutting a character in half. Therefore rendering a '?'
Answer is to change substr() to mb_substr()
Problem with this is not all servers have the mbstring function installed.
This is a bug, but needs to be posted to the bug forum/topic
can u help me please im stuck...??
Re: options
Posted: Thu Aug 25, 2011 4:57 am
by uksitebuilder
There is no easy answer.
1. It is a bug in OC core code
2. to fix would require all substr() functions being replaced by mb_substr() function
This will not happen / be fixed that way because not every server has mbstring() functions/module installed with PHP by default.
I'm sorry but I do not know an easy fix for this.
Please post in the 1.5.1.1 bug topic where Daniel will see.
Re: options
Posted: Thu Aug 25, 2011 5:14 am
by yest
thank u ..i posted it in the bug topic...
Re: options
Posted: Thu Aug 25, 2011 5:25 am
by Xsecrets
well mbstring is very common on servers these days, and many programs have it as a requirement, so I don't know that it would be that big of deal to just have opencart require it.
Re: options
Posted: Thu Aug 25, 2011 5:30 am
by uksitebuilder
I know Daniel added it to 1.5.1 for catalog/model/catalog/product.php
But then people were posting that it was causing errors (because it not being installed)
So he changed it for 1.5.1.1
For some reason during the three or four uploads that took place when 1.5.1.1 was released, it crept back in due to some problems with Google SVN.
I'm pretty sure it will be gone again in the next update.
Re: options
Posted: Thu Aug 25, 2011 6:08 am
by Xsecrets
well let me expand my statement I don't think it would be a problem if done correctly. If you add it in the code you also need to add it to the requirements, and to the install checks.
options
Posted: Thu Aug 25, 2011 6:13 am
by uksitebuilder
I agree, it is very handy to have.
I just dont think Daniel will go for it, personally
Re: options
Posted: Thu Aug 25, 2011 6:22 am
by Xsecrets
well yeah I was just stating my opinion which very often is not the same as Daniel's.