Jump to content

Setting up affiliate details etc


Boss

Recommended Posts

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.

Link to comment
Share on other sites

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 by Boss
Link to comment
Share on other sites

* 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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...
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

Link to comment
Share on other sites

  • 6 months later...

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

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

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 by disgruntled
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated