Forums / General Questions / Setting minimum age to 18 on sign up

Setting minimum age to 18 on sign up

Views: 622

Results 1 to 3 of 3
17 Oct 2015, 7:55 AM
#1
thebluedragon avatar

thebluedragon

New Zenner

Join Date:
Dec 2014
Posts:
13
Plugin Contributions:
0

Setting minimum age to 18 on sign up

Hey everyone,
I'm trying to make it so when customers sign up they have to enter their DoB and if they aren't over 18 it pops up saying "Sorry you need to be 18 to buy our products".

In "Customer Details" I have set "date of birth" to True and on the "Minimum Values" page I have set "Date Of Birth" to >18.

I have also followed what it says on the following link but it still doesn't work. https://www.zen-cart.com/content.php?253-how-can-i-limit-the-age-of-my-customers-to-people-over-18

If some signs up it allows them no matter what age they put. Any ideas what I'm doing wrong

17 Oct 2015, 12:59 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Setting minimum age to 18 on sign up

TheBlueDragon:

Hey everyone,I'm trying to make it so when customers sign up they have to enter their DoB and if they aren't over 18 it pops up saying "Sorry you need to be 18 to buy our products".In "Customer Details" I have set "date of birth" to True and on the "Minimum Values" page I have set "Date Of Birth" to >18.I have also followed what it says on the following link but it still doesn't work. https://www.zen-cart.com/content.php?253-how-can-i-limit-the-age-of-my-customers-to-people-over-18If some signs up it allows them no matter what age they put. Any ideas what I'm doing wrongBecause of the lack of detail provided, I anticipate the line of questioning to be slow and tedious, but here goes:In what specific file (including path from the cart's root) did you make the edits suggested by the above FAQ? Is this file an override file for includes/modules/create_account.php? Is there an override file for your active template of that main file?To explain a little, unless you have specifically used the dob minimum constant in the code of the above link differently than provided from what appears to be in the section of code for create_account is a check to see if anything is entered, not a date of any specific length or value but if a date is entered with slashes there should be no more than 2 slashes. Further if such a mod is/was used what was the specific text entered in the minimum values field? Was it '>18' or was it simply '18'?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...