Author |
Topic |
|
soncci
VP-CART New User
USA
97 Posts |
Posted - March 06 2014 : 14:47:45
|
I need to put minimum limit size to my customers registration First and Last names. Some customers like to just write initials and I need their name and last name in the database (SQL). Also, some of them just write XXX. I used to handle this just deleting those customers but is getting worst and is time consuming. I do not have any knowledge about SQL, I tried to find the function to add but no success. I just need to add a minimum of 3 characters and no XXX to those two columns of fields. Anyone can help?
|
|
diegomilito
VP-CART Expert
Argentina
779 Posts |
Posted - March 08 2014 : 03:30:13
|
its bit easy, dont worry i will try to help you out of this case.
you find the file shopcustomerformdesign.asp, and open it, u search for this code :
sub ValidateCustomerFields if strfirstname = "" then SError = SError & GetLang("langCustFirstname") & GetLang("langCustRequired") & "<br />" end if if strlastname = "" then SError = SError & GetLang("langCustLastname") & GetLang("langCustRequired") & "<br />" end if
and change with my solution to : sub ValidateCustomerFields if strfirstname = "" then SError = SError & GetLang("langCustFirstname") & GetLang("langCustRequired") & "<br />" else if len(strfirstname) < 3 then SError = SError & GetLang("langCustFirstname") & "at least 3 chars" & "<br />" else if strfirstname = "XXX" or strfirstname = "xxx" then SError = SError & GetLang("langCustFirstname") & "cannot be XXX or xxx" & "<br />" end if end if end if
if strlastname = "" then SError = SError & GetLang("langCustLastname") & GetLang("langCustRequired") & "<br />" else if len(strlastname) < 3 then SError = SError & GetLang("langCustLastname") & "at least 3 chars" & "<br />" else if strlastname = "XXX" or strlastname = "xxx" then SError = SError & GetLang("langCustLastname") & "cannot be XXX or xxx" & "<br />" end if end if end if
try that and tell me :) diego. |
|
|
soncci
VP-CART New User
USA
97 Posts |
Posted - March 10 2014 : 18:36:11
|
Thank you very much Diego. Did work and very easy.
Excelente!! Gracias |
|
|
support
Administrator
4679 Posts |
Posted - March 22 2014 : 01:01:27
|
Hi soncci, we are glad to hear that diego''s trick works for you. And here we would like to thank diego for sharing such helpful solution.
Thanks VPASP ADMIN |
|
|
serjtankian
VP-CART Super User
Armenia
378 Posts |
Posted - March 27 2014 : 07:43:01
|
great solution diego
muchas gracias !
*serj* |
|
|
soncci
VP-CART New User
USA
97 Posts |
Posted - April 11 2014 : 11:52:58
|
I still have problems with some customers that register using just special characters instead of their real name and last name.
I was able to stop them from using XXX and or ... with the help of this forum friends and support, but if they type .\;,] it will register and then I need to delete that customer manually.
How could I make them to use only normal characters (A,a, B, b etc) , no numbers and no special characters when they register? |
Edited by - soncci on April 11 2014 11:54:28 |
|
|
serjtankian
VP-CART Super User
Armenia
378 Posts |
|
|
Topic |
|