Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Excluding categories in Search


dvdpusher

Recommended Posts

Posted

Hi!

 

I have a DVD store, and now I want to add "adult-movies" to the store. BUT i still want it to be "safe" for children and persons who don’t want to see that kind of movies.

 

I have solved the big issue about "age control" by installing the contrib "Adult Check". This allows only entry to the selected category+products in this category by accepting that you are over 18+ (legal age in Denmark for buying adult content).

 

Now to the problem: I don’t want people to get "wet teenies" and what’s worse, when they are searching for Teenage Mutant Ninja Turtles ;)

So how do I restrict the search-option to only include "normal movies"?

 

Or better yet, how do I disable it, when the cookie isn’t set, and enable it, when the cookie is set?

 

The cookie-check from Adult Check is as follows (if this is any help-helping me :rolleyes: ):

 

 

/* START age ORIGINAL code by kjeffery.com

 

 

$restricted_category = 3; # change this to the category you want to restrict

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 ORIGINAL by kjeffery.com */

 

/* START age code mfg */

$restricted_category = (AGE_PAGE_CATEGORY);

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 */

 

 

 

 

Regards from Michael /Denmark

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...