Page 1 of 6 123 ... LastLast
Results 1 to 10 of 59
  1. #1
    Join Date
    May 2006
    Posts
    28
    Plugin Contributions
    0

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

  2. #2
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

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

  3. #3
    Join Date
    May 2006
    Posts
    28
    Plugin Contributions
    0

    Default 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?

  4. #4
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    16
    Plugin Contributions
    0

    Default 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?

  5. #5
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    16
    Plugin Contributions
    0

    Default 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:
    Code:
      //  if (zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert" id="stText">' . ENTRY_STATE_TEXT . '</span>';
    And part of line 110 as follows:
    Code:
    <?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.

    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.

  6. #6
    Join Date
    May 2006
    Posts
    28
    Plugin Contributions
    0

    Idea or Suggestion 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.

  7. #7
    Join Date
    Aug 2007
    Posts
    5
    Plugin Contributions
    0

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

    Quote Originally Posted by savage View Post
    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?

  8. #8
    Join Date
    Aug 2005
    Posts
    117
    Plugin Contributions
    0

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

  9. #9
    Join Date
    Dec 2006
    Location
    France
    Posts
    20
    Plugin Contributions
    0

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

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    Quote Originally Posted by dscvry View Post
    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: v1.5.5]
    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!

 

 
Page 1 of 6 123 ... LastLast

Similar Threads

  1. v150 How to make registration Salutation field optional?
    By scott_ease in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Jul 2016, 03:11 AM
  2. making customer registration optional
    By nicubila in forum Managing Customers and Orders
    Replies: 1
    Last Post: 12 Aug 2009, 12:13 PM
  3. How can I make certain create-account fields NOT required?
    By spiralmedia in forum Managing Customers and Orders
    Replies: 4
    Last Post: 9 Mar 2009, 08:45 PM
  4. Making registration fields optional
    By nickbowers in forum Managing Customers and Orders
    Replies: 3
    Last Post: 16 Mar 2008, 02:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR