Affiliate

Contrib type: 
Module
Status: 
Initial upload
Moderation: 
Not ready for moderation

Downloads

Compatibility: 
Ubercart 1.x

This module create affiliate tracking functionality for Ubercart. Its still in early development stages, but still ready to test drive. It is continually being updated by various members of the community.

Please leave feedback, comments, suggestions here.

Module history: http://www.ubercart.org/forum/support/1586/how_are_people_doing_affilate....


PreviewAttachmentSize
uc_affiliate.tar.gz14.39 KB
detour's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 10/02/2007
Juice: 150
Update for uc_affiliate

Attached is a new version of the uc_affiliate module. I've made the following changes in this release:

  • added monthly report of sales/commissions per affiliate in the admin section
  • reworked data displayed on the individual affiliate pages in the admin section
  • added uc_affiliates_paid table to track commission amounts paid
  • fixed titles on user's my business pages
  • added number of order statistics to uc_affiliate_counts
  • reworked data displayed on user's my business commissions page

Please contribute to the discussion here with any comments or questions.

AttachmentSize
uc_affiliate-20080108.tar.gz 15.8 KB
eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
What are requirments?

What are requirments for this module?

Zitun's picture
Offline
Joined: 12/28/2007
Juice: 21
a wild card subdomain

Except a wild card subdomain.

Like : myUser.myDomain.com and myUser will get the commission

Nothing else...

Zitun

eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
Subdomain

So for each new user i must create a subdomain?
My hosting has a limit count of subdomains.
Can the affiliate link be the same as for original drupal affiliate module (www.site.com/?a=[uid])?

And one more question:
Is there a kind of account? From where user can get money to buy some products in the shop?

eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
Another kind of affiliate link

As i have mentioned - i can't do a subdomain for each affiliate user, so i want to make links in this way
www.site.com?a=[uid]

To do this i have modify the function uc_affiliate_click (i write new code between comments [e+] and [e-])

<?php
/**
* Records affiliate ID in the user session and counts the click.
*/
function uc_affiliate_click() {
 
// See if the URL references an affiliate in the subdomain
 
$subdomain = get_subdomain();
  if (
$subdomain && $subdomain != 'www') {
    ...
Here goes unchanged code ...
  } else {
   
/*[e+] else we use a link like this site.com/?a=uid*/
   
$aid = (int)$_REQUEST['a'];
    if (
$aid !== 0) {
     
// Lookup the affiliate's account
     
$account = user_load(array('uid' => $aid));
     
// make sure we have a valid account and make sure they have affiliate perms
     
if ($account && user_access('act as affiliate', $account)) {
       
// store affiliate id in session and increment click count
       
if (!$_SESSION['affiliate']) {
         
$_SESSION['affiliate'] = $account->uid;
         
uc_affiliate_add_count($account->uid, 1, 0, 0);
        }
      }
     
/*we need no redirection*/
   
}
   
/*[e-]*/ 
 
}
}
?>

This code is work for me. Maybe we may include it in new release!

eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
New version of affiliate

Has new features
- affiliate links can be in such format: www.site.com/?a=[uid]
- translate file to russian language
Has some improvements
- a lot of strings are chaged to be a parameters of the translation function

AttachmentSize
uc_affiliate version 16.01.08 by Eugef 20.18 KB
giorgio79@drupal.org's picture
Offline
Joined: 02/02/2008
Juice: 280
installed in modules what next?

Hi Guys,

I found the affiliate admin interface menu Smiling

Basically, will I have to setup myself the affiliate pages as seen on http://www.i-fitnesscenter.com/affiliate/, the showcase for this module where users need to signup?

I am aware I will have to create the banners and such...

Zitun's picture
Offline
Joined: 12/28/2007
Juice: 21
Hi, I don't really

Hi,

I don't really understand your question. As soon as someone has a account he can use the affiliate section as soon as his role can act as an affiliate...

This module is very simple and powerful...

Hope this help,

Zitun

giorgio79@drupal.org's picture
Offline
Joined: 02/02/2008
Juice: 280
Re: Hi, I don't really

Thanks Zitun, yeah my initial confusions cleared up. I should have spent a bit more time exploring the module before posting my question..

