Your cart is currently empty!
Affiliate commission per product
—
by
Hi Kento,
Great program you wrote! I only can’t figure out how I can add different commission values to different products (default) and best also to different affiliates (for a few co-creators).
Couse I got my warm network whom are willing to walk the extra mile and my cold network whom just post a banner.
I’m using woocommerce, affiliate pro and intend to use your affiliate-products also (cause some of my affiliates are also co-builders of some of my programmes).
Thanks in advance!
Posted in Affiliates Pro
Comments
41 responses to “Affiliate commission per product”
@Kento: Did you end up developing this for Palmcone? I have similar needs.
Hi, no this hasn’t been done.
You are correct, I had not. And that was intentional as I asked for the ability to set the individual affiliate percentage case by case. When I run this test again, with your settings but the test affiliate instead of the direct account, it works as I previously described.
What you have done is given every affiliate a 3% commission which is not what I’m attempting to do.
It looks like we’ve hit a limitation here for your requirement, the limitation is that the system will override the custom method used in general when there is a rate set for an individual affiliate. What you seem to want is per-product-per-affiliate rates. This would really require some additional work and we would have to give you a quote for this. Let me know if that’s what you want please.
Hi Kento,
That’s understandable. I’m not sure how much my client would be willing to spend on this functionality but I appreciate the fact that you’re offering to continue development for these features. Most companies I’ve dealt with would simply say their software can’t do it but you are going above and beyond. Yes, I would love to have a quote for the additional work.
Thank you. 🙂
Hi,
Up to now, a lot of the work that has been done here has been influenced and made possible by people and the businesses behind them, thanks to those who have contributed to its development, that includes a lot of work which I have done and provided to the community as free plugins as well as the premium plugins. I think it’s a great way to provide a service, and if it’s feasible for those who contribute to the development of new features and those who implement them, then that’s a good thing 🙂
I’ll get in touch with a quote on this, it’s probably going to be interesting for others as well.
Cheers
I’ve completely uninstalled the previous version of the custom method product amount plugin. Downloaded and installed the new version.
Now it is ignoring the flat rate commissions and simply giving the percentage for the entire cart.
Hi,
new version 1.1.1 is available. Now it must work.
Remember to re-check Affiliates->Settings->ACM::product_amount.
cheers
Deactivated, uninstalled, downloaded 1.1.1, installed, verified settings, ran test.
Same exact result.
Maybe I’ve set something up wrong?
I have a test affiliate set up for a 3% commission using the manage affiliates section and adding the 0.03 value. It is my understanding that this commission should be paid on anything that doesn’t have a specific override in the “Affiliates” tab of the product itself.
I’m using 3 test products.
1: $11.99 with 0.0 selected in the product affiliates tab. This should make it have no commission.
2: $119.00 with the product affiliates tab empty. This default setting should be paying a 3% commission of $3.57
3: $449.00 with the product affiliate tab set to 50.00. This should pay out a $50.00 commission.
The cart total is $579.99
The commission being generated is 3% of the entire cart. $17.39
The commission total should be $0.00 + $3.57 + $50.00 = $53.57
Hi,
please send us dashboard admin access to support at itthinx dot com, and we’ll have a look.
cheers
Done
Hi,
you had not set anything in Affiliates->Woocommerce Integration->Products Rates->Default rate. I have set 0.03 and all seems work fine.
cheers
I also don’t understand your calculations. Is this based on 2.0% or .2% as show? Either way:
2.0% of $50 = $1.00
0.2% of $50 = $0.01
In Affiliates->Woocommerce Integration the value is relative to the unit. For example:
0.2 is 20%
1 is 100%
I understand how the percentage calculate but the numbers you gave didn’t add up for me.
OK, I installed the plugin.
“You must install, select ACM::products_amount in Affiliates->Settings.”
There is no “products_amount” option in Affiliates->Settings.
I then edit the product itself and the Affiliate options there have not changed. I see nowhere to enter a specific dollar amount, only percentages.
Hi,
in Affiliates->Settings, select “Referral Amount Method” as “Default referral calculation” and save. Then you can choose “ACM::product_amount” as “Default referral calculation value”.
This custom plugin uses the product value as amount (in product you see % but this plugin uses this value as amount).
Got it.
Thank you. 🙂
Followed your directions and although it is calculating the flat payment amount, it is not calculating anything for the percentage products.
Hi,
If you want you can send us dashboard admin access to support at itthinx dot com and we’ll have a look.
cheers
I figured this out so now it is calculating the percentage as well. Unfortunately, it’s adding the percentage of the entire cart so the affiliate is being double paid on the flat rate items. $X for the flat + x%.
Hi,
it’s true !!! Give me a couple of days to change it.
thanks for advice
Hi,
I am very fast 😉
you can download Custom method::Product Amount version 1.1
Hi antonio,
While I appreciate the response, it does me no good since I have no idea where I’m supposed to put that code. I see the link to some API whatever above but I’m no programmer which is why my previous post said: “Unfortunately, I don’t understand ANY of the answer or how to implement them.”
Is it possible for you to give me a specific file to download that I can plug in or tell me what file I need to add this code to? I can copy and past but beyond that, I’m lost.
Thank you.
Hi,
You can download this custom method: Products Amount in github (in right sidebar you have a zip download file).
You must install, select ACM::products_amount in Affiliates->Settings.
With this plugin the commission is calculated:
– If a product has not product_rate, general rate is used as percent %
– If a product has product_rate value, this is used as amount $
For example:
General rate: 0.2 %
ProductA: price $50, with product_rate: 0.75 (used as amount)
ProductB: price $50, without product_rate
If a customer purchase ProductA and ProductB:
Total: $100
Commission generated:
$0.75 (productA) + 0.2*($100) = $20.75
Hey everybody,
This thread is covering the very topic I am trying to figure out. Unfortunately, I don’t understand ANY of the answer or how to implement them.
Here’s what I’m looking for:
On the average products, I want to set a x% commission. However, on some speciality products, I want to set a flat $xx.xx commission. It would also be nice if I could adjust the commissions based on the individual affiliate.
Example:
Affiliate #1 gets 10% of most products but $15.00 on product A, $50.00 on product G, etc…
Affiliate #2 gets 12% of most products but $14.00 on product A, $55.00 on product G, etc…
Hi,
you can use a version of custom method gived to @rachidtobi
For example:
class ACM {
public static function init() {
if ( class_exists( 'Affiliates_Referral' ) ) {
Affiliates_Referral::register_referral_amount_method( array( __CLASS__, 'custom_method' ) );
}
}
/**
* Custom referral amount method implementation.
* @param int $affiliate_id
* @param array $parameters
*/
public static function custom_method( $affiliate_id = null, $parameters = null ) {
$result = '0';
if ( isset( $parameters['post_id'] ) ) {
$result = self::calculate( intval( $parameters['post_id'] ), intval($parameters['base_amount'] ));
}
return $result;
}
public static function calculate( $order_id, $base_amount ) {
$return = '0';
if ( class_exists( 'WC_Order' ) ) {
$order = new WC_Order();
} else {
$order = new woocommerce_order();
}
if ( $order->get_order( $order_id ) ) {
$items = $order->get_items();
$options = get_option( 'affiliates_woocommerce' , array() );
$default_rate = $options['default_rate'];
foreach( $items as $item ) {
$product = $order->get_product_from_item( $item );
if ( $product->exists() ) {
$product_id = $product->id;
$product_rate = get_post_meta( $product_id, '_affiliates_rate', true );
if ( strlen( (string) $product_rate ) == 0 ) {
$return = bcadd( $return, bcmul( $default_rate, $base_amount, 2 ), AFFILIATES_REFERRAL_AMOUNT_DECIMALS );
}
if ( strlen( (string) $product_rate ) > 0 ) {
$return = bcadd( $return, $product_rate, AFFILIATES_REFERRAL_AMOUNT_DECIMALS );
}
}
}
}
return $return;
}
}
add_action( 'init', array( 'ACM', 'init' ) );
I have not tried, but should work.
Hi Kento, something goes wrong now had my first affiliate referal
These are my settings
Default referral calculation > Referral Amount Method
Default referral calculation value > ACM::custom_method (your script)
My chained product is valued (97+47+47) but the last 2 are free as a package deal, so the price is €97,- Affiliate commission aught to be €25,- ass I set in the product Referral rate
But the calculated referral rate in Affiliate > Referrals is €53,-
What do I do wrong. Hope you can help me soon, cause a few affiliates send a bunch of mail out so don’t want angry affiliates.
Thanks in Advance!!
Kind Regards,
Rachid
Hi,
the custom method does not consider whether the product is free or not. It uses a fixed amount (product or default). Maybe that’s the problem. If you want you can send us dashboard admin access to support at itthinx dot com and we’ll take a look. (please indicate this comment).
cheers
This was a very useful discussion. I’m sure this is what I was looking for however, I do not have any of the options that you referred to in you discussion. Did I miss a step??
“First I had to check in the woocommerce integration options beneath: Product rates > Enable product referral rates” <Edit_a_product->Product Data, in tab “Affiliates”” << I don't have that tab when I edit products.
Hi, yes I think what you are missing is that you need to enable the product rates under Affiliates > WooCommerce Integration, only then will you have this additional tab available where you can set the product rate.
Please give me a bit more info, cause I can’t get it to work. And first Big Affiliates are already raving fans, so would like to keep my end to the bargain.
Thanks Antonio!
Hi,
the documentation explains how to create your own method, in your case this can help you:
class ACM {
public static function init() {
if ( class_exists( 'Affiliates_Referral' ) ) {
Affiliates_Referral::register_referral_amount_method( array( __CLASS__, 'custom_method' ) );
}
}
/**
* Custom referral amount method implementation.
* @param int $affiliate_id
* @param array $parameters
*/
public static function custom_method( $affiliate_id = null, $parameters = null ) {
$result = '0';
if ( isset( $parameters['post_id'] ) ) {
$result = self::calculate( intval( $parameters['post_id'] ) );
}
return $result;
}
public static function calculate( $order_id ) {
$return = '0';
if ( class_exists( 'WC_Order' ) ) {
$order = new WC_Order();
} else {
$order = new woocommerce_order();
}
if ( $order->get_order( $order_id ) ) {
$items = $order->get_items();
$options = get_option( 'affiliates_woocommerce' , array() );
$default_rate = $options['default_rate'];
foreach( $items as $item ) {
$product = $order->get_product_from_item( $item );
if ( $product->exists() ) {
$product_id = $product->id;
$product_rate = get_post_meta( $product_id, '_affiliates_rate', true );
if ( strlen( (string) $product_rate ) == 0 ) {
$product_rate = $default_rate;
}
if ( strlen( (string) $product_rate ) > 0 ) {
$return = bcadd( $return, $product_rate, AFFILIATES_REFERRAL_AMOUNT_DECIMALS );
}
}
}
}
return $return;
}
}
add_action( 'init', array( 'ACM', 'init' ) );
In this case, woocommerce product rate commission is used as product amount commission.
cheers
Thanks a lot!
But, almost set and ready to go:
I have to add or replace this code by editing this plugin:
http://www.itthinx.com/wp-content/uploads/2012/06/affiliates-custom-method.zip
or do I need to add this on an other place?
Thanks Antonio!
Cheers
Hi,
you must replace the code editing the plugin.
cheers
Great, just uploaded it.
But still not clear to be sure: where I had to add the refereall % (products > affiliates) now I add the € values???
Cause it still lookes the same and has % in the discription. I have just 5 products with 2 commission values.
I’m sorry but don’t understand the documentation
Hi,
sorry, but Affiliates Products associated products with affiliates one by one.
cheers
Hi Antonio,
Sorry but I don’t understand your answer? If I have to do it one by one it’s not a problem, but I have to know where I can set the product commission for every product. (default commission value per product).
And hopefully also where I can overrule special arrangements with affiliates who do more or have a very long database.
Commission I’ll fix with your other super awesome commission plugin (when I got this one optimal set).
Thanks for your time and earlier reply on my other question.
Cheers!
Hi,
sorry, you can set commissions for every product, in product’s edit page:
Products->Edit_a_product->Product Data, in tab “Affiliates” you can set referral rate.
This value overrides the default value for this product.
cheers
I didn’t have that option, but now I see it. First I had to check in the woocommerce integration options beneath: Product rates > Enable product referral rates.
And now I have that option to use %, but no values.
I guess I need to set [Settings > Referal Amount methode > Affiliate_WC_methode: product rates] also to enable this option?
Thanks
Hi,
yes, you must have this option enabled.
If you need use a value instead of product rate, you can use Affiliates API – Custom method
cheers