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 21 to 40 of 59
10 Jul 2009, 3:46 PM
#21
ajeh avatar

ajeh

Oba-san

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

How can I Make certain Customer Registration fields optional?

There are also the settings in the Configuration ... Minimum Values ... related to the Customer Details ...

When 0 does not work on a non-required field, then use blank, as in nothing filled in for the length, just leave it blank ...

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, 6:01 PM
#22
ne1512blvd avatar

ne1512blvd

New Zenner

Join Date:
Jul 2009
Posts:
1
Plugin Contributions:
0

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

I just installed this to relaunch my clipart site soon. I am also having this same problem. I have made the minimum values blank and also have them all set to 0 or false under customer details. And it still is asking for too many details.

To alter the file, would I just open it up in a text editor? How would I save it to make sure it gets saved still as the php file? I know html and can find my way around some other code also. Just not sure how to make sure that the file gets saved in the right format once the changes are made.

Thanks.

10 Jul 2009, 6:23 PM
#23
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?

What do you want to REMOVE?

What do you want to make OPTIONAL?

NOTE: do not confuse the appearance of the Required* as meaning it did not work as that is just text that then needs to be updated in the language files so that it does not show on optional fields ...

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!

14 Jul 2009, 7:17 AM
#24
ruonan avatar

ruonan

New Zenner

Join Date:
Jul 2009
Posts:
2
Plugin Contributions:
0

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

Can someone please tell me what exactly need to modified in the following three files to completely disable some of the fields? I'm not very comfortable with random deletions of code! I have already disabled everything I can in the admin tool.

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

14 Jul 2009, 7:55 AM
#25
ruonan avatar

ruonan

New Zenner

Join Date:
Jul 2009
Posts:
2
Plugin Contributions:
0

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

Nevermind. I did everything Ajeh said to do and it worked. The fields are no longer required and my customers can create an account with minimal personal information. Thought i contribute by summarizing everything.
To change the fields to blank: Go to Admin-Configurations-Minimum Values, change the settings to blank, NOT 0.
To get raid of the * by the fields: Go to includes/languages/english.php, starting at line 180, leave the '*' in mandatory fields (defined by you) and change all others to ''.

27 Aug 2009, 7:22 PM
#26
frankderosa avatar

frankderosa

New Zenner

Join Date:
Jan 2009
Location:
Charlottesville, VA
Posts:
51
Plugin Contributions:
0

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

I also found the "Zip code must be at least 0 characters" message a bit confusing, but setting the field to blank in the Minimum Values admin panel did the trick. I decided to try this setting for the State field length as well, which worked as far as making the field optional - but it had the side effect of causing a JavaScript error, disabling the client side form validation. It's best to just leave the State setting as 0 to make it optional. Quirky :)

I think my take home here is, "If zero works, leave it alone." If it ain't broke...

Thanks to all for contributing to the discussion.

18 Sep 2009, 9:59 PM
#27
artcoder avatar

artcoder

Zen Follower

Join Date:
Jan 2007
Posts:
166
Plugin Contributions:
0

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

karl19:

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?

Since you are in the Zencart admin, just type "unknown" for the state.

19 Sep 2009, 12:36 AM
#28
artcoder avatar

artcoder

Zen Follower

Join Date:
Jan 2007
Posts:
166
Plugin Contributions:
0

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

karl19:

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?

Or if you don't feel like just filling it in the state with a dummy value (such as "unknown"), you will have to remove the Javascript validation checks, the PHP backend checks, and optionally remove the display of the red alert text saying "required". This three are described in steps 3, 4, and 5 of the tutorial linked here. All code change happens in /admin/customers.php and when that is done, you will be able to update customer details in admin without filling out everything.

14 Nov 2009, 1:14 AM
#29
anglerdvd avatar

anglerdvd

New Zenner

Join Date:
Nov 2009
Posts:
2
Plugin Contributions:
0

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

Thanks Spidersilk,
I tried your solution and it worked so good, I was able to set all of the lines that i did not need to non-mandatory. Thanks again:clap:

19 Nov 2009, 1:06 AM
#30
lauriesscraps avatar

lauriesscraps

Zen Follower

Join Date:
Sep 2009
Posts:
255
Plugin Contributions:
0

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

Ajeh:

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 ...

Which Language file are you referring to?

19 Nov 2009, 5:00 AM
#31
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?