It all works and is indeed fantastic Sticking out tongue Just what I was looking for.

Zitun's picture
Offline
Joined: 12/28/2007
Juice: 21
French translation

Hi,

I used the uc_affiliate version 16.01.08 by Eugef version and translate the po.

Becareful I noticed in this version a new table uc_affiliate_paid and a new column in the table uc_affiliate_count

Here is the french po. Yet it's not perfect, it's a good beginning.

AttachmentSize
french.zip 2.78 KB
giorgio79@drupal.org's picture
Offline
Joined: 02/02/2008
Juice: 280
user warning: Table uc_orders doesn't exist query

Hi,

Has any of you had this when clicking on the commissions page with the latest Ubercart version? The user I clicked with had no commissions yet...

user warning: Table 'mydbname.uc_orders' doesn't exist query: SELECT uco.uid, uco.billing_first_name, uco.billing_last_name, ac.order_id, uco.created as order_date, ac.commission_notes, uco.order_total, ac.commission FROM test_uc_affiliate_commission ac INNER JOIN uc_orders uco on ac.order_id = uco.order_id WHERE aid = 1 AND uco.created between 1201816800 AND 1204322399 in mydrupalpath/includes/database.mysql.inc on line 172.

Cheers,
G

marafa@drupal.org's picture
Offline
InternationalizationizerNot Kulvik
Joined: 10/07/2007
Juice: 139
not installed

hi
i installed it on a fresh site without content or users and i got the following message:
You are attempting to access an affiliate store that does not exist. Please check the address and try again.

i dint know what to do, so i ended up uninstalling it.

however, the message still shows up. i check the db. the tables are gone. what do i do?

i used the eugef version

Mohammed Arafa

eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
Re: not installed

Maybe you install site on 3rd level domain (like this sub.site.com)?
This affiliate works correctly only with 2nd level domains (site.com) because sub.site.com is an affiliate store of user "sub".

marafa@drupal.org's picture
Offline
InternationalizationizerNot Kulvik
Joined: 10/07/2007
Juice: 139
ahh

i see
my drupal shop is a sub multi site setup.

but that still doesnt explain why after uninstalling it the message is still there

Mohammed Arafa

eugef's picture
Offline
Joined: 02/16/2008
Juice: 2
This is explanation: For

This is explanation:
For example your site has address - sub.site.com
User enters your site, Affiliate module extract subdomain name and gets "sub" - it consider that "sub" is a login of user which is an affiliater - but it don't find such user (and its shop).

So affiliate module thinks that sub.site.com is an affiliate shop of www.site.com!

mrtoner's picture
Offline
Joined: 12/26/2007
Juice: 71
Disable subdomain

Until we have a method for choosing the type of affiliate links (subdomain vs. query string) we want, I've completely disabled subdomain checking:

#Line 916, eugef's version
# $subdomain = get_subdomain();
$subdomain = "www";

In addition to choosing whether or not we want subdomain-based links, it would be helpful to use clean URLs for the affiliate links.

marafa@drupal.org's picture
Offline
InternationalizationizerNot Kulvik
Joined: 10/07/2007
Juice: 139
removing affliate module

i cant remove this module
my subdomain is in the form of ubercart.example.com and that is where it was installed.

i did a disalbe module, an uninstall module, went into the database and deleted the module's tables and went into drupal's system table to delete the listing of the module. and i have physically removed it from the file system.

what else is left to remove the message?

Mohammed Arafa

apeee's picture
Offline
Joined: 12/11/2007
Juice: 128
Re: Update for uc_affiliate

Is it working with ubercart beta 5?

okday's picture
Offline
Joined: 01/02/2008
Juice: 6
Re: Affiliate

Here are some ideas for the affiliate module.

Add support for the "user referral" module. This module already has some referral functionalities.

With the help of this module, the user will have a unique referral id.

By default, the user will have a referral URL generated by the "user referral" module.
When a visitor will visit the website from an affiliate URL and buy something, the referring member will obtain his commission.

Another idea will be to use a product URL and add /refer/ to the end of the pruduct url for generating the affiliate url for the product. *The referring Id will be the unique user referral id that is generated from the "user referral" module.

It will be good to have a link on the product page named "promote this product" with a link that will redirect the user to a page that will show the affiliate link for the product and all of the affiliate urls for the products of the website.

