Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBulletin and iDevAffiliate Integration Details »»
vBulletin and iDevAffiliate Integration
Version: 1.00, by vb_mp vb_mp is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.7.2 Rating:
Released: 09-13-2008 Last Update: Never Installs: 17
Uses Plugins
Re-useable Code Code Changes Translations Is in Beta Stage  
No support by the author.

NOTE: I have it installed on 3.7x, I haven't tried earlier versions.

Description: I have been searching around for a plugin to allow vBulletin and iDevIntegration (for affiliate management of vbulletin paid subscriptions) and could not find any.

I contacted iDevAffiliate and their response was that they did not know enough
about vbulletin to create a plugin themselves but they explain what I had to do
on the iDevAffiliate side to make things work.

Thanks to vbulletin.org members Marco van Herwaarden, Dismounted, Delphiprogrammi, Opserty for pointing me in the right direction as this is my first vbulletin plugin.

This mod integrates iDevAffiliate commission tracking.

NOTE: Keep in mind, I assume that you are fairly well versed and comfortable with editing files/templates and following the flow of things.

Installing:

*********************************
STEP 1
*********************************
In payments.php in your forum root find the following code lines:

Code:
    /* insert query */
    $db->query_write("
        INSERT INTO " . TABLE_PREFIX . "paymentinfo
            (hash, completed, subscriptionid, subscriptionsubid, userid)
        VALUES
            ('" . $db->escape_string($hash) . "', 0, $subscriptionid, $subscriptionsubid, " . $vbulletin->userinfo['userid'] . ")
    ");
Replace them with the following:

Code:
    /* insert query */
    $insertQuery = "INSERT INTO " . TABLE_PREFIX . "paymentinfo
            (hash, completed, subscriptionid, subscriptionsubid, userid";
    $insertQuery .= $vbulletin->options['idevaffiliate_active'] ? ", ipaddress)" : ")";
    $insertQuery .= "VALUES
            ('" . $db->escape_string($hash) . "', 0, $subscriptionid, $subscriptionsubid, " . $vbulletin->userinfo['userid'];
    $insertQuery .= $vbulletin->options['idevaffiliate_active'] ? ", '" . IPADDRESS . "')" : ")";
    $db->query_write($insertQuery);
*********************************
STEP 2
*********************************
In payment_gateway.php file in your forum root find the following code lines:

Code:
    
if ($apiobj->type == 1)
{
    $subobj->build_user_subscription($apiobj->paymentinfo['subscriptionid'], $apiobj->paymentinfo['subscriptionsubid'], $apiobj->paymentinfo['userid']);
Add the following code under the above code ( make sure you replace YOURDOMAINNAME with your domain name and YOURIDEVINSTALLATIONFOLDER with your idev installation folder:

Code:
if ($vbulletin->options['idevaffiliate_active'] AND function_exists('curl_init') AND $ch = curl_init())
{
    $idevQuery = "idev_saleamt=" . $apiobj->paymentinfo['amount'] . "&ip_address=" . $apiobj->paymentinfo['ipaddress'] . "&idev_ordernum=" . $apiobj->paymentinfo['paymentinfoid'];
    curl_setopt($ch, CURLOPT_URL, "http://www.YOURDOMAINNAME.com/YOURIDEVINSTALATIONFOLDER/sale.php");
    curl_setopt($ch, CURLOPT_TIMEOUT, 15);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDSIZE, 0);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $idevQuery);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_USERAGENT, 'vBulletin via cURL/PHP');

    $result = curl_exec($ch);
    curl_close($ch);
}
*********************************
STEP 3
*********************************
Install the idevaffiliate_integration Product via the Plugin Manager

*********************************
STEP 4
*********************************
Go to AdminCP -> vBulletin Options -> iDevAffiliate Integration Settings and enable use of iDevAffiliate by selecting 'Yes' and saving.

That's it, you are ready to use iDevAffiliate with vBulletin.

Dont Forget To MARK AS INSTALLED
And Also Don't Forget To Visit DNXpert.com

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 02-14-2009, 09:17 AM
fionix fionix is offline
 
Join Date: Apr 2007
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it works perfectly on V.3.8

Only little probolem is if you want to customize the code to have different comissions, don't know how to do that. Any help?

In the video it says you have to put this code on the line: &idev_commission=XX
Reply With Quote
  #43  
Old 02-18-2009, 01:24 AM
CRP CRP is offline
 
Join Date: Dec 2007
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just tested on V3.8.1 and it worked great. Well, I have to charge tax and it calculated commission on gross, but I can live with that for now.

I had bought Idevaffiliate for another part of my site, and still not able to get it working with software that was supposed to be already integrated with each other. But, this one worked perfect first try. Thanks so much for doing this.

Installed.
Reply With Quote
  #44  
Old 03-05-2010, 03:50 PM
forumguy1 forumguy1 is offline
 
Join Date: Sep 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will this work with vb 4.0?
Reply With Quote
  #45  
Old 03-10-2010, 03:14 AM
benative's Avatar
benative benative is offline
 
Join Date: Oct 2009
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ya seriously!!! does it work with vbulletin 4.0??????
Reply With Quote
  #46  
Old 03-11-2010, 02:54 PM
forumguy1 forumguy1 is offline
 
Join Date: Sep 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can any shed some light on this and let us know if it works with vb 4.0?

I am willing to pay someone as well to port it over if necessary.
Reply With Quote
  #47  
Old 03-14-2010, 04:17 AM
benative's Avatar
benative benative is offline
 
Join Date: Oct 2009
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's

Standard Edition
Gold Edition
Platinum Edition

on http://www.idevdirect.com

what should I purchase to get this working???
Reply With Quote
  #48  
Old 03-15-2010, 01:27 PM
forumguy1 forumguy1 is offline
 
Join Date: Sep 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Either will work fine from those 3. Were just not sure it if works with VB 4.0.
Reply With Quote
  #49  
Old 03-16-2010, 01:26 AM
benative's Avatar
benative benative is offline
 
Join Date: Oct 2009
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please let us know if it works with VB 4.0
Reply With Quote
  #50  
Old 08-31-2010, 05:42 PM
MichaelaS MichaelaS is offline
 
Join Date: Jul 2009
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm running 3.8.3 and I've been using this mod for a year with my forum. The tracking is not working properly for me at all. It's dropping commissions on active (paying) members, double paying occasionally, and all sorts of random issues. Nothing consistent at all so as to troubleshoot and track down where the problem is occurring.

Since I get an Order Number in iDev, with no association to the actual forum user or username, I've had to track every single one back to orders by the date & timestamp - to figure out what kind of issues I was having in the first place. It's a real mess. I had iDev support look into it with me, but have no choice but to close my affiliate program at this point.

Anyone else had these tracking issues (that you know of) - and/or know a solution I can try?

Thank you
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06552 seconds
  • Memory Usage 2,300KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete