Hello professionals,
I need a little help... How can I disable the possibility a user to be able to add special characters in Shipping address or payments address, or even in the whole checkout text fields? I will use MyPos for Payment gateway and if there is a special symbol in the fields they cannot proceed with the payment so I need to disable user to add ""$#!№ and the other special symbols... Thank you in advance.
I need a little help... How can I disable the possibility a user to be able to add special characters in Shipping address or payments address, or even in the whole checkout text fields? I will use MyPos for Payment gateway and if there is a special symbol in the fields they cannot proceed with the payment so I need to disable user to add ""$#!№ and the other special symbols... Thank you in advance.
You can try adding a javascript function, and use the keypress event, to either show a warning about special character or block it completelycepcemuh wrote: ↑Fri Oct 11, 2019 4:03 amHello professionals,
I need a little help... How can I disable the possibility a user to be able to add special characters in Shipping address or payments address, or even in the whole checkout text fields? I will use MyPos for Payment gateway and if there is a special symbol in the fields they cannot proceed with the payment so I need to disable user to add ""$#!№ and the other special symbols... Thank you in advance.
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo
Thank you for the advice but I think it will be better with a validation but cannot find where is the validation in opencart files...rjcalifornia wrote: ↑Fri Oct 11, 2019 2:52 pmYou can try adding a javascript function, and use the keypress event, to either show a warning about special character or block it completelycepcemuh wrote: ↑Fri Oct 11, 2019 4:03 amHello professionals,
I need a little help... How can I disable the possibility a user to be able to add special characters in Shipping address or payments address, or even in the whole checkout text fields? I will use MyPos for Payment gateway and if there is a special symbol in the fields they cannot proceed with the payment so I need to disable user to add ""$#!№ and the other special symbols... Thank you in advance.
Don't annoy the user, just run it though this before you send to the gateway:cepcemuh wrote: ↑Fri Oct 11, 2019 4:03 amHello professionals,
I need a little help... How can I disable the possibility a user to be able to add special characters in Shipping address or payments address, or even in the whole checkout text fields? I will use MyPos for Payment gateway and if there is a special symbol in the fields they cannot proceed with the payment so I need to disable user to add ""$#!№ and the other special symbols... Thank you in advance.
https://stackoverflow.com/questions/141 ... m-a-string
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Yes, I saw this link in stackoverflow but I am asking for instructions here and help...paulfeakins wrote: ↑Fri Oct 11, 2019 4:47 pmDon't annoy the user, just run it though this before you send to the gateway:cepcemuh wrote: ↑Fri Oct 11, 2019 4:03 amHello professionals,
I need a little help... How can I disable the possibility a user to be able to add special characters in Shipping address or payments address, or even in the whole checkout text fields? I will use MyPos for Payment gateway and if there is a special symbol in the fields they cannot proceed with the payment so I need to disable user to add ""$#!№ and the other special symbols... Thank you in advance.
https://stackoverflow.com/questions/141 ... m-a-string
If you're not a programmer, probably post it as a paid job in Commercial Support.
You'll need to be modify the payment gateway itself which isn't a built-in one, so may be best done by a professional.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Here's an example on how to deal with special characters:cepcemuh wrote: ↑Fri Oct 11, 2019 9:53 pmYes, I saw this link in stackoverflow but I am asking for instructions here and help...paulfeakins wrote: ↑Fri Oct 11, 2019 4:47 pmDon't annoy the user, just run it though this before you send to the gateway:cepcemuh wrote: ↑Fri Oct 11, 2019 4:03 amHello professionals,
I need a little help... How can I disable the possibility a user to be able to add special characters in Shipping address or payments address, or even in the whole checkout text fields? I will use MyPos for Payment gateway and if there is a special symbol in the fields they cannot proceed with the payment so I need to disable user to add ""$#!№ and the other special symbols... Thank you in advance.
https://stackoverflow.com/questions/141 ... m-a-string
viewtopic.php?t=6600
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo
Thank you very much, I reviewed and made some tests but with no success...rjcalifornia wrote: ↑Sun Oct 13, 2019 2:04 amHere's an example on how to deal with special characters:
viewtopic.php?t=6600
You can clean the fields in function create_post at catalog/controller/extension/payment/mypos_virtual.php
as example:
would become:
if you add that function to the class:
do the same for the other fields you wish to clean.
as example:
Code: Select all
$post['CustomerAddress'] = $order_info['payment_address_1'];
Code: Select all
$post['CustomerAddress'] = $this->noSpecialCharacters($order_info['payment_address_1']);
Code: Select all
private function noSpecialCharacters($str) {
return preg_replace('/[^A-Za-z0-9\-]/', '', $str);
}
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Who is online
Users browsing this forum: Bing [Bot] and 264 guests