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 |
#32
|
|||
|
|||
Ok i'm jack A**.
I did not upload one the files I needed edited for the Mod to work. Anyhow it should work now. Correction Idevaffiliate does have a API key see there demo and see PDF manual See link:> http://demo.idevdirect.com/admin/idev_info.php As for the hook questions? I'm not sure but in the past looking for a solution I found in the Phrase Manager that info needed is inside both Phrase emails etc. See this link: https://vborg.vbsupport.ru/showpost....88&postcount=4 I understand what the hook system does but it may help one of you. |
#33
|
|||
|
|||
Hello All,
Great after fixing own error by not uploading the edit files. I everything is working well. Now only a few things Idev lets you pass :>Additional Order Details (optional pass-thru variables) via the >Alternate Cart Integration. There are three Variables one can add to: With I guess can be added to the Code:
$idevQuery = "idev_saleamt=" . $apiobj->paymentinfo['amount'] . "&ip_address=" . $apiobj->paymentinfo['ipaddress'] . "&idev_ordernum=" . $apiobj->paymentinfo['paymentinfoid']; Code:
"&idev_custom1=" . $apiobj->paymentinfo['extra']; You cannot search this ID number in the back of Vbulletin administrator for transactions logs etc. Also we should look into payment reversals. To take away the commission in case of payment reversal. Still this is fantastic progress. |
#34
|
|||
|
|||
As for the Hooks question?
In the includes/class_paid_subscription.php which is called by both the payment_gateway.php and payments.php. There are two hooks 1. "paidsub_build" which adds the user to a subscription group. If paid this execute credit to Affiliate. 2. "paidsub_delete" which deletes the user a subscription group. If revered this execute minus credit to Affiliate. What do you guys think? This way we would not to hand code mod's on updates. |
#35
|
|||
|
|||
Quote:
As for the hooks - we mentioned in a couple of earlier posts - but we are not sure where to get the data from to process idev calls at present hook locations. There is also still not a hook that can be used to insert IP address into paymentinfo only on first payment and not on recurring payments ... so payments.php would still need to be hand edited. |
#36
|
||||
|
||||
I have installed it without any problem and is working 100%
Thanks |
#37
|
|||
|
|||
Hi everyone, im looking this for since I own Vbulletin. I have Idev for 3 years. Its great, it can be integrated with almost anything and Vbulletin was really missing.
My question is, is this really working? I mean like without bugs or errors, for a commercial site? Im even willing to pay for this mod. Also my current Idev install is already integrated with a shopping cart, i suppose it will no hurt to have it with vbulletin at the same time since all this mods seems to do is pass to idev when a payment is made. Is this correct? |
#38
|
||||
|
||||
Does idevaffiliate need to be installed on the same website for this to work
|
#39
|
|||
|
|||
Nope, from the above curl call you have to specify the website and idevaffiliate directory where you notify of commissions:
http://www.YOURDOMAINNAME.com/YOURID...OLDER/sale.php |
#40
|
|||
|
|||
Has anyone installed this on 3.8?
|
#41
|
|||
|
|||
Yes would be nice to know it works with 3.8.
Anyway I go and try to install it now and will post back here if my forum crashed |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|