I'd peek at the english.php language file ... :smile:

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!

19 Nov 2009, 5:43 AM
#32
lauriesscraps avatar

lauriesscraps

Zen Follower

Join Date:
Sep 2009
Posts:
255
Plugin Contributions:
0

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

ruonan:

Nevermind. I did everything Ajeh said to do and it worked. The fields are no longer required and my customers can create an account with minimal personal information. Thought i contribute by summarizing everything.
To change the fields to blank: Go to Admin-Configurations-Minimum Values, change the settings to blank, NOT 0.
To get raid of the * by the fields: Go to includes/languages/english.php, starting at line 180, leave the '*' in mandatory fields (defined by you) and change all others to ''.

OK, so I tried the things mentioned above and it did not change anything, so I thought I might have the wrong language file.... hence the questions earlier. (Double checking). So I tried it again, and still no change. All I did was take out the * and left it blank '' between the quotes. I must be doing something wrong here. It is probably so simple that I will kick myself after. But I promise I double checked and still no change.

Someone please help the slow one here!

19 Nov 2009, 6:26 AM
#33
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

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

Go to includes/languages/english.php
Could be your current template has its own language file
i.e.
/includes/languages/nameofyourtemplate/english.php

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

21 Jan 2010, 6:31 AM
#34
dropbop avatar

dropbop

Zen Follower

Join Date:
Apr 2008
Location:
Athlone, Ireland
Posts:
177
Plugin Contributions:
1

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

i know this discussion is a bit old, but didnt see the point in starting a new tread when one already exists.

The only details I need is name and email address.

I can get rid of all the fields for customer details, but Im still left with Billing Address showing on the login/signup page "index.php?main_page=login". I dont want my buyers to have to enter a billing address as products are virtual and paypal sorts out the billing bit.

I have installed Fast and Easy Checkout if thats any help.

Cheers.

PS: Sorry no link as site is on local server for testing

29 Jan 2010, 4:36 PM
#35
resellrightsshop avatar

resellrightsshop

New Zenner

Join Date:
Jan 2010
Location:
Devon, UK
Posts:
7
Plugin Contributions:
0

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

STREAMLINED LOGIN PROCESS (First Name, Last Name, Country and Email)

Having tried a few of the methods mentioned in this thread I have finally managed to sort the problem out (for my needs anyway). Some of the methodology explained previously really messed up my ADMIN side of the store. ADMIN - CUSTOMERS stated at least four "array" errors and would not update the CUSTOMER edit functions (everything was blank). The same method also caused major problems in the SQL database as it was not passed the correct information.

Caution - I am no CSS / PHP guru and the following is used at your own discretion and at your own risk. Alwyas create your own template file and edit that one, NOT the original supplied with ZEN (that way yoou can roll back if it doesn't work - I have learnt this the very hard way!!).

Due to the various array problems I have resigned myself to the fact that I will have to live with First Name, Last Name, Country and Email. Ideally I would have liked to have binned the Country element but haven't managed it without the mess.

Previous posts asked for a step by step process...

So, for what it's worth, here goes............

STEP 1 - In Admin control panel, Configuration, Customer Details;
Set Email salutation, DoB, Company, Address Line 2, State, Fax Number to false.

STEP 2 - In Admin control panel, Configuration, Minimum Values;
Set Nick Name, Date of Birth, Street Address, Company, Post Code, City, State, Telephone Number to blank.
NB - To blank, not to zero!

**STEP 3 - ** Your_store_folder/includes/languages/your_template/english.php

a) define('ENTRY_STREET_ADDRESS_TEXT', '*'); *Remove (removes the required *)

b) define('ENTRY_POST_CODE_TEXT', '*'); *Remove (removes the required *)

c) define('ENTRY_CITY_TEXT', '*');**Remove * ** (removes the required *)

d) define('ENTRY_TELEPHONE_NUMBER_TEXT', '*'); *Remove (removes the required *)

**Step 4 - **Your_store_folder/includes/templates/your_template/templates/tpl_modules_create_account.php

a) <label class="inputLabel" for="street- address"><?php echo ENTRY_STREET_ADDRESS; ?></label>

<?php echo zen_draw_input_field('street_address', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_street_address', '40') . ' id="street-address"') . (zen_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="alert">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?>

<br class="clearBoth" /> Commented out (<!--....-->) (removes Street Address Field)

b) <label class="inputLabel" for="city"><?php echo ENTRY_CITY; ?></label>

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

