Thread: Age restriction

Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2013
    Posts
    13
    Plugin Contributions
    0

    Default Age restriction

    I used the tutorial http://www.zen-cart.com/content.php?...people-over-18. That worked great for sign-up; however, how can you prevent someone signing up over 18 and going back later and changing their birthdate to under 18? I've searched the forum and cannot find what files would need to be edited. I'd image it would be the same lines of code as entered in includes/modules/create_account.php and includes/languages/english/create_account.php. Would that be correct?

  2. #2
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    705
    Plugin Contributions
    5

    Default Re: Age restriction

    If you don't want them to EDIT their DOB after they register, you'll need to edit the following file:
    includes/templates/YOUR_TEMPLATE/templates/tpl_account_edit_default.php
    Find and remove this piece of code:
    Code:
    <?php
      if (ACCOUNT_DOB == 'true') {
    ?>
    <label class="inputLabel" for="dob"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
    <?php echo zen_draw_input_field('dob', zen_date_short($account->fields['customers_dob']), 'id="dob"') . (zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="alert">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    <?php
      }
    ?>
    If that file doesn't exist in YOUR_TEMPLATE folder, copy it from template_default and upload to your template's directory. It's always better to use overrides.
    What I've done lately: Goatee Saver | CCRSport | JonaMaria | LBB Adult Shop | Costelloe and Costelloe | Finntimo
    Zen Cart with Layered Navigation? Sure: DQT

  3. #3
    Join Date
    Jul 2013
    Posts
    13
    Plugin Contributions
    0

    Default Re: Age restriction

    Thanks for the fast response! I would like to allow them to change it in case they entered the wrong date when they signed up, but restrict it to over eighteen when they do. Out of curiosity, whats the advantage to having the file located in the YOUR_TEMPLATE folder?

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    2,896
    Plugin Contributions
    27

    Default Re: Age restriction

    Quote Originally Posted by dereck72 View Post
    ... Out of curiosity, whats the advantage to having the file located in the YOUR_TEMPLATE folder?
    YOUR_TEMPLATE (another name for your custom template) allows you to customize your shop in a manner that the customizations will 'carry over' when you upgrade your Zen Cart's software. There's a FAQ here: http://www.zen-cart.com/content.php?...verride-system

  5. #5
    Join Date
    Jul 2013
    Posts
    13
    Plugin Contributions
    0

    Default Re: Age restriction

    Thanks for that, makes perfect sense.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    21,830
    Plugin Contributions
    25

    Default Re: Age restriction

    What is the point of preventing users from resetting their birthdate below 18? You are dependent on their word anyway, and they could be 12 or 88 regardless of what they tell you. If you have mechanisms in place to restrict signup and especially login to 18+, you have evidence that you have done all that can practically be done.

    The test I would add is to the login/returning user page, to check the saved user DOB. If they are foolish enough to reset that below 18 after lying to sign up, it will catch them.

 

 

Similar Threads

  1. Age Restriction Page
    By LovejonesBoutique in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Nov 2010, 09:59 AM
  2. Age Verification or Restriction
    By Sweet ZouZou in forum General Questions
    Replies: 15
    Last Post: 10 Nov 2010, 09:46 AM
  3. Age Restriction
    By darkmarauder in forum Managing Customers and Orders
    Replies: 2
    Last Post: 20 Sep 2010, 12:18 PM
  4. Age Restriction...
    By Alex Clarke in forum General Questions
    Replies: 7
    Last Post: 16 Oct 2008, 12:34 PM
  5. Login Age Restriction
    By MIJewels in forum Managing Customers and Orders
    Replies: 0
    Last Post: 14 Apr 2008, 06:28 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
  •