bigwave Posted May 17, 2014 Share Posted May 17, 2014 Hello, For some reason when you use an affiliate link, it shows that you got a visitor but it never tracks the sale. The * is the original from WHMCS. I had modified it and that's when it stopped working but I have put it back to normal now and it's still not tracking the sales. Please let me know what could be wrong to cause it not to track the sales. I will list the * code below just in case it's something wrong there. <?php /** * Affiliate Cookie Tracking + Redirection Handler * * @package WHMCS * @author WHMCS Limited <development@whmcs.com> * @copyright Copyright (c) WHMCS Limited 2005-2013 * @license http://www.whmcs.com/license/ WHMCS Eula * @version $Id$ * @link http://www.whmcs.com/ */ define("CLIENTAREA",true); require("init.php"); // if affiliate id is present, update visitor count & set cookie if ($aff = $whmcs->get_req_var('aff')) { update_query("tblaffiliates",array("visitors"=>"+1"),array("id"=>$aff)); WHMCS_Cookie::set('AffiliateID',$aff,'3m'); } // if product id passed in, redirect to order form if ($pid = $whmcs->get_req_var('pid')) redir("a=add&pid=".(int)$pid,"cart.php"); // if product group id passed in, redirect to product group if ($gid = $whmcs->get_req_var('gid')) redir("gid=".(int)$gid,"cart.php"); // if register = true, redirect to registration form if ($whmcs->get_req_var('register')) redir("","register.php"); // if gocart = true, redirect to cart with request params if ($whmcs->get_req_var('gocart')) { $reqvars = ''; foreach ($_GET AS $k=>$v) $reqvars .= $k.'='.urlencode($v).'&'; redir($reqvars,"cart.php"); } // perform redirect header("HTTP/1.1 301 Moved Permanently"); header("Location: ".$whmcs->get_config('Domain'),true,301); 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted May 19, 2014 WHMCS Support Manager Share Posted May 19, 2014 Hi, First please ensure the order contains a product and said product does not have a custom commission rate set to 0.00. When attempting to test this, please ensure you are logged out of the admin area and the client area. Make sire the order is not being made under the affiliate's account. WHMCS has measures in place to prevent self-referrals and you might be accidentally falling foul of these in your tests. 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.