Hi,
Opencart Version 3.0.2.0 using default checkout and no other extensions active.
This error only occurs when using the mobile view - please see below;
** During checkout and filling in 'personal details', when entering an email address using the 'autocomplete' of whatever device you are using **
1, Start to enter the email address and then let autocomplete takes over to fill in the rest of the email field
2, When all of the required fields are filled in correctly press 'continue'
3, An error message appears which states 'email address does not appear to be valid'
I have tried different email addresses but it throws up the same error with them, but when I enter the same email address/s manually it is accepted an allows you to continue checkout.
Any help would be much appreciated.
Opencart Version 3.0.2.0 using default checkout and no other extensions active.
This error only occurs when using the mobile view - please see below;
** During checkout and filling in 'personal details', when entering an email address using the 'autocomplete' of whatever device you are using **
1, Start to enter the email address and then let autocomplete takes over to fill in the rest of the email field
2, When all of the required fields are filled in correctly press 'continue'
3, An error message appears which states 'email address does not appear to be valid'
I have tried different email addresses but it throws up the same error with them, but when I enter the same email address/s manually it is accepted an allows you to continue checkout.
Any help would be much appreciated.
Hi ,
Try after disable the autocomplete .
For example -
Thanks
Try after disable the autocomplete .
For example -
Code: Select all
<input type="email" name="email" autocomplete="off">
After further investigation, I'm going to post this on the Opencart report bugs problem as I'm now sure it's a fault and is affecting every opencart site I've tried.
It's actually to do with the predictive text/word feature which is found on most mobile devices and Opencart not recognising that an email address has been entered where the predictive email has been entered automatically.
It's actually to do with the predictive text/word feature which is found on most mobile devices and Opencart not recognising that an email address has been entered where the predictive email has been entered automatically.
You can go to "catalog\view\theme\default\template\checkout" and change it both file "payment_address.twig" and "shipping_address.twig" files. There you can find the input field . Just add autocomplete="off" same as i have mentioned in above reply.mike331487 wrote: ↑Mon Aug 20, 2018 8:56 pmThanks for your reply synapseindia,
Please, could you tell me which file needs to have this added to it to stop the autocomplete?
Also, you can create an ocmod for those changes. It will not impact on default files of opencart.
Thanks
Thanks for the reply, I will give it a try but don't think that it will work as it is the actual predictive text from the mobile phone/tablet that predicts the email address - for example:
On checkout the customer using his mobile phone fills in his details and starts to enter his email address, the predictive text feature on his mobile phone recognises from the first few letters which email he is typing in and predicts the email address, which the user can then select by clicking on it.
The email address is then entered into the email field on opencart but opencart thinks that there is nothing there and throws up the error message "email address does not appear to be valid'
Now the customer can't progress through the checkout any further - the only way round this is to actually enter the exact same email address manually, so it's not an issue with the email address.
The error effects every single opencart shop I've tried it on so I think that a lot of sellers will be losing potential orders as the customer is left unable to checkout.
On checkout the customer using his mobile phone fills in his details and starts to enter his email address, the predictive text feature on his mobile phone recognises from the first few letters which email he is typing in and predicts the email address, which the user can then select by clicking on it.
The email address is then entered into the email field on opencart but opencart thinks that there is nothing there and throws up the error message "email address does not appear to be valid'
Now the customer can't progress through the checkout any further - the only way round this is to actually enter the exact same email address manually, so it's not an issue with the email address.
The error effects every single opencart shop I've tried it on so I think that a lot of sellers will be losing potential orders as the customer is left unable to checkout.
Try using different browser and also try clearing your mobile browser’s cache and hit a try.
Opencart Expert | sales[at]ost.agency
Skype - manish.osuniverse | Gtalk - manishmt
Extensions for Opencart @ https://www.ost.agency/product/product- ... extensions
ost.agency - ecommerce website design, development and digital company
synapseindia wrote: ↑Tue Aug 21, 2018 8:47 pmYou can go to "catalog\view\theme\default\template\checkout" and change it both file "payment_address.twig" and "shipping_address.twig" files. There you can find the input field. Just add autocomplete="off" same as i have mentioned in above reply.mike331487 wrote: ↑Mon Aug 20, 2018 8:56 pmThanks for your reply synapseindia,
Please, could you tell me which file needs to have this added to it to stop the autocomplete?
Also, you can create an ocmod for those changes. It will not impact on default files of opencart.
Thanks
I've searched the above twig files for the code you suggest I add the extra code to (<input type="email")but they don't seem to contain the code in opencart 3.0.2.0 - or do I just need to add the full line of code as below?
<input type="email" name="email" autocomplete="off">
Thanks,
Ok, I think I've found what is causing the problem - when using predictive text on a mobile phone it adds a space after each word it inputs (so that there are spaces between words) so when it enters the email field there is a space after the email and opencart will not accept it, if the space is removed the email is accepted.
Please can someone tell me how I can make opencart accept an email address with a space at the end when the customer is entering their email during checkout.
Any help would be much appreciated.
Please can someone tell me how I can make opencart accept an email address with a space at the end when the customer is entering their email during checkout.
Any help would be much appreciated.
You can use trim function to remove extra spaces from input value.mike331487 wrote: ↑Thu Aug 23, 2018 2:10 amOk, I think I've found what is causing the problem - when using predictive text on a mobile phone it adds a space after each word it inputs (so that there are spaces between words) so when it enters the email field there is a space after the email and opencart will not accept it, if the space is removed the email is accepted.
Please can someone tell me how I can make opencart accept an email address with a space at the end when the customer is entering their email during checkout.
Any help would be much appreciated.
On controller file you can add trim function.
Fore reference - http://www.testingbrain.com/php-tutoria ... tring.html
Thanks
Thanks for your help synapseindia and the link to how to use the trim function.
I don't have much understanding of code but will try to learn how to use the trim function, could you please tell me which controller file I need to add the trim function to though?
Thanks
I don't have much understanding of code but will try to learn how to use the trim function, could you please tell me which controller file I need to add the trim function to though?
Thanks
You have to edit the files in "catalog\controller\checkout" directory .
Also, you can use trim function while getting values -
for example -
For more information related to opencart file structure you can visit to the opencart documentation panel.
Thanks.
Also, you can use trim function while getting values -
for example -
Code: Select all
$email = trim($this->request->post['email']);
Thanks.
I'm a bit confused - do I need to just add the below code or change some of the existing code?
$email = trim($this->request->post['email']);
Also regarding which files I need to change, will these be the /catalog/controller/checkout/guest.php and /catalog/controller/checkout/register.php?
Thanks,
$email = trim($this->request->post['email']);
Also regarding which files I need to change, will these be the /catalog/controller/checkout/guest.php and /catalog/controller/checkout/register.php?
Thanks,
You have to edit both files.
Also, i have posted an example how you can use trim function . You need to edit existing code no need to add extra field or code.
Thanks
Also, i have posted an example how you can use trim function . You need to edit existing code no need to add extra field or code.
Thanks
Solution already provided here: viewtopic.php?f=20&t=152761&p=732541#p732541
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The requested topic does not exist.straightlight wrote: ↑Mon Aug 27, 2018 7:39 pmSolution already provided here: viewtopic.php?f=20&t=152761&p=732541#p732541
I have posted an (untested) solution for this issue here:
viewtopic.php?f=125&t=206658&p=831849#p831849
viewtopic.php?f=125&t=206658&p=831849#p831849