| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Email Validation with TowerData | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Email Validation with TowerData
One of the most annoying problems when practicing online commerce is when customers either mistype their email address or decide they want to provide a fake one (which in later turns to them complaining they never get any contact from the company about their order).
In order to try and reduce/prevent the problem from occurring we implemented TowerData's Email Validation Service into X-Cart to try and curb the problem. I have decided to share the code with others on the X-Cart forum but be aware you must have a TowerData account in order to use this code, you can read more about the service here: http://www.towerdata.com/services/web/email_validation.html Please note that the code included in this thread does not implement TowerData's multiple email address results return (to give them a drop down) or phone number validation (we saw no reason to pay for this service). If you want to implement the return of multiple email address results you're on your own for that. --------------------------------------------------------------------------------------------- Note: You must be running a recent PHP5 release and have the soap extension installed or this will not work. Disclaimer: I am not responsible for any site outages incurred by implementation of this code. It is your responsibility to appropriately test it on a development environment before deploying it to production and I am not available for technical support outside this thread. Also note that if TowerData is down this function will simply suppress itself quietly and allow your site to continue to operate. --------------------------------------------------------------------------------------------- Step 1: Edit include/func/func.mail.php We must first add a function called func_towerdata_validate() to the bottom of include/func/func.mail.php: PHP Code:
Step 2: Modify func_check_email() The next step is to add func_towerdata_validate() to func_check_email() so that it's used during account creation and anywhere else you use func_check_email(). This step requires significant modifications to the function however and I will provide two different examples. One using the original X-Cart code and another one using filter_var() if you have the filter extension available. Version 1: X-Cart Original Code PHP Code:
Version 2: Using the filter_var() function PHP Code:
Note: Remember, Version 2 only works if you have the filter extension installed! I hope this is of good use to other users out there in curbing email problems. |
|||||||
#2
|
|||||||
|
|||||||
Re: Email Validation with TowerData
Thanks ! very nice
__________________
X-Cart 4.4.5 | Linux/Apache | PHP 5.2.17 | MySQL 5.0.77 | FireFox |
|||||||
#3
|
|||||||
|
|||||||
Re: Email Validation with TowerData
Does this work with v4.1.11?
__________________
Version 4.1.11 on Linux (Fedora) X-Cart Gold |
|||||||
#4
|
|||||||
|
|||||||
Re: Email Validation with TowerData
Quote:
Thank you for your code.Will it work on x-cart 4.6.1
__________________
x-cart Gold 4.4.5 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Email Validation with TowerData
Quote:
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#6
|
|||||||
|
|||||||
Re: Email Validation with TowerData
Quote:
Thank you very much for your reply.Can you please provide me 4.6.1 specific code? Thanks again.
__________________
x-cart Gold 4.4.5 |
|||||||
|
|||
X-Cart forums © 2001-2020
|