Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2011
    Posts
    7
    Plugin Contributions
    0

    help question Changing Verify Date of Birth to What's your age

    I'm attempting to change verify age dob field to just the year instead of the entire dob. I really don't need someone's date of birth and just want to know there age for analysis for advertising campaigns.

    I have located the code that checks the form for issues but I can't seem to find this ENTRY_DOB_MIN_LENGTH in the language files. If anyone know's where this array is set so that i can change it to 4 for just year entry that would help greatly.

    I found this setting in formcheck.js.php any suggestions I have been looking now for about an hour and to no avail.

  2. #2
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Changing Verify Date of Birth to What's your age

    admin/configuration/minimum values/date of birth

  3. #3
    Join Date
    Aug 2011
    Posts
    7
    Plugin Contributions
    0

    application error Re: Changing Verify Date of Birth to What's your age

    I made the change as you suggested but it seems as though the system is still freaking out that the dob is not formatted as mm-dd-yyyy when I just want it as YYYY. Is there something else I should dig around for to find out why this is occurring?

  4. #4
    Join Date
    Aug 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Changing Verify Date of Birth to What's your age

    Ok i got this figured out you have to change the minimum value as you said and then you also have to make a change to the file /modules/includes/create_account.php on line 109 you have to add a line above that as such $dob = "01/01/".$dob; Otherwise you will pass the javascript check but you will not pass the php check of the form being completed.

    I find it incredibly stupid that the designers of these two checks are not using the same checks causing us to have to make modifications to the code rather then a quick modification to the administration panel's minimum value.

    This input field should not have a minimum value even listed in the control panel since modifying it does a whole lot of nothing at the end of the day.

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

    Have a Drink Re: Changing Verify Date of Birth to What's your age

    Update disregard what I said before you need to make the change before line 109 at line 52 you need to change the line to read:
    PHP Code:
     if (ACCOUNT_DOB == 'true'$dob zen_db_prepare_input("01/01/".$_POST['dob']); 

  6. #6
    Join Date
    Aug 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Changing Verify Date of Birth to What's your age

    One last update since the designers of this product failed to use the $dob var they set and formatted before updating the customer database in the same file you have to modify line 267
    PHP Code:
        if (ACCOUNT_DOB == 'true'$sql_data_array['customers_dob'] = (empty($_POST['dob']) || $dob_entered == '0001-01-01 00:00:00' zen_db_prepare_input('0001-01-01 00:00:00') : zen_date_raw("01/01/".$_POST['dob'])); 
    This will allow your database to update properly and actually save just the year for each user that buy's a product from you without being to invasive.

    The age factor can be a good indicator to use in advertising your product but we really don't need to know there exact dob unless we plan on sending out birthday cards which is probably little above and beyond us starting out.

 

 

Similar Threads

  1. Removing the verify your age box from the login page
    By azwli in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 May 2010, 08:41 AM
  2. How do I remove 'verify your age' from the sign in page
    By newb1234 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 18 Sep 2009, 09:38 PM
  3. How can I remove or delete "Verify your age" ?
    By ttmb33 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 21 May 2009, 07:39 PM
  4. How do you remove "verify your age" from registration?
    By HTMLGoddess in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 16 Apr 2009, 09:27 AM
  5. Verify Your Age field
    By rfresh in forum Managing Customers and Orders
    Replies: 1
    Last Post: 8 Jan 2009, 07:43 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