Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Posts
    1
    Plugin Contributions
    0

    red flag Age Limit FAQ CODE NOT WORKING

    I can not get the age limit FAQ code to work. That and I don't understand the FAQ's

    then create an over-ride file for your includes/languages/english/create_account.php file and place the following line in there, changing the text to suit your style of feeding errors back to visitors
    I have read through all the FAQ's relating to this topic and still cannot figure this out. I am selling e-cigs and really need this function to work.

    I first tried to edit the code in create_account.php with the new code that FAQ's says to put in it.
    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);
    }
    $minimum_age = 18;
    $acceptable_dob = (date('Y') - $minimum_age) . date('md');
    if (zen_date_raw($dob) > $acceptable_dob) {
    $error = true;
    $messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_UNDERAGE);
    }
    }
    }
    I uploaded it to my page and got a blank page when I tried to access the login.

    I guess what I'm trying to figure out is how to get the overide page set up correctly as far as coded correctly and put in the correct folder to where create_account.php references the information.

    I also would like to know if anyone else understand this part of the FAQS of creating an age limit at signup.

    Any help would eb greatly appreciated. Not sure how to fix this.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Age Limit FAQ CODE NOT WORKING

    You probably accidentally added a space or line to the end of the file when you edited it.

    Is this really worth the effort in the first place? All it does is check the date of birth the visitor entered to see if it is more than 18 years ago. It can't (obviously) check for phony dates entered, and no agreement by the visitor is stored in the database.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Age Limit FAQ CODE NOT WORKING

    Zen Cart does have a switch to enable forcing the customer to click to accept terms and conditions, and you could use this to prove that they confirmed their age was over 18 (which is all you can do, short of a secure identity check).

 

 

Similar Threads

  1. v150 FAQ Module not working in my v1.5.0
    By Phil020782 in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 3 Aug 2012, 07:30 PM
  2. Gift Certificate FAQ Remove Not working right
    By dutchy in forum General Questions
    Replies: 4
    Last Post: 8 Apr 2011, 10:46 PM

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