It will be good to have an option for enabling the affiliate link per product in the setting page of the affiliate module.

By adding support for the user referral module, the users will have an affiliate URL for redirecting visitors to the main page of the website (already supported by the module) and the ability to use an url like www.site.com/product/1/refer/ for being able to send visitors to a special product page.

This is some ideas.

Sorry for my poor English Smiling

Thank You.

okday's picture
Offline
Joined: 01/02/2008
Juice: 6
Re: Re: Affiliate

I can also contribute to this project by giving 100$ to the member that will develop this functionnality.

eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
Re: Re: Affiliate

Affiliate module has its own refering id for each user, but it is easy to set up any other.

If your product page is www.site/com/product/234.htm then refering url for this can be www.site/com/product/234.htm?a=[refering_id] - this functionality affiliate module has now.

So, okday, if you have more information about this task - contact me please.
By the way, my native language is Russian Smiling

mimetic2's picture
Offline
Joined: 08/07/2007
Juice: 478
Re: Re: Re: Affiliate

is there another admin page? So i see one under store configuration > affiliates and I notice that there are options under 'my account' but I am looking for a place to make image and text links but i cant find them. Am i supposed to do this on my own? How do i make a link for site.com/anyproduct/htm etc?

Are there any instructions on how to setup this module to start an affilaite? Best regards,

Aaron

eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
Re: Re: Re: Re: Affiliate

For now affiliate module don't have possibility to make image and text links.

katohn's picture
Offline
Joined: 04/18/2008
Juice: 2
New to Affiliate module

I recently installed the Affiliate module and I am having the same issue; no documentation anywhere on how to get the module fully functioning. How did ipodfitnesscenter.com setup their affiliate program? Point me in the right direction and I'll gladly write a howto to contribute to the project.

henns20's picture
Offline
Joined: 10/11/2007
Juice: 31
Don't get it....

How do you figure out the text link for the affiliate partner?....i would fund some documentation as well how about $50.00....how long does the affiliate tracking last...is it only tracked for one session where if referred user leaves and comes back on a natural web search would the affiliate still get the credit? thanks...luv the addition of affiliate.

also i should mention that i am using uc_affiliate version 16.01.08 by Eugef

jamie

giorgio79's picture
Offline
Joined: 03/07/2008
Juice: 2
Re: Affiliate

What is it that you are not getting?

Here is how it was done:
http://www.ubercart.org/forum/support/1586/how_are_people_doing_affilate...

mrboliao's picture
Offline
Joined: 05/06/2008
Juice: 2
Re: Affiliate

Once the commission is registered, does the module tie in with paypal to automatically pay the affiliate?

steingard's picture
Offline
Joined: 03/30/2008
Juice: 70
Commission ability on any order

I'm wondering if it would be possible for an affiliate to obtain a commission on any order that is created under his or her 'customer'/User ID?

The trouble I'm having is that when an order is created by a store admin (either by walk-in or by phone), they are potentially creating the order under an affiliate's customer ID (if the individual indicates that they were referred by someone who is an affiliate), and although the affiliate's order history says that they made a sale in their order history, their commissions aren't reflecting that sale.

I basically want to avoid the need for an affiliate or a store admin to have to manually type in the URL to attribute a "click" and sale for a given affiliate, in order to earn/record the commission on it.

Is this a relatively easy feature to add on?

web.take.away's picture
Offline
Joined: 05/27/2008
Juice: 4
Example?

Hi guys,

I looked this instruction here http://www.ubercart.org/forum/support/1586/how_are_people_doing_affilate... but the problem is that site in instruction http://www.ipodfitnesscenter.com/affiliate does not work. Maybe someone have another example? I still don't understand how can i track affiliates. We have registered user, how can this user send ti another link to product? Where he can find generated affiliate link?

Any information are welcome!

steingard's picture
Offline
Joined: 03/30/2008
Juice: 70
Re: Commission ability on any order (Nevermind)

Just as a follow up to my own comment, I spoke with my client and he feels that if a sale is made in a store or over the phone, the affiliate shouldn't need to get the attribution because of admin costs.

If it's absolutely necessary to make sure the hit and commission record is being generated, then they can always just follow the link from said affiliate's web site to complete an order.

