Boss Posted July 8, 2009 Share Posted July 8, 2009 1. How do you set the correct URL to send the affiliate client too? 2. You set different affiliate commissions via Per product, a default all affiliates, and/or alter per customer. But what gets priority? I want set a default commission for but that same default is not going to be correct for Domain names, so I want a lower commission on those. But I also have one client/Affiliate I want to give a little more commission to than the standard. If I set this Affiliate to a higher commission is it going to overrule the individual product commission I set? Look forward to some please. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted July 8, 2009 WHMCS Support Manager Share Posted July 8, 2009 1. The affiliate URL is generated automatically for each client. 2. Customer overrides all > Product > Default. Domains are not included in the affiliate system. 0 Quote Link to comment Share on other sites More sharing options...
Boss Posted July 9, 2009 Author Share Posted July 9, 2009 (edited) 1. The affiliate URL is generated automatically for each client.2. Customer overrides all > Product > Default. Domains are not included in the affiliate system. OK thanks for that info, that helps with the No. 2 problem. Re the No. 1 Problem. What you say there I know, BUT the URL is not going to the page I want the banner to go to. I don't want them to just go to my default home. For 2 reasons. My home page is dynamic so the page the prospective client might end up will in most cases will having nothing to do with hosting. The affiliate won't want this neither do I. I also want to put up two Banners to start with, one for Domains and the other for Hosting, both of which are on different pages. Later I would like to setup specific pages for the affiliate. How do I do this please? Edited July 9, 2009 by Boss 0 Quote Link to comment Share on other sites More sharing options...
Redsign Posted July 10, 2009 Share Posted July 10, 2009 * is unencrypted so you can do modify it to do this. Goodluck, Ben 0 Quote Link to comment Share on other sites More sharing options...
Boss Posted July 10, 2009 Author Share Posted July 10, 2009 * is unencrypted so you can do modify it to do this. Goodluck, Ben That file I have looked at and has next to nothing in it. I don't see how I can do anything with it. Any further advise please? 0 Quote Link to comment Share on other sites More sharing options...
Redsign Posted July 10, 2009 Share Posted July 10, 2009 Replace your * with: <?php define("CLIENTAREA",true); include("dbconnect.php"); include("includes/functions.php"); if (isset($aff)) { update_query("tblaffiliates",array("visitors"=>"+1"),array("id"=>$aff)); setcookie("WHMCSAffiliateID", $aff, time()+90*24*60*60); } //Custom page code $destination = ""; if(isset($_GET["p"])) $destination = $_GET["p"]; header("HTTP/1.1 301 Moved Permanently"); header("Location: ".$CONFIG["Domain"]."/".$destination); ?> The using *?page=index.php or page=hosting/plans.php will redirect to your domain as set in the whmcs config + whatever ?p= is. Then place this code in your affiliates setting to set the links: <a href="[AffiliateLinkCode]&p=samplefolder/samplepage.php">Sample Page Direct Affiliate Link</a> That would take the user to http://www.yourdomain.com/samplefolder/samplepage.php If p is not set it will default to your default domain. Let me know how it goes! Ben 0 Quote Link to comment Share on other sites More sharing options...
Boss Posted July 11, 2009 Author Share Posted July 11, 2009 Looks really good, thanks Ben. Will try it and let you know. 0 Quote Link to comment Share on other sites More sharing options...
Boss Posted July 11, 2009 Author Share Posted July 11, 2009 Replace your * with:Let me know how it goes! Ben Very cool. Works like charm. Thank you very much 0 Quote Link to comment Share on other sites More sharing options...
Redsign Posted July 11, 2009 Share Posted July 11, 2009 Very cool. Works like charm. Thank you very much No problem 0 Quote Link to comment Share on other sites More sharing options...
tekone Posted October 13, 2009 Share Posted October 13, 2009 Can anyone confirm this works in the current version? 0 Quote Link to comment Share on other sites More sharing options...
jasontheman07 Posted January 25, 2010 Share Posted January 25, 2010 Replace your * with: <?php define("CLIENTAREA",true); include("dbconnect.php"); include("includes/functions.php"); if (isset($aff)) { update_query("tblaffiliates",array("visitors"=>"+1"),array("id"=>$aff)); setcookie("WHMCSAffiliateID", $aff, time()+90*24*60*60); } //Custom page code $destination = ""; if(isset($_GET["p"])) $destination = $_GET["p"]; header("HTTP/1.1 301 Moved Permanently"); header("Location: ".$CONFIG["Domain"]."/".$destination); ?> The using *?page=index.php or page=hosting/plans.php will redirect to your domain as set in the whmcs config + whatever ?p= is. Then place this code in your affiliates setting to set the links: <a href="[AffiliateLinkCode]&p=samplefolder/samplepage.php">Sample Page Direct Affiliate Link</a> That would take the user to http://www.yourdomain.com/samplefolder/samplepage.php If p is not set it will default to your default domain. Let me know how it goes! Ben Thanks Ben for saving me 10 bucks and time! I had this setup in 5 minutes, and working perfectly! I am going to use this to generate a template for my affiliates that frame the whmcs order pages - pretty much giving the affiliate their own "white label" hosting site! Simple, yet effective! Cheers! Jason http://www.joomlamazing.com 0 Quote Link to comment Share on other sites More sharing options...
hostedweb Posted January 28, 2010 Share Posted January 28, 2010 Sound as a pound, thankyou very much for this share! 0 Quote Link to comment Share on other sites More sharing options...
mediastream Posted August 18, 2010 Share Posted August 18, 2010 could you please post an exact example of what would work bit confused over the p busines lol for example pick a link in frontend say affiliate page how could i link that page direct with affiliate link etc so if adverising from another site instead of landing on home page it would goto affiliate.php for example little more clarity neeeded, does * stay as is, do you have to add many edits to it per page i wanna redirect? or it stays with both referneces as p cheers steve 0 Quote Link to comment Share on other sites More sharing options...
smg2010 Posted August 27, 2010 Share Posted August 27, 2010 How can you setup an new affiliate account without the affiliate purchasing one of your hosting products? I need to setup someone that does not need my services but are sending customers my way. Thank You 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 28, 2010 Share Posted August 28, 2010 Create a new client, and activate their affiliate status... 0 Quote Link to comment Share on other sites More sharing options...
disgruntled Posted September 15, 2010 Share Posted September 15, 2010 (edited) Your code game me a bit of a fun idea for affiliate linking, you might like this and anybody else come to that matter. This is an SEO Friendly affiliate linking mod. This mod will link directly to a Product Groupwith the htaccess using mod rewrite to direct the user to *. * gathers the location info and sets the cookie to the desired length of expire time, longer the better if yo want to be fair to your affiliates. and redirects the user right to the product if set, otherwise will be to any page you decide. You need the following code that is slightly modified from above and some .htaccess rulesets. So here is what i have and it seems to be working fine. * <?php define("CLIENTAREA",true); include("dbconnect.php"); include("includes/functions.php"); if (isset($aff)) { update_query("tblaffiliates",array("visitors"=>"+1"),array("id"=>$aff)); setcookie("WHMCSAffiliateID", $aff, time()+90*24*60*60); } //Custom page code #uncomment your chosen redirect on empty "item" $destination = $CONFIG['domain']; #$destination = $CONFIG['domain'] . "path/to/page.php"; if(isset($_GET["item"])) # Just uncomment the version you want to use $destination = "packages.php?list=" . $_GET["item"]; # $destination = "cart.php?gid=" . $_GET["item"]; header("HTTP/1.1 301 Moved Permanently"); header("Location: " . $destination); ?> You will note from above that i actually have a packages page in my system root this is an extra page that i am using instead of whmcs own package groups which i have added in and commented, just switch the comment or delete it and delete my own style. .htaccess This is the magical SEO rewrite its kinda cool and well your links will look pretty # packages solution RewriteRule ^packages/([0-9]+)/([a-z0-9_-]+)\.html$ ./*?aff=$1&list=$2 [L,NC] #cart product group solution RewriteRule ^cart/([0-9]+)/([0-9]+)\hosting.html$ ./*?aff=$1&list=$2 [L,NC] example of redrection based on package option packages/111/222.html -> *?aff=111&item=222 -> packages.php?item=222 <a href="http://yoursite.com/111/packagename.html">Fantastic Hosting At YourSite.Com</a> Example of redirection based on cart option cart / 111 / 222 / hosting.html -> aff,php?aff=111&item=222 -> cart.php?gid=222 #Affialiates would link to a product group like this <a href="http://yoursite.com/111/222/hosting.html">Fantastic Hosting At YourSite.Com</a> In my own php file i use the packagename section of the url to define which part of teh tpl file displays. Great eh SEO Friendly affiliation and all in one rule and a small php file Foot Note, i am assuming the pre-stated method of setting up links to displayt inside the client area is as above i have not yet done that side of it. Edited September 15, 2010 by disgruntled 0 Quote Link to comment Share on other sites More sharing options...
Redsign Posted September 21, 2010 Share Posted September 21, 2010 Like what you've done with it! 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.