How do you add your users as Affiliates?

I have installed the plugin and I am ready to go. How do I from the admin section set up the affiliates?

  • Vaughan

    Hi @hatchman,

    your users will need to actually sign up as an affiliate themselves.

    You will need to create an affiliates page, then add the shortcodes to that page.

    See the usage guide for more details. https://premium.wpmudev.org/project/wordpress-mu-affiliate/#usage

    Shortcodes

    Besides full access to the Affiliates Plugin features in the Admin Panel, you can use any of the following shortcodes within your posts or pages to provide front-end access as well.

    [affiliatelogincheck] – place this at the top of the page that you are planning on using the rest of the shortcodes on and it will display a login message if the user isn’t logged in.
    [affiliateuserdetails] – mirrors the affiliate details form from the admin area (yellow box)
    [affiliatestatstable] – mirrors the large click statistics table
    [affiliatevisitstable] – mirrors the referrers this month table
    [affiliatetopvisitstable] – mirrors the top referrers table
    [affiliatestatschart] – mirrors the main statistics charts
    [affiliatevisitschart] – mirrors the referrers charts
    [affiliatebanners] – displays the banners you add to your affiliate settings

    If the user isn’t logged in then none of the shortcodes will output anything (except for the top one).

    Once your users have signed up as an affiliate, they will be able to provide a site url to their website, affiliates plugin can then track referrals from that users website, they can also use a link with their unique affiliate id in the URL. Affiliates need to have an account on your site, you can't add affiliates that aren't registered as users on your site.

    Hope this helps

  • Hatchman

    Here is another feature request. You should be able to automatically flag users as affiliates without having to have them sign up. Reasons:

    1) You are building replicated website that has affiliate links for the user.
    2) You have a large user base that you want to convert to affiliates and send them links to forward to their friends.
    3) You have low tech people who should not be required to do anymore to become an affiliate.

    Best Regards

  • Hatchman

    @Paul

    Can I run a query that will insert my current users as affiliates? @Ignacio showed me that the usermeta has 4 basic rows added to it per affiliate as shown below.

    (1939, 55, 'enable_affiliate', 'yes'),
    (1940, 55, 'affiliate_paypal', 'paypalemail@whatevercom'),
    (1941, 55, 'affiliate_reference', 'not-sure-about-this'),
    (1942, 55, 'affiliate_hash', 'aff94bf31d081c82c9a942cdc802ecc1dd9');

    My question would be:

    How to generate the affiliate_hash and affiliate_reference?
    Is the paypal email required?
    Why use the usermeta table instead of a cross join table?

    Thks

  • Paul

    @Hatchman,

    How to generate the affiliate_hash and affiliate_reference?

    The 'affiliate_reference' usermeta value can be done for you. As part of the Affiliate plugin thee is a function 'aff_build_reference' located in affiliate/affiliateincludes/includes/functions.php You pass in a user Object and it will return the ref value.

    For the 'affiliate_hash' this is calculate as follows. The 'AUTH_SALT' is from your wp-config.php and is part of WP core. The $reference is the value returned from the function aff_build_reference() I covered in the previous paragraph.

    'aff' . md5(AUTH_SALT . $reference);

    The affiliate/affiliateincludes/classes/affiliateadmin.php lines 624-626 where this is actually done.

    Is the paypal email required?

    No. You can set this to blank.

    Why use the usermeta table instead of a cross join table?

    Well like everything else in WordPress which is user related this is stored in the usermeta table. Why would I want to use a separate table to hold the user specific data?

    This may change in some future release as I have some ideas about allowing an affiliate user to have more than one reference. Still the usermeta table can support more than one value for a unique key.

  • Paul

    @Hatchman,

    2) You have a large user base that you want to convert to affiliates and send them links to forward to their friends.

    Just reading some of your other comments and yes I agree. We need to add some sort of welcome email with instructions on how to use the affiliate ref code and what the limitations are. Right now when a user signs up they are just shown the URL with the ref code as an example but with very little explanation on how to use it.

    And would be nice to add the affiliate on the user signup. Just thinking.

  • Paul

    @Hatchman,

    When are you on live support?

    Not going to tell you. Really not a subject I want to cover over live support. Too hard to concentrate on code while you have other members posting questions.

    Maybe we can create an import user program that you can add to affiliate program. I have built complex affiliate programs prior. I am trying to get use to wordpress and the idea that all data goes into 2 tables. Not easy to deal with from a db efficiency standpoint.

    Well if you have any code you want to share that is fine. But no promises it will be included in the plugin. The thing with the import is the WP users should already be there. Now if you want to just do a mass import and create NEW WP user there are probably some existing plugins out there.

  • Hatchman

    Let me make it a little clearer.

    First I care very little if code is used. I just need an affiliate program and the reason I signed up for wpmu was because I was hoping to not have to build one myself.

    Second I wish I did not have to write code to rework the shortcomings of your "complete affiliate solution for wordpress". There is no logical reason why I as the admin do not have a way to bulk add a current list of users into the affiliate program. In fact, I can not even add one.

    Third I appreciate the time but I do not appreciate the cavalier reply to my post.

    I could have taken your reply wrong, if so I do apologize but it is frustrating working with these plugins. They lack some simple logic. Not just the affiliate program. I have been a developer for a long time and not use to the "wordpress way" of doing things.

  • Paul

    @Hatchman,

    I apologize for my abrupt reply. it was not my intention to ruffle you up or put you off. Realize I support more than a dozen plugins. I have a backlog or feature requests I'm trying to focus on and simply do not have time to help write code to bulk import users for your needs. I've only recently taken over support of the affiliate plugin from the previous developer so the 'complete affiliate solution for wordpress" is his doing not mine.

  • Hatchman

    @Paul

    Thanks for your reply. Not asking for you to write the code. I am pretty good at writing code but I suck at wordpress mainly because the architect is unique. I do not need a lot of support. Just a few questions answered. I am working on the items from your previous reply.

    My comment on the complete affiliate solution was simply in reply to the marketing on the website. Good luck with your task.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.