Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / validating custom field during account creation

validating custom field during account creation

Locked

Views: 1,659

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
26 Jul 2009, 12:10 PM
#1
ktrovato avatar

ktrovato

New Zenner

Join Date:
Apr 2008
Posts:
2
Plugin Contributions:
0

validating custom field during account creation

I have added a custom field to my create account page for a referral code. The field is manditory and produces an appropriate message. I also have a table in the database that I will store referral codes. I need the create account page to check and see if the referral code is correct based on the information stored in the db table.
Any help would be appreciated.

31 Jul 2009, 3:35 AM
#2
ruanchao avatar

ruanchao

New Zenner

Join Date:
Jul 2009
Location:
CA of USA
Posts:
24
Plugin Contributions:
0

Re: validating custom field during account creation

  1. Click on Configuration > Customer Details to access the common Customer Details screen.

At the bottom of this page, you'll see 'Customers Referral Status', edit it.

**Customers Referral Code is created from
0= Off
1= 1st Discount Coupon Code used
2= Customer can add during create account or edit if blank

NOTE: Once the Customers Referral Code has been set it can only be changed in the Admin Customer**

When new user create account, it will submit its referral code to 'create_account.php' which is under '\includes\modules' folder. In the create_account.php file, you can query one of your tables which stores the defined referral code to match the $_POST['customers_referral'], and validate it.