Forums / Templates, Stylesheets, Page Layout / Need Age Verification before entering page

Need Age Verification before entering page

Locked

Views: 26,729

Results 1 to 20 of 23
This thread is locked. New replies are disabled.
23 Apr 2008, 9:29 PM
#1
chachab avatar

chachab

New Zenner

Join Date:
Apr 2008
Posts:
73
Plugin Contributions:
0

Need Age Verification before entering page

I have an adult novelty and would like to have a pop up that states they are over 18 blah blah blah.. and they click enter or exit..... how can i do and completethis process? (also if they chose exit.. do i make an Ez Page to redirect)

Classy, Upscale, Sophisticated, Discreet
www.ClassyDesires.com

23 Apr 2008, 11:11 PM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Need Age Verification before entering page

chachab:

I have an adult novelty and would like to have a pop up that states they are over 18 blah blah blah.. and they click enter or exit..... how can i do and completethis process? (also if they chose exit.. do i make an Ez Page to redirect)

No Need to double post.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

24 Apr 2008, 12:00 AM
#3
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Need Age Verification before entering page

5 posts and 2 questions. Not off to a very good start. Be patient, and you will be rewarded. No patience.........no reward!

Anyway, as far as the age verification, That's no problem. You can Google "Age verification script" and come up with thousands. Here's one that's totally free, as most of them are, anymore. This one was found at Webmasters World:

<[B]script[/B] langu[B]age[/B]="java[B]script[/B]">  
var [B]age[/B]Prompt=prompt("You must be over 18 to enter.")  
if ([B]age[/B]Prompt>=18)  
document.location="http://www.example.co.uk/ok-p[B]age[/B].html"; 
else {  
alert('Sorry, we can not let you in!')  
document.location="http://www.example.co.uk/too-young-p[B]age[/B].html";  
}  
</[B]script[/B]>  

Of course, you will have to change the URL's to your own.

Also, if they click "Exit", then by all means, let them exit. There's nothing more frustrating than trying to leave a site while the site is trying to keep you there.
Furthermore, if you make them stay on your site........they're even MORE likely to lie about their age (as if they won't anyway). I know..........it's all the legality stuff making you do this in the first place.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

24 Apr 2008, 7:50 AM
#4
chachab avatar

chachab

New Zenner

Join Date:
Apr 2008
Posts:
73
Plugin Contributions:
0

Re: Need Age Verification before entering page

Sorry for the double posting... Im VERY new to this and learning how it works... and accidents happen...

thank you for the help i will definatly try it.. can you tell me where I enter this code?

Classy, Upscale, Sophisticated, Discreet
www.ClassyDesires.com

24 Apr 2008, 12:26 PM
#5
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Need Age Verification before entering page

chachab:

Sorry for the double posting... Im VERY new to this and learning how it works... and accidents happen...

thank you for the help i will definatly try it.. can you tell me where I enter this code?

Never used an age verification script before, but just on my test server it seems to work fine in just about ANY index or header file. On every one, I just put it right at the top of each one (even before the <php?) and it showed up. Try each one, as some lets it load the background, while others don't. I figure the actual "Proper" place for it would be in the header.php of YOUR template, but like I said, it works almost anywhere.

Hope this helps.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

24 Apr 2008, 3:58 PM
#6
chachab avatar

chachab

New Zenner

Join Date:
Apr 2008
Posts:
73
Plugin Contributions:
0

Re: Need Age Verification before entering page

Get Em Fast:

I figure the actual "Proper" place for it would be in the header.php of YOUR template, but like I said, it works almost anywhere.

Hope this helps.

I tried this in 3 places all in my main "public_html" file... heres what happened.

