Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › Change how commissions are calculated for WP-eCommerce plugin Integration
Tagged: commissions, csv, ecommerce, getshopped, percent
- This topic has 4 replies, 2 voices, and was last updated 13 years, 5 months ago by sparklogix.
-
AuthorPosts
-
April 19, 2011 at 1:28 am #477sparklogixMember
Yet again, my clients have thrown a curve ball at me. They don’t want their percentage-based commissions to be calculated from the total sale. Instead, when they import their CSV files, there is a column for a dollar amount (different for each product) labeled “commission” (basically the difference between retail and wholesale).
So a product for $100 may have a “commission” of $30. If you’re a platinum member, you get 100% of that $30, gold gets 75% of $30 and silver gets 50% of $30.
So I’m wondering if there is someplace in the plugin where I can change where the commission is calculated from? If it helps, they’re using GetShopped Ecommerce.
Thanks, I appreciate it
April 19, 2011 at 10:50 pm #31498amin007ParticipantThis will require you to understand the product structure and how the GetShopped Ecommerce’s code work because you will have to read the value of this column from their product’s database.
There is an integration plugin for WP-eCommerce v3.8 and above.
Open the file from this integration plugin and look inside the following function:
wpsc_transaction_result_cart_item_handler($order_details)
This is where WP-eCommerce plugin sends the order details after a purchase and the integration plugin does some data massaging and awards the commission. You will have to add your code there to read the commission value for the product that was sold and pass the amount to the function that will award the commission.
June 28, 2011 at 5:42 am #31499sparklogixMemberI appreciate your help with this. I haven’t been able to get to this section of the site until now, and I’ve looked in the file and found the function, but to be honest, I don’t know what to do with it.
You say to “add your code here” but I’m not sure exactly what to add. Is this something I need to get from WPEC? Unfortunately, I don’t have much luck on those forums, unlike here, where the developer actually responds
Thanks!
June 28, 2011 at 7:25 am #31500amin007ParticipantI understand but I don’t know the code structure of the WPEC plugin as I did not develop that plugin. All I know is that the WPEC plugin notifies the WP Affiliate plugin after a sale and I award the commission in the affiliate plugin. If you want to have more control then you will need to get this from the WPEC plugin which means getting help from the developer of that plugin.
June 28, 2011 at 2:23 pm #31501sparklogixMemberThat’s what I thought you would say Worth a shot. Thanks for your help.
-
AuthorPosts
- You must be logged in to reply to this topic.