Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › Affiliate commission by product for specific member level
- This topic has 10 replies, 2 voices, and was last updated 11 years, 4 months ago by admin.
-
AuthorPosts
-
July 23, 2013 at 6:01 pm #9375RobertParticipant
I have both “affiliates” and “consultants”. Affiliates simply send traffic to my website, while consultants are actual sales people selling the product. I have the system set to automatically give affiliates 20% commission and I manually set up consultants to get 40% commissions. Consultants are set up via the eMember plugin (I have the store, affiliate and member plugins). What I need to do is give certain commissions by product only to consultants.
I realize this is a bit involved and will be fine making the change to the code myself, what I need to know is where in the code is the check to use either the affiliate commission or the product commission?
Thanks,
Robert
July 24, 2013 at 6:07 am #56756adminKeymasterLook in the “eStore_aff_award_commission” function inside the “eStore_post_payment_processing_helper” file. That function handle the commission awarding for payments processed by eStore plugin.
July 24, 2013 at 8:17 pm #56757RobertParticipantThanks. That was what I was looking for. I am having trouble getting the “details” shortcode to work.
This shortcode just shows the shortcode text on my web page.
[wp_affiliate_referrer_details info=”firstname”]
I thought it would show the affiliate info. Where is this in the code?
July 25, 2013 at 4:30 am #56758RobertParticipantAlso, on a related note, is there a way to programmatically “set” the affiliate without having to use the affiliate form.
I know you can display the form and the user can set it, but I want to automatically set the affiliate for members that log in (I have the system set to create an affiliate with the same id when the member of a certain level is created). So when that member logs in, I want the affiliate to be set so their purchases are recorded to that affiliate.
July 25, 2013 at 6:16 am #56759adminKeymasterWhat version of the affiliate plugin are you using?
I don’t really understand how you want to automatically set the affiliate ID. Who will the affiliate ID be set to for a member?
Regarding your question about protecting navigation menus, see the following post:
July 25, 2013 at 6:23 am #56760RobertParticipantThe affiliate id would be set to the member. When a member of a specific level logs in, I want the affiliate id set to that person (the system creates a member and an affiliate with the same id).
So for example, I have a membership of level 2 called consultant. If a consultant logs in I want to set the affiliate id to them. These are people who are placing orders for other people, so I want them to get commissions. I do this by setting their affiliate id. Right now, I have the set affiliate form and they have to go in and type it in themselves, I’d like to automate it.
Does this make more sense?
July 26, 2013 at 1:56 am #56761adminKeymasterYep, that makes sense. It will be best to apply this via a custom addon plugin. So when a member logs into the system, this custom addon can set the affiliate ID automatically.
Are you a developer and okay with creating a custom addon plugin?
July 26, 2013 at 8:29 am #56762RobertParticipantNot sure I’d call myself a developer. I have modified a number of plugins, but never created one or created and addon one. Would be happy to try if you could point me to a good reference/give me some kind of example to get me started.
July 27, 2013 at 12:07 am #56763adminKeymasterThis one is not going to be easy though. It involves writing a new plugin (small but a separate addon plugin). We will have to handle it as a custom job:
July 27, 2013 at 5:13 am #56764RobertParticipantI’d prefer to tackle this myself. Do you know of any good starting references to use for creating an addon plugin?
Also, what do I need to know to create the “addon” link between my new plugin and the eMember plugin?
Thanks
July 28, 2013 at 12:09 am #56765adminKeymasterIt will be another little plugin so any resource that teaches you how to create a WordPress plugin is a good starting point. Here are some resources:
https://codex.wordpress.org/Writing_a_Plugin
http://wp.smashingmagazine.com/2011/09/30/how-to-create-a-wordpress-plugin/
http://www.tipsandtricks-hq.com/how-to-create-a-wordpress-plugin-video-tutorial-4547
Create a little plugin that does something first then we will get to the next part.
-
AuthorPosts
- You must be logged in to reply to this topic.