panacheweb Posted August 6, 2007 Share Posted August 6, 2007 at the moment the affiliate link only works with * and goes to the main page. I am wondering how much more coding or transfer of code it would be to add that info into the order.php page.. OR.. have the abiltiy for * to have a direct link to items that have an affiliate price in them. example. domain.com/whmcs/*?aff=001&step=2&pid=1 where the info from step=2&pid=1 gets transfered over to the order form. how much more coding would this be to do this? MJ 0 Quote Link to comment Share on other sites More sharing options...
PPH Posted August 6, 2007 Share Posted August 6, 2007 If you can figure out how, I am sure others here would love to know 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 6, 2007 WHMCS CEO Share Posted August 6, 2007 Not a lot. The * file is not encrypted so you can do changes like this if you want to. Matt 0 Quote Link to comment Share on other sites More sharing options...
PPH Posted August 6, 2007 Share Posted August 6, 2007 Not a lot. The * file is not encrypted so you can do changes like this if you want to. Matt Thanks for starting to supply it as a non-encrypted file. I didn't even realize it was no longer encrypted 0 Quote Link to comment Share on other sites More sharing options...
panacheweb Posted August 6, 2007 Author Share Posted August 6, 2007 I am programming this, and once I have it done I will post it for the community. MJ 0 Quote Link to comment Share on other sites More sharing options...
PPH Posted August 7, 2007 Share Posted August 7, 2007 I for one look forward to it 0 Quote Link to comment Share on other sites More sharing options...
panacheweb Posted August 7, 2007 Author Share Posted August 7, 2007 ok here is the code as I have coded it, although I would love to see Matt add this into this next release: <?php define("CLIENTAREA",true); include("dbconnect.php"); include("includes/functions.php"); if (isset($_GET["aff"])) { $aff = $_GET["aff"]; $step = $_GET["step"]; $pid = $_GET["pid"]; $gid = $_GET["gid"]; $aff = sanitize($aff); $query = "UPDATE tblaffiliates SET visitors=visitors+1 WHERE id='$aff'"; $result=mysql_query($query); setcookie("WHMCSAffiliateID", $aff, time()+90*60*24*30); } header("HTTP/1.1 301 Moved Permanently"); if ($_GET["aff"] == NULL) { header("Location: ".$CONFIG["Domain"]."/order".".php"); } elseif ($_GET["step"] == 2) { header("Location: ".$CONFIG["Domain"]."/order".".php"."?step=$step&pid=$pid"); } elseif ($_GET["gid"] == $gid){ header("Location: ".$CONFIG["Domain"]."/order".".php"."?gid=$gid"); } else { header("Location: ".$CONFIG["Domain"]."/order".".php"); } ?> hope this works for all of you, as this is what I needed for my website and affiliate program for how I was going to design it. MJ 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.