Jump to content
Latest News: (loading..)
Sign in to follow this  
jazanaca

Have you used this

Recommended Posts

Hi, has anybody used the age restriction add-on, with the yes and no submit, so that it redirects to index.php for under 18 and restricted category if over 18. I am trying to sort it but it still doesn't work. Can anybody help.

Thank you

Share this post


Link to post
Share on other sites

Without more detail of what happen and why it is wrong I don't think anybody can help.

 

Otherwise I am sure you can find someone to fix it for you.

 

Cheers

 

G


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites

Without more detail of what happen and why it is wrong I don't think anybody can help.

 

Otherwise I am sure you can find someone to fix it for you.

 

Cheers

 

G

 

I have been trying lots of different things with the age code to try and get it to work with no luck.

I assume the problem is with the age code that is in the age-page, I will paste it in and mark where I think the problem is. i have found a way to make the NO submit work, but the YES keeps returning to the age-page

 

 

/// Redirect over database

if ($ageverify == "YES"){

$oflegalage = 'yes';

tep_session_register('oflegalage');

Header("Location: index.php?cPath=2357"); #restricted category URL from DATABASE -- I assume the problem is on this line and the last line

}elseif ($ageverify == "NO"){ # under 18 go to index page:

$oflegalage = 'no';

tep_session_register('oflegalage');

Header("Location: index.php"); # URL for minors from DATABASE -- Also here

 

}

/// Redirect over database

 

below is from the age code from the original document I downloaded, I will also insert the part from application top incase there is anything wrong with it.

 

/// Redirect over database

if ($ageverify == "YES"){

$oflegalage = 'yes';

tep_session_register('oflegalage');

tep_redirect(tep_href_link(AGEPAGE_SHOW)); #restricted category URL from DATABASE this is different to the above

}elseif ($ageverify == "NO"){ # under 18 go to index page:

$oflegalage = 'no';

tep_session_register('oflegalage');

tep_redirect(tep_href_link(AGEPAGE_REDIRECT)); # URL for minors from DATABASE this is different to the above

 

 

}

/// Redirect over database

 

from application top:

 

/* START age code mfg */

$restricted_category = 2357;

if ($cPath_array[0] == $restricted_category) {

 

if (!tep_session_is_registered('oflegalage')) { # cookie not set

$age_page_path = 'age-page.php'; # change this to the name of your age agreement page

$navigation->set_snapshot();

tep_redirect(tep_href_link($age_page_path)); # redirect to age agreement page

 

} else { # cookie is registered

if ( $oflegalage == 'yes') { # of legal age, continue loading the category

 

} elseif ($oflegalage == 'no' ) {

 

$age_page_path = 'age-page.php'; # change this to the name of your age agreement page

$navigation->set_snapshot();

tep_redirect(tep_href_link($age_page_path)); # redirect to age agreement page

} # end legal age

 

} # cookie registered

} # restricted category

/* END age code by mfg */

 

Maybe if you go to the site and have a look -- www.finditcheaperonline.com/age-page.php.

 

Hope you can help.

 

Thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×