Catalog page visible to wholesalers only
If a client wants to keep the catalog page hidden to anyone who is not a wholesale vendor, you can use this easy mod to send them back to the wholesale login page until they log in.
-
Open the openinfo.php page in the /enc/ folder.
-
Find the lines:
// Set review link $View_Page = "http://" .$Mals_Server .".aitsafe.com/cf/review.cfm";
-
Just above those lines, add the code:
// START MODIFICATION - RESET IF NOT LOGGED IN if ($setpg == $catpg AND empty($dirname) AND (empty($wspass) OR empty($wsemail) OR $wsnum != 1)) { header("location: " .$URL ."/wholesale." .$pageext); } // END MODIFICATION - RESET IF NOT LOGGED INand save the file.
Alternate Option - To return the customer back to the wholesale page if any page other than the wholesale page (and not just the catalog page!) is selected, use the following:
-
Open the openinfo.php page in the /enc/ folder.
-
Find the lines:
// Set review link $View_Page = "http://" .$Mals_Server .".aitsafe.com/cf/review.cfm";
-
Just above those lines, add the code:
// START MODIFICATION - RESET IF NOT LOGGED IN if ($setpg != "wholesale." .$pageext AND empty($dirname) AND (empty($wspass) OR empty($wsemail) OR $wsnum != 1)) { header("location: " .$URL ."/wholesale." .$pageext); } // END MODIFICATION - RESET IF NOT LOGGED INand save the file.
Important! If you use this second alternate option, there is a chance of a continual loop if you do not type the code in correctly. Please test thoroughly before allowing customers to use the site.