There are occasions when a customer can mistype their email address into the standard email field within the site checkout and this will not be picked up meaning that emails may not be sent.
It is possible to add code to the order script to validate the email address format so that simple errors can be avoided.
To do this go to your site folder and locate the file: -
OrderScript.pl
and open it in a plain text editor (such as 'Notepad' or similar).
Search for the following line: -
which should take you to the following line: -
replace this with the following code: -
Save the file and close it, then run the command 'Web | Refresh Website' to rebuild the online site files.
It is possible to add code to the order script to validate the email address format so that simple errors can be avoided.
To do this go to your site folder and locate the file: -
OrderScript.pl
and open it in a plain text editor (such as 'Notepad' or similar).
Search for the following line: -
Code:
$$pHash{$sKey} !~ /\@/)
Code:
$$pHash{$sKey} !~ /\@/) # and it is not in the expected format
Code:
$$pHash{$sKey} !~ /^([a-zA-Z0-9_'+*$%\^&!\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9:]{2,4})+$/) # and it is not in the expected format