Forums / Managing Customers and Orders / How can I Make certain Customer Registration fields optional?

How can I Make certain Customer Registration fields optional?

Views: 36,632

Results 1 to 20 of 59
5 Nov 2007, 6:24 PM
#1
savage avatar

savage

New Zenner

Join Date:
May 2006
Posts:
28
Plugin Contributions:
0

How can I Make certain Customer Registration fields optional?

Hi Zen-Cart Gurus,
My site ( http://games.savagesoftware.com.au ) sells original downloadable games.
As a result things like the customer's address should not really be mandatory as customers will always be downloading the games they purchase. We may offer hardcopy version of the games at a later time, but for now it is all downloadable

Essentially the only things that should be mandatory are First Name, Last Name, Dob and the email address and password. Is there an easy way to make the other fields optional?

Thanks.

5 Nov 2007, 6:49 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

Is there an easy way to make the other fields optional?

First, there are several fields you can completely disable in the Admin> Configuration> Customer Details

Making the other fields optional will take some work - you can set the minimum required characters to zero, but then you'll also want to disable the javascript verifications and remove the required status from the template.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

6 Nov 2007, 1:58 AM
#3
savage avatar

savage

New Zenner

Join Date:
May 2006
Posts:
28
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

I have disabled everything I can in Admin> Configuration> Customer Details. Where should I start looking to amend the Javascript and the required status?

13 Nov 2007, 9:41 PM
#4
spidersilk avatar

spidersilk

New Zenner

Join Date:
Jun 2006
Location:
Toronto
Posts:
16
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

I'm having the same issue -- there are fields that need to be made optional, but still included in the form. Notably, any store that wants to take international orders has to make state and postal code optional, since not all countries have either of those. But there doesn't appear to be any way of doing that.

In an archived thread on this topic, I saw the suggestion of setting the minimum value to 0 as a way of making a field optional, but I tried that and it didn't work. The field still shows up marked as required. Maybe the customer actually could leave it blank anyway, but unless the customer is psychic they aren't going to know that.

So until this bug is fixed in a future version, I would also appreciate knowing where to start looking to disable the verification so that the store can actually take orders from people in more than one or two countries. Does anyone know how to do this?

13 Nov 2007, 10:22 PM
#5
spidersilk avatar

spidersilk

New Zenner

Join Date:
Jun 2006
Location:
Toronto
Posts:
16
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

I think I just solved my own problem. :)

I set the minimum length for province/state and postal code to 0, then (after some poking around to figure out what needed editing) opened up tpl_modules_create_account.php and saved a copy of it in my custom template folder, and commented out line 99:

  //  if (zen_not_null(ENTRY_STATE_TEXT)) echo ' <span class="alert" id="stText">' . ENTRY_STATE_TEXT . '</span>';

And part of line 110 as follows:

<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"');
	// (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); 

