- This topic has 6 replies, 3 voices, and was last updated 14 years, 1 month ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › Wp Affiliate & Instincts E-commerce
Hi,
I have bought the Wp affiliate plugin and was integrating it to use with Instincts plugin.
One thing i noticed during testing is that the commission computed is on total amount including shipping.
So if the cost is 1 + 3 ( shipping ) , then commision given is 20% on total amount 4 which otherwise should be only on the product cost ( 1 in this case ).
Is there any setting for this or anyway to exclude the shipping cost & calculate commission on actual Products cost ?
Kindly reply at the earliest.
-Sumeet
Yeah you can exclude the shipping easily. Remember in step 2 of the integration you added the following bit of code to the “transaction_result_functions.php” file?
if(true === $echo_to_screen)
{
do_action('wp_affiliate_process_commission', array("sale_amt" =>$total, "txn_id"=>$purchase_log['id'], "buyer_email"=>$email));
}
If you pay attention to the “sale_amt” value you can see that it’s passing the total amount as the sale value. Whatever you pass in here will be used to calculate the commission so you can replace the above code with the following which subtracts the shipping from the total:
if(true === $echo_to_screen)
{
$sale_amt = $total - $total_shipping;
do_action('wp_affiliate_process_commission', array("sale_amt" =>$sale_amt, "txn_id"=>$purchase_log['id'], "buyer_email"=>$email));
}
Let me know how you go wit this.
Hi,
But i am using the 1st options to integrate.
Which is Checking the box to enable the Third party integration.
For this too, i have to add the above code?
Let me know pls.
-Sumeet
Didn’t realize you were using option 1
For option 1 I should be able to add the code to the plugin itself so no need to modify any code on your part. I have sent you an updated version of the plugin with this modification to test it out.
Is there a way to exclude shipping charges using WP eStore?
Thanks!
WP eStore always excludes shipping charge before calculating the commission so you don’t need to do anything.
Yeah! Thanks for the quick reply.