Products     Magento Extension     PCI-Shopping-Carts     Templates       CRELoaded     WordPress Modules     osCommerce Modules       osCommerce Addons       osCommerce Features       osCommerce Management       Payment Modules     CRELoaded Modules       CRE Loaded Addons       CRE Loaded Features       CRE Loaded Management       Payment Modules       CRELoaded Services
Free Stuff
Customization
Templates
Compare Products
You have no items to compare.
Affiliate Info
Affiliate Program FAQ
Affiliate Log In
Recent Orders
Hot Keywords: Order Notification, Order Search, Coupon, Flash Board, Compare, Floating Message, Tracking, Moneris, RSS, Visitor Filter

  Age Restricted Category

The following osCommerce contribution is a free Opensource code originated from official osCommerce website and provided for your reference only, you may download the original contribution file(s) and install it on your own; or you may request a Paid Installation Service from Agents Of Power; Agents Of Power does the "AS IS" installation on your website, we do not guarantee it will work properly on your website. Extra Paid service is available for repairing the problem from the original contribution or from your website.
I've noticed that when using this contribution the spiders like Googlebot would not be allowed our website restricted category and are redirected with a 302.
so I've created an spider detect script to allow the spiders to the restricted categorie.

find inside application_top.php this line:

$restricted_category = (AGE_PAGE_CATEGORY);


en replace with extra function spider detect

function spiderDetect() {
$agentArray = array("ArchitextSpider", "Googlebot", "TeomaAgent",
"Zyborg", "Gulliver", "Architext spider", "FAST-WebCrawler",
"Slurp", "Ask Jeeves", "ia_archiver", "Scooter", "Mercator",
"crawler@fast", "Crawler", "InfoSeek Sidewinder",
"almaden.ibm.com", "appie 1.1", "augurfind", "baiduspider",
"bannana_bot", "bdcindexer", "docomo", "frooglebot", "geobot",
"henrythemiragorobot", "sidewinder", "lachesis", "moget/1.0",
"nationaldirectory-webspider", "naverrobot", "ncsa beta",
"netresearchserver", "ng/1.0", "osis-project", "polybot",
"pompos", "seventwentyfour", "steeler/1.3", "szukacz",
"teoma", "turnitinbot", "vagabondo", "zao/0", "zyborg/1.0",
"Lycos_Spider_(T-Rex)", "Lycos_Spider_Beta2(T-Rex)",
"Fluffy the Spider", "Ultraseek", "MantraAgent","Moget",
"T-H-U-N-D-E-R-S-T-O-N-E", "MuscatFerret", "VoilaBot",
"Sleek Spider", "KIT_Fireball", "WISEnut", "WebCrawler",
"asterias2.0", "suchtop-bot", "YahooSeeker", "ai_archiver",
"Jetbot"
);

$theAgent = $_SERVER["HTTP_USER_AGENT"];

for($i=0;$i<count($agentArray);$i++){
if(strpos(" ".strtolower($theAgent), strtolower($agentArray[$i]))!= false){
return true;
};
};
return false;
}



/* START age code mfg */



if(spiderDetect()){
$restricted_category = 99999;
}else{
$restricted_category = (AGE_PAGE_CATEGORY);
}


this function detect if user_agent is spider and then the $restricted_category will be 99999
so it doesn't show the age_page.php

if it doesn't detect a spider the $restricted_category wil be (AGE_PAGE_CATEGORY);
and uses the given number for the categorie you have given to AGE_PAGE_CATEGORY inside admin


This is my first addon, hope you like te use of it ;-)
   Posted on: 04/16/2009     See contribution details Request Installation with Paid service