The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vBulletin and iDevAffiliate Integration Details »» | |||||||||||||||||||||||||
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'] . ") "); 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']); 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
|
Comments |
#12
|
|||
|
|||
Quote:
Currently, there are no hooks, but I think there is a place around here where I can request hooks for new upgrades so I will do that. |
#13
|
|||
|
|||
fantastic work I can't wait to try this.
Thanks a "vb_mp" |
#14
|
|||
|
|||
No probs . Let me know how you go. It's currently live and counting commissions for my affiliates on my site.
|
#15
|
|||
|
|||
Hey vb_mp have you tested this out with some of your members already getting recorded commissions? If so then you're the best person ever because I've been looking for a paid subscription affiliate system for a very very long time.
|
#16
|
|||
|
|||
Yea I have tested it - it is currently working and functional on my forum ( link is above in the original post ). People are spreading the affiliate link around and commissions are being generated on subscription purchases.
The things to note - according to iDevAffiliate they will be releasing a new release that will enable deletion of commissions on payment reversal... currently when a payment is reversed (for example on a refund) you have to manually cancel the subscription in iDevAffiliate... this is not a vBulletin problem though, rather a iDevAffiliate deficiency. The guys from iDevAffiliate have promised that this payment reversal curl target url will be released in new upgrade, once that's there I will add it to this mod. |
#17
|
|||
|
|||
Quote:
Also if I have people on recurring billing can I have it work with recurring commissions? Thanks a lot!! Jason |
#18
|
|||
|
|||
I like iDevAffiliate, easy to install, works well.
Paypal recurring commissions (I have them on my forum) are treated as individual payments each month - it works quite well. User signs up - iDevAffiliate records payment information, affiliate gets commission. Next month, PayPal triggers IPN on recurring payment, idevaffiliate checks payment info and credits affiliate with another commission - and so on. iDevAffiliate has some internal recurring commissions setup - make sure you ignore that - it's some manual recurring commissions crap. Also, once you install iDevAffiliate, make sure you download this patch that fixes a bug of approving/unapproving commissions: http://www.idevsupport.com/index.php...temid=16&nav=0 Cheers |
#19
|
|||
|
|||
You listed some pros in your credits but I likewise really would prefer not install this until it is plugin based. I would rather add a couple queries on the occasion where I get a purchase then to have to risk that there is an upgrade out and I need to deal with hardcoded file edits.
|
#20
|
|||
|
|||
Quote:
I will however fix it to use hooks as soon as some hooks are made available by vBulletin.com |
#21
|
|||
|
|||
I have installed but have not recorded any sales.
Wait traffic site to send a sale . |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|