latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Integrating iDevAffiliate and S2Member

Home Forums Community Forum Integrating iDevAffiliate and S2Member

This topic contains 4 replies, has 3 voices. Last updated by  Sara Young 3 years, 8 months ago.

Topic Author Topic
Posted: Sunday Apr 7th, 2013 at 8:14 pm #46822
Sara Young
Username: iaa2011

We have been using the idev affiliate integration with S2Member but have run into an issue where we are passing “ra” to iDev to avoid the sales tax issue I mentioned in a previous post (http://www.s2member.com/forums/topic/integrating-idevaffiliate-and-s2member/).

Now the issue we are running into is that when a customer enters a coupon code it is pushing the item total prior to the discount. Where in the s2member hack should we be pulling the true subtotal after the coupon is applied but before any sales tax is applied?

For example, if the item is selling for $100 and the discount applied is $40, then the subtotal is $60. We want the $60 subtotal to be what is passed to iDev to calculate the commission on, not the $100 which is occuring now.

The update info here: http://www.s2member.com/kb/idev-s2-commission-tracking/
doesn’t address this issue.

Thanks,
Sara

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Sunday Apr 7th, 2013 at 8:29 pm #46826
Sara Young
Username: iaa2011

Got the hack from our programmers…

They are using “initialSalePrice” and need to know what the API variable name is for the adjusted price after the coupon is applied.

This is what they are doing (XXX=our domain)

s2-hacks.php

<?php

// OSM : This filter
add_filter ("ws_plugin__s2member_pro_authnet_checkout_post_attr", "my_authnet_pro_checkout_form_attr");
function my_authnet_pro_checkout_form_attr($attr = array()) {

 // set initial price cookie for later use
 $salePrice = $attr["ra"];
 setcookie("initialSalePrice", $salePrice, time()+3600, "/", ".XXX");

return (array) $attr;
}

add_filter ("ws_plugin__s2member_pro_paypal_checkout_post_attr", "my_paypal_pro_checkout_form_attr");
function my_paypal_pro_checkout_form_attr($attr = array()) {

 // set initial price cookie for later use
 $salePrice = $attr["ra"];
 setcookie("initialSalePrice", $salePrice, time()+3600, "/", ".XXX");

return (array) $attr;
}


add_action('ws_plugin__s2member_during_configure_user_registration', 's2_auto_login_after_registration');
function s2_auto_login_after_registration($vars = array()) {
   
 if (!is_admin() && $vars['processed'] === 'yes') {
  wp_new_user_notification($vars['user_id'], $vars['pass']);
  wp_set_auth_cookie($vars['user_id'], false, is_ssl());
  c_ws_plugin__s2member_login_redirects::login_redirect($vars['login']);
 }

}
?>
Posted: Monday Apr 8th, 2013 at 9:05 am #46845

Sara,

I hope you get this fixed as it will make a huge difference in your expenses/commissions you have to pay out.

Question: We are about to implement iDevAffiliate. Are you happy with them? Any hidden gotchas we should be aware of? Or, things you wish you would have known before you launched it?

I’ll be watching this thread and also ask your question of iDevAffiliate today as I have a call into them.

Cordially,

Terry

Posted: Wednesday Apr 10th, 2013 at 5:53 am #47048

Hi Sara.

In your hack, you could use the defined vars array that s2Member passes with the hook, and see what variables you have available there.

Or you could probably use the notifications API, which includes a replacement code for the coupon used. [hilite path]Dashboard -› s2Member® -› API / Notifications -› Payment Notifications[/hilite]

By the way, I see you’re using an old version of the autologin hack, which causes some trouble. Read this article for the latest version: Knowledge Base » Auto-Login Upon Registration

Posted: Sunday Apr 14th, 2013 at 5:27 pm #47458
Sara Young
Username: iaa2011

@Cristián – Thanks for the info. I’ll forward to our developers to see what they can do with what you’ve provided.

@Terry – I like it better than 1ShoppingCart’s built in affiliate program since it more “affiliate friendly” and you can get affiliate training modules. I like the way it displays the banners, etc better. Plus since it is a separate system, if we go away from 1ShoppingCart on our downloads, then we can keep using iDev Affiliate which minimizes the impact on our affiliates going forward. I have developers helping me so easier for me when a problem comes up to get them involved since I have minimal programming skills. A few quirky things about it though include the fact that if you decline an affiliate, it completely removes them from the system so you lose that history of who you have declined unless you set up a separate log in excel or something. We ask our affiliates to fill out a questionnaire and iDev limits you to 5 questions so I had to combine a few which is a little weird. Like any new product, there is sometime invested to understand how it works and then how to configure it to work how you want it to work. It would be great if I could integrate the logins for our customers and affiliates so it is all one log in but I haven’t gotten to that yet. Would be curious to see what you decide to go with.

Viewing 4 replies - 1 through 4 (of 4 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.