<br class="clearBoth" /> Commented out (<!--....-->) (removes City Field)

c) <label class="inputLabel" for="postcode"><?php echo ENTRY_POST_CODE; ?></label>

<?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>': ''); ?>

<br class="clearBoth" /> Commented out (<!--....-->) (Removes Post Code Field)

d) <legend><?php echo TABLE_HEADING_PHONE_FAX_DETAILS; ?></legend> Commented out (<!--....-->) (Removed the phone and fax table)
e) <label class="inputLabel" for="telephone"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>

<?php echo zen_draw_input_field('telephone', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_telephone', '40') . ' id="telephone"') . (zen_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?> **Commented out (<!--....-->)** (Removed Telephone Field)

**Step 5 - ** Your_store_folder/includes/languages/english/your_template/create_account_success.php
define('PRIMARY_ADDRESS_TITLE', 'Your Name and Country'); (Altered from Your Address just so things made a little sense on the account success page).

Not sure if there is any set order of the above but the order written is the order I did it in (checking at each stage). I have checked the ADMIN, Customer and all seems fine as does the SQL Address_book and Customer tables.

If it helps someone then it was worth it! Now I can get on with uploading all the juicy products!

Or I could of if my hosting company hadn't just (literally as I post) suspended my account due to a server overload! I must get a lot more traffic than I thought. Not bad for a shop with no products!!

When I am back up and running I will post a link to this thread so that you can check it works.

Go figure!!

19 Feb 2010, 3:59 PM
#36
kosmo99 avatar

kosmo99

New Zenner

Join Date:
Feb 2010
Posts:
2
Plugin Contributions:
0

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

You nailed it, resellrightsshop. Perfect.

19 Feb 2010, 4:04 PM
#37
resellrightsshop avatar

resellrightsshop

New Zenner

Join Date:
Jan 2010
Location:
Devon, UK
Posts:
7
Plugin Contributions:
0

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

Thanks Kosmo99. I appreciate the feedback. Please let me know if there is anything else I can help with and I will endeavour to add some sanity to a confusing world! :blink:

19 Feb 2010, 4:12 PM
#38
kosmo99 avatar

kosmo99

New Zenner

Join Date:
Feb 2010
Posts:
2
Plugin Contributions:
0

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

resellrightsshop:

Thanks Kosmo99. I appreciate the feedback. Please let me know if there is anything else I can help with and I will endeavour to add some sanity to a confusing world! :blink:

:)

Thanks - I think I'm in good shape. My store will just sell digital content (eBooks of my original fiction and soon audio versions of those) as well as a tip jar for the blog's writers. We don't deliver any physical items and we only accept PayPal, so I really don't care where somewhere lives! I definitely didn't want to make it more difficult than necessary for someone to create an account.

This has been a great forum to find answers to a lot of question. I installed last week with absolutely no familiarity with the product. I've spent a few hours playing around with things and should have things set up pretty much the way I like it.

26 Feb 2010, 12:26 AM
#39
resellrightsshop avatar

resellrightsshop

New Zenner

Join Date:
Jan 2010
Location:
Devon, UK
Posts:
7
Plugin Contributions:
0

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

UPDATE - I have now compiled a short report (12 pages) that explains in micro-detail how to achieve the streamlined account creation process, inclusive of colour coded customised code. Its available as a shortie report from my blog.

2 Mar 2010, 9:52 PM
#40
flipperry avatar

flipperry

New Zenner

Join Date:
Feb 2009
Posts:
79
Plugin Contributions:
0

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

ruonan:

Nevermind. I did everything Ajeh said to do and it worked. The fields are no longer required and my customers can create an account with minimal personal information. Thought i contribute by summarizing everything.
To change the fields to blank: Go to Admin-Configurations-Minimum Values, change the settings to blank, NOT 0.
To get rid of the * by the fields: Go to includes/languages/english.php, starting at line 180, leave the '*' in mandatory fields (defined by you) and change all others to ''.

:thumbsup:To easily find all of the '*' in the file, open it in your text editor, then press ctrl+f (find command). ALWAYS MAKE SURE YOU SAVE A BACKUP COPY OF THIS FILE! Otherwise you will have to change the file every time you upgrade your ZenCart(tm) store files!

Flip Perry
S~Scents