Gears Posted August 16, 2007 Share Posted August 16, 2007 Hey The Unique referral link looks something like this: http://whmcs.example.com/*?aff=022 Is it possible to use something like https://whmcs.example.com/order.php?aff=022 or https://whmcs.example.com/order.php?step=2?aff=022 or anything like that.... ? 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted August 16, 2007 Author Share Posted August 16, 2007 Hmm nevermind... I would need to use * for it to work. 0 Quote Link to comment Share on other sites More sharing options...
CSNM-Carl Posted August 16, 2007 Share Posted August 16, 2007 Why would you want to do that? 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 16, 2007 Share Posted August 16, 2007 yes, thats very easy to do, just setup a {if $smarty.get.this}Javascript redirect to this page{/if} 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted August 18, 2007 Author Share Posted August 18, 2007 Why would you want to do that? So the Affiliate can link to a certain page (not just the homepage). MACscr, thanks. Think it would be possible to redirect according to what the incoming URL is? For instance, if the incoming URL ended in aff=002 then it would redirect to page1.html, but if the incoming URL ended in aff=005 then it would redirect to page2.html. I have little/no experience with JavaScript. I'll do some Googling for JavaScript redirects. Any other suggestions or comments are welcomed. Thanks again MACscr 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 18, 2007 WHMCS CEO Share Posted August 18, 2007 Yes, the * page can go wherever you want it to. The * file is unencoded so that you can edit it and change the redirect or set it so that specific affiliates are redirected to different locations than others. Matt 0 Quote Link to comment Share on other sites More sharing options...
mhassan Posted August 8, 2013 Share Posted August 8, 2013 Hye Can you guide where and what to edit in the * file. I have pasted all links for affiliates however when required banner is clicked it shows 404 error with the following * script. <?php /** * Affiliate Cookie Tracking + Redirection Handler * * @package WHMCS * @author WHMCS Limited <development@whmcs.com> * @copyright Copyright (c) WHMCS Limited 2005-2013 * @license [url]http://www.whmcs.com/license/[/url] WHMCS Eula * @version $Id$ * @link [url]http://www.whmcs.com/[/url] */ 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...
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.