/includes/templates/1112/common/tpl_header.php website would not ask for verification, but would go directly to a pop up that said "you can not come in" (the alert and directly send me to page not found
admin/includes/header.phpSame error as above
admin/index.php nothing happened - visited page in normal manner (no authorization)

Maybe I am not in the right places?

hmmmm... any ideas?

by the way.. thanks for all the help

Classy, Upscale, Sophisticated, Discreet
www.ClassyDesires.com

25 Apr 2008, 1:37 PM
#7
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Need Age Verification before entering page

chachab, you're going to have to change the URL's to your own, something like:

<script language="javascript">  
var agePrompt=prompt("Please enter your Age. Example (24)")  
if (agePrompt>=18)  
document.location="http://www.getemfast.com"; 
else {  
alert('Sorry, we can not let you in!')  
document.location="http://www.getemfast.com/index.php?main_page=contact_us";  
}  
</script>

This works just fine if you will put it at the VERY TOP of Index.php (the one that's in the root of your shop).
Hope this helps.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

30 Mar 2009, 11:34 AM
#8
blown57 avatar

blown57

New Zenner

Join Date:
Mar 2009
Posts:
3
Plugin Contributions:
0

Re: Need Age Verification before entering page

hi, im new to this aswell but i was wondering how would i get this to work on just one catagory in my shop as the rest of the site it doesnt matter what age you are.. (its a dvd site)

30 Mar 2009, 5:35 PM
#9
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Need Age Verification before entering page

blown57:

hi, im new to this aswell but i was wondering how would i get this to work on just one catagory in my shop as the rest of the site it doesnt matter what age you are.. (its a dvd site)

You should be able to put this script on the specific page that you need the age verification on, so that when that page is called, the verification script kicks in first.

Hope this helps.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

5 Apr 2009, 12:00 AM
#10
blown57 avatar

blown57

New Zenner

Join Date:
Mar 2009
Posts:
3
Plugin Contributions:
0

Re: Need Age Verification before entering page

thanks for your reply Get Em Fast. but i cant work out what page to load it on to... if i put it onto the main index.php it automatically blocks me out of the site and says that im not allowed in. please help asap.

thanks again

9 Apr 2009, 5:49 PM
#11
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Need Age Verification before entering page

Hey, how's it goin? Been waiting to hear from you on WLM. Are you still having problems with the "Age Verification Script"? If, so, let me know the EXACT URL to the page you're trying to use it on, and I'll see what I can do. If it's something else, just let me know. I've not always got my messenger up, but I DO check it several times a day. Later........................

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

15 May 2009, 4:19 AM
#12
demz001 avatar

demz001

New Zenner

Join Date:
Sep 2008
Location:
Gold Coast, Australia
Posts:
56
Plugin Contributions:
0

Re: Need Age Verification before entering page

I have a slightly different question. I have a wholesale site that I don't want anybody to go to except for people with a login.

How would I create a login page that appears the mainpage? Sort of like the cpanel login or even the zen cart admin login.

Is this possible? :mellow:

Tooty Fruity

15 May 2009, 4:20 AM
#13
demz001 avatar

demz001

New Zenner

Join Date:
Sep 2008
Location:
Gold Coast, Australia
Posts:
56
Plugin Contributions:
0

Re: Need Age Verification before entering page

sorry, I mean "create a login page that apears before the mainpage"

Tooty Fruity

15 May 2009, 8:01 PM
#14
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Need Age Verification before entering page

demz001:

I have a slightly different question. I have a wholesale site that I don't want anybody to go to except for people with a login.

How would I create a login page that appears the mainpage? Sort of like the cpanel login or even the zen cart admin login.

Is this possible? :mellow:
In your situation, I would just go to Admin>Configuration>Customer Details.......**Customer Shop Status - View Shop and Prices, **an Set to 1(Must log in to browse).

Hope this helps.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

17 May 2009, 12:44 AM
#15
wolfsden avatar

wolfsden

New Zenner

Join Date:
Jan 2008
Posts:
10
Plugin Contributions:
0

Re: Need Age Verification before entering page

I have a similar question, although it may be a bit more code intense. I really don't know.

One category of my store is adult-oriented. It's clearly marked "adult oriented maille 18+". I would much rather have this category setup with a script for age-verification, so the kiddies can't just wander in "Oops! Sorry Mommy/Daddy. I was just looking for chainmaille Dice bags for D&D and this page came up!"

Is it possible to restrict a single area? or am I pretty much stuck with it being this way?:frusty:

Thanks for any help.

David Stous
Chief Maille Smith
Wolf's Den Armoury
https://www.wolfsdenarmoury.com

17 May 2009, 2:33 PM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Need Age Verification before entering page

You can customize the Zen Cart code to do anything you like ... :smile:

The question is thinking through everything you need done ... :unsure:

Let's say you have categories_id 69 as the adult only category ...

You want to have an authorization to get the the Product Listing when this category is selected ...

But ... what happens to:
Search and click on a product?

New Products?

Featured Products?

Specials?

All Products?

The centerboxes?

Coming in from a Search engine to a Product _info page?

How far do you need to take the management of the display of the Products that are in categories_id 69 to block it? :lamo:

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!]
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!

17 May 2009, 11:05 PM
#17
demz001 avatar

demz001

New Zenner

Join Date:
Sep 2008
Location:
Gold Coast, Australia
Posts:
56
Plugin Contributions:
0

Re: Need Age Verification before entering page

Get Em Fast:

In your situation, I would just go to Admin>Configuration>Customer Details.......**Customer Shop Status - View Shop and Prices, **an Set to 1(Must log in to browse).

Hope this helps.

Thanks "Get Em Fast",

That did the trick for me.:clap:

Tooty Fruity

18 May 2009, 1:52 AM
#18
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Need Age Verification before entering page

demz001:

Thanks "Get Em Fast",

That did the trick for me.:clap:

Anytime. Glad to help.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

8 Feb 2010, 3:00 PM
#19
ricky123 avatar

ricky123

New Zenner

Join Date:
Feb 2010
Posts:
1
Plugin Contributions:
0

Re: Need Age Verification before entering page

Get Em Fast:

You should be able to put this script on the specific page that you need the age verification on, so that when that page is called, the verification script kicks in first.

Hope this helps.

hi, my problem is i get the pop up again when it redirects, like its missing a cookie or something,

now let me explain how im using the script, im using a a movie cms and i place the script like when i link or embed a video on the add a page area in html.

i try to put it in another place in the cms files other than same place where i embed videos but i cant find where to place it on the host files,

i can put in index but i dont want it on every movie, only some are adult, ive tried somany 0.0 but no result works, i like this one the best if i can get it right,

well thanks in advance if and when you can help me out

best regards ricky rick

27 May 2010, 9:36 AM
#20
celticsweb avatar

celticsweb

New Zenner

Join Date:
May 2010
Posts:
8
Plugin Contributions:
0

Re: Need Age Verification before entering page

Get Em Fast:

chachab, you're going to have to change the URL's to your own, something like:

<script language="javascript">
var agePrompt=prompt("Please enter your Age. Example (24)")
if (agePrompt>=18)
document.location="http://www.getemfast.com";
else {
alert('Sorry, we can not let you in!')
document.location="http://www.getemfast.com/index.php?main_page=contact_us";
}
</script>

> 
> 
> This works just fine if you will put it at the VERY TOP of Index.php (the one that's in the root of your shop).
> Hope this helps.

I was able to get the code to work but the only problem is that I am not sure what it wants me to enter into the box to get to the site .... I typed in 18 and I also tried 21 and I also tried typing in my birth date but it did not work ... What does it want me to enter? Thanks!! 

Celtic