Now I just need to figure out the best way for a regular user/customer on the site to become an Affiliate (via role upgrading). I'm sure I'll find some kind of a recipe on drupal.org for assigning roles based on node (bio or profile node) creation or something.

Cheers to Ubercart and its wonderful community of contributors.

giorgio79@drupal.org's picture
Offline
Joined: 02/02/2008
Juice: 280
Hi Developers, There is some

Hi Developers,

There is some bounty here for this module

http://www.ubercart.org/forum/bounties/4891/need_customizationinstallati...

nspedro's picture
Offline
Joined: 06/11/2008
Juice: 13
How to create affilliate links?

Hi, can you please be more specific on how to get this module to work? How can you create affiliate links?

nspedro's picture
Offline
Joined: 06/11/2008
Juice: 13
How to create affilliate links?

I got it.

You just need to use "http://mysite.com/?a=[uid]". I didn't think this was so simple so I was looking for more documentation.

I created a role called "affiliate". Added the "act as affiliate" permission to this role and then created a new user and assigned it to this role. Then I can start using the "?a=[uid]" part with any link I want. The "[uid]" is the user id of the user I just created.

It would be nice to have a tab in the user profile page with some documentation about the affiliate links and also a way to create your own links and banners.

dkashen's picture
Offline
Internationalizationizer
Joined: 08/08/2007
Juice: 180
quick question: I added the

quick question:

I added the affiliate module
(eugef's version http://www.ubercart.org/files/uc_affiliate_16.01.08.zip )
and it seems that every user now has affiliate permission .

Couldn't you have used "?a=[uid]" with any user prior to setting up an affiliate role ; When you (nspredo) added the "act as affiliate" permission , what did it actually change ?

Thx,

dkashen's picture
Offline
Internationalizationizer
Joined: 08/08/2007
Juice: 180
Clicks are being tracked, but orders aren't being credited

I played around a bit more and can see that the uc_affiliate module is role dependent so adding an affiliate role made sense and worked.

However, I go over here this page:

admin/store/affiliate/

setup UID 100 as an affiliate, and set the "order status" (Where in the order status that commissions will be assigned.) to payment received
but when I visit as UID 100

/user/100/affiliate

my test purchases aren't being credited although it looks like the clicks are being tracked.

Any ideas on what could be wrong ?

dkashen's picture
Offline
Internationalizationizer
Joined: 08/08/2007
Juice: 180
Re: Clicks are being tracked, but orders aren't being credited

using affiliate uid =100
this url
http://mysite.com/?a=100 
does not properly attribute the purchase to the affiliate,
while this url
http://mysite.com?a=100 

does.

Is this a feature or a bug ?

could it be affected by a funky .htaccess file ?

Thank you,

zach's picture
Offline
Joined: 08/13/2008
Juice: 9
no order credits coming through

i was able to get the subdomains working, but when i put a order through it doesn't add to the orders in the affiliate section. i does add one to the users, i'm not sure what that means. i have tried using the ?a=[uid] and it doesn't work for me. it won't redirect if the uid is wrong and it doesn't count clicks.

i'm trying to launch this site next week and i need this affilate module, any help will be appreciated

UPDATE: never mind, i had it set so it wasn't credited till the status was complete. my bad. hopefully this helps if someone else has this issue.

Thanks to everyone who contributed to this module, it is saving me from having to buy a cart.

jalamaohio's picture
Offline
Joined: 09/02/2008
Juice: 13
per user commission

in the settings page for the affiliate module I found the following line,

Sets the default commission structure which can be overridden on a per user base

anyone know where to set commissions on a per user basis? I looked under some individual user accounts to no avail.

mimetic2's picture
Offline
Joined: 08/07/2007
Juice: 478
Jalamaohio- The new

Jalamaohio-

The new affiliate v2 module (which is based on this), will do that for you. Get it here:

http://www.ubercart.org/contrib/6298

sandeep's picture
Offline
Joined: 09/30/2009
Juice: 2
How to send affiliate link to friends

Hi Developers

I have make a site on drupal and installed uc affiliate v2 module .
In this every thing is ok it calculate affiliates and commissions but main problem is that how to send my affiliate link to my friend.