Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › Wp Affiliate & Instincts E-commerce
- This topic has 6 replies, 3 voices, and was last updated 15 years ago by
BJDavey.
-
AuthorPosts
-
August 7, 2010 at 7:43 am #1637
sumeet
MemberHi,
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
August 7, 2010 at 8:13 am #23130amin007
ParticipantYeah 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.
August 7, 2010 at 9:48 am #23131sumeet
MemberHi,
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
August 8, 2010 at 3:04 am #23132amin007
ParticipantDidn’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.
October 24, 2010 at 11:01 pm #23133BJDavey
MemberIs there a way to exclude shipping charges using WP eStore?
Thanks!
October 25, 2010 at 4:13 am #23134amin007
ParticipantWP eStore always excludes shipping charge before calculating the commission so you don’t need to do anything.
October 25, 2010 at 4:40 am #23135BJDavey
MemberYeah! Thanks for the quick reply.
-
AuthorPosts
- You must be logged in to reply to this topic.