Forums / Templates, Stylesheets, Page Layout / Fax Number: Create Account be required

Fax Number: Create Account be required

Locked

Started by haredo on 29 Mar 2007, 4:33 AM · Views: 3,940

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
29 Mar 2007, 4:33 AM
#1
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,189
Plugin Contributions:
0

Fax Number: Create Account be required

After reading the different threads on this issue, I am still stumped.
I have designed a wholesale web site.
Client logs in and create account I need the following.
Change Fax Number to Tax ID Number and make it a required field.

Yes, I have made these changes includes/languages/yourtemplate/english.php
define('ENTRY_FAX_NUMBER', Tax ID Number:');
define('ENTRY_FAX_NUMBER_ERROR', 'Please enter your Tax ID Number');
define('ENTRY_FAX_NUMBER_TEXT', '*');

But, when Tax ID Number on the create account page is skipped A error message does not appear.

Yes, includes/modules/yourtemplate/create_account.php ; I believe is where a code is inserted.

Any suggestions

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

29 Mar 2007, 11:17 AM
#2
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Fax Number: Create Account be required

Well, if that is copied and pasted in, there is a missing single quote mark in front of the word "Tax" in the first define statement. Zen is a sensitive critter and will be thrown off by that.

Rob

Breakfast: the most important donut of the day.

29 Mar 2007, 4:25 PM
#3
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,189
Plugin Contributions:
0

Re: Fax Number: Create Account be required

Ron,
Keen eye, but I noticed this small error after the post.
Any suggestions on my second question.

Mark

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

29 Mar 2007, 7:09 PM
#4
tmc_sherpa avatar

tmc_sherpa

Zen Follower

Join Date:
Mar 2007
Posts:
158
Plugin Contributions:
0

Re: Fax Number: Create Account be required

I don't see an entry under min values for the fax number, so its not being checked on account creation.

You'll need to add something like

if (strlen($fax) < 8) {

$error = true;

$messageStack->add('create_account', 'Hey, you forgot your Tax ID');

}

to create_account.php

I guess you could make this harder and add the correct checks for min values, an entry in your languages file etc, but that sounds a lot like work :P

Lazy and willing to work very hard to stay that way

30 Mar 2007, 4:57 AM
#5
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,189
Plugin Contributions:
0

Re: Fax Number: Create Account be required

Ok, I added this code to line 233
includes/modules/haredo/create_account.php

if (strlen($fax) < 8) {
$error = true;
$messageStack->add('create_account', ENTRY_FAX_NUMBER_ERROR);
}

But, did not get an error message when I created a new account when I do not fill a Tax ID Number in the cell.

Mark,

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

30 Mar 2007, 4:10 PM
#6
tmc_sherpa avatar

tmc_sherpa

Zen Follower

Join Date:
Mar 2007
Posts:
158
Plugin Contributions:
0

Re: Fax Number: Create Account be required

Interesting. it will throw an error for me, inserted at 101 however I'm not using a language file to grab the error message.

Lazy and willing to work very hard to stay that way

30 Mar 2007, 5:22 PM
#7
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,189
Plugin Contributions:
0

Re: Fax Number: Create Account be required

This is my codes.

includes/languages/yourtemplate/english.php
define('ENTRY_FAX_NUMBER', 'Tax ID Number:');
define('ENTRY_FAX_NUMBER_ERROR', '');
define('ENTRY_FAX_NUMBER_TEXT', '*');

includes/modules/yourtemplate/create_account.php
97 if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('create_account', ENTRY_LAST_NAME_ERROR);
}

102 if (strlen($fax) < 8) {
$error = true;
$messageStack->add('create_account', 'Please enter your Tax ID Number');
}

107 if (ACCOUNT_DOB == 'true') {
if (ENTRY_DOB_MIN_LENGTH > 0 or !empty($_POST['dob'])) {
if (substr_count($dob,'/') > 2 || checkdate((int)substr(zen_date_raw($dob), 4, 2), (int)substr(zen_date_raw($dob), 6, 2), (int)substr(zen_date_raw($dob), 0, 4)) == false) {
$error = true;
$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);
}
}
}

If need to take a look? http://www.haredo.com/wholesale/index.php?main_page=create_account&action=process

Mark

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.