(remembering to put a semicolon at the point where I broke the line.

I saved the file, went to the create account form, and ta-da! No more "required" asterisk next to those fields. I filled in the form to create a test account, leaving those fields blank, and expecting to still get tripped up by some kind of Javascript verification, and to my astonishment nothing went wrong -- it accepted the form, with no state or postal code. :clap:

So I guess it doesn't use Javascript validation for those specific fields, or at least not if they've already been set to 0 in the Minimum Values area of the admin.

So... For anyone else who's wanting to make some customer fields optional, apparently this is how you do it.

3 Dec 2007, 1:47 PM
#6
savage avatar

savage

New Zenner

Join Date:
May 2006
Posts:
28
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

OK after much prodding and trial and error, I have found that the following files need to be changed to hide any mandatory fields...

modules/[your mod]/create_account.php
modules/pages/create_account/jscript_form_check.php
templates/[your mod]/templates/tpl_modules_create_account.php

Now on our site, only the Salutation, First & Last Name, Email Address and Password are mandatory and are the only fields that appear.

It would be nice to have all these fields turn-off and onable via the admin screens.
Also it would be nice if modules/pages/ and the various sub-directories also adhered to the excellent mod override features as the only way I could fix the Javascript validation was to change the default file directly, which is not ideal, considering a new version of Zen-Cart has just been released.

I hope this helps someone else.

19 Feb 2008, 1:11 AM
#7
firechook avatar

firechook

New Zenner

Join Date:
Aug 2007
Posts:
5
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

savage:

OK after much prodding and trial and error, I have found that the following files need to be changed to hide any mandatory fields...

modules/[your mod]/create_account.php
modules/pages/create_account/jscript_form_check.php
templates/[your mod]/templates/tpl_modules_create_account.php

Now on our site, only the Salutation, First & Last Name, Email Address and Password are mandatory and are the only fields that appear.

It would be nice to have all these fields turn-off and onable via the admin screens.
Also it would be nice if modules/pages/ and the various sub-directories also adhered to the excellent mod override features as the only way I could fix the Javascript validation was to change the default file directly, which is not ideal, considering a new version of Zen-Cart has just been released.

I hope this helps someone else.

Sure does, thanks! Glad to see it can actually be done. But as a total newbie I don't know which parts of those files need changing - can you help with some more detail please?

9 Apr 2008, 4:40 PM
#8
flyingbrick avatar

flyingbrick

Zen Follower

Join Date:
Aug 2005
Posts:
105
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

I used the mod that was created based on this and it created a mess of my site, so I had to uninstall this. Does anyone have a line by line instruction of how to accomplish this? All I want people to fill in are their first, last name, and email address. I'd like to get rid of the rest.

25 Jun 2008, 8:11 PM
#9
dscvry avatar

dscvry

New Zenner

Join Date:
Dec 2006
Location:
France
Posts:
20
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

Thanks Spidersilk (#5) for the solution to changing account info required fields to optional ones ... it works also for the telephone contact details.

26 Jun 2008, 4:17 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How can I Make certain Customer Registration fields optional?

dscvry:

Thanks Spidersilk (#5) for the solution to changing account info required fields to optional ones ... it works also for the telephone contact details.

You could also do this by just changing the settings in the Minimum Values for the Telephone number or Post Code to blank, not 0, but blank as in edit and make the input box blank and hit update ...

Then, change the language file for the Required for the field(s) to be '' vs '*' and you will not see the red asterisk ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Jul 2008, 10:46 AM
#11
karl19 avatar

karl19

New Zenner

Join Date:
Jun 2007
Posts:
62
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

We've managed to make "State" no required when signing up, that wasn't an issue, but we're having trouble in the admin. We're using the dual pricing module as we've got a couple of customers who are resellers and to update their status we need to open their account in admin and change them to reseller status.

However, when doing this, we get told state is required and we can't update the details. We've set state under "minimum values" to blank (as per Ajeh's suggestion) but we're still told state is empty and required in admin.

Is there anything else one can do?

10 Jul 2008, 8:56 AM
#12
dscvry avatar

dscvry

New Zenner

Join Date:
Dec 2006
Location:
France
Posts:
20
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

Not sure how the dual pricing module might change the picture, but it sounds like setting null for 'State' when signing up in catalog (via admin settings pages) does not set the default field values when doing the same from admin. See #5 in this thread & perhaps check the parallel sub/directories under 'admin' for template files that also need to be customised there ... ?

1 Aug 2008, 2:47 AM
#13
divineiguana avatar

divineiguana

New Zenner

Join Date:
Jul 2008
Posts:
25
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

I'm still unsure about what to change...I'm pretty new to all this. Can anybody offer me some hand holding? I'm selling digital files and I only want the customers name and e-mail address.

1 Aug 2008, 7:42 AM
#14
karl19 avatar

karl19

New Zenner

Join Date:
Jun 2007
Posts:
62
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

DivineIguana,

Have a look under configuration > customer details, there you can turn off a lot of the information asked for during account creation.

2 Aug 2008, 4:02 PM
#15
divineiguana avatar

divineiguana

New Zenner

Join Date:
Jul 2008
Posts:
25
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

Its still asking them for an address. That just seems intrusive when I'm not actually mailing them anything.

I know there's a way to change this in the php file, I'm just not savvy enough to figure it out...yet.

10 Jan 2009, 3:45 AM
#16
ceryscrow avatar

ceryscrow

New Zenner

Join Date:
Aug 2007
Posts:
38
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

Ajeh:

Then, change the language file for the Required for the field(s) to be '' vs '*' and you will not see the red asterisk ...

How exactly do I do this? I'm not PHP savvy and I really need a bit of explanation here.

Thanks.

10 Jan 2009, 3:06 PM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How can I Make certain Customer Registration fields optional?

Edit the language file with a TEXT editor and where you see the defines for the '*' change to '' (that is two single quotes) and nothing will be displayed ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Feb 2009, 9:04 PM
#18
wingedwolfpsion avatar

wingedwolfpsion

New Zenner

Join Date:
Jan 2009
Posts:
4
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

Which folder/subfolders is the necessary language file in?

10 Feb 2009, 3:11 PM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How can I Make certain Customer Registration fields optional?

All of the Required marks for the * are in the english.php file ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Jul 2009, 2:59 PM
#20
raymonster avatar

raymonster

New Zenner

Join Date:
Jun 2009
Posts:
32
Plugin Contributions:
0

Re: How can I Make certain Customer Registration fields optional?

I don't understand what you guys are saying when you say set the values to 0. I am looking at my customer details page in admin and I have no such option. Most of them just say true or false and there isn't one for zip code or phone number either. Where are these located?