neobug103 Posted January 8, 2008 Share Posted January 8, 2008 Modified code found on this forum: $idev_query = mysql_query("select amount from tblorders WHERE id='$orderid'"); $idev_query = mysql_fetch_array($idev_query); $idev_saleamt = $idev_query['amount']; $site_url = "https://domain.com/affiliates/sale.php?idev_saleamt=$idev_saleamt&idev_ordernum=$orderid"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $site_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 100); $result = curl_exec($ch); curl_close($ch); Does not display any errors in the checkout process, however it does not relay anything to idevaffiliate and therefore there is no commission created Code created by idevaffiliate system: $idev_query = mysql_query("select amount from tblorders WHERE id='$orderid'"); $idev_query = mysql_fetch_array($idev_query); $idev_saleamt = $idev_query[amount]; print "<img border=\"0\" src=\"https://domain.com/affiliates/sale.php?idev_saleamt=$idev_saleamt&idev_ordernum=$orderid\" width=\"1\" height=\"1\">"; This code works and passes the variable to idevaffiliate and the commission is created however it loads a blank screen. I am using the legacy order form on the newest version of WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted January 9, 2008 Share Posted January 9, 2008 the first method is the correct one and works perfectly the 2nd method will screw up your order process as it will be outputting something which is not to be expected is you serach the forums there are other threads on idev - we've had WHMCS and IDEV working for months using the curl method - check you do have curl installed 0 Quote Link to comment Share on other sites More sharing options...
neobug103 Posted January 9, 2008 Author Share Posted January 9, 2008 idev gave me an updated version of that modified code and it worked for a little bit but now it still does not work and basically whmcs and idev say they can't fix the problem because they don't know what the problem is The order goes through fine, no blank pages or error but idev never generated the commission 0 Quote Link to comment Share on other sites More sharing options...
Rebel Posted January 16, 2008 Share Posted January 16, 2008 is this still the problem or has it been corrected? we are installing and setting up idev this weekend with the launch of the new website? 0 Quote Link to comment Share on other sites More sharing options...
neobug103 Posted January 16, 2008 Author Share Posted January 16, 2008 Yep, fixed it. Problem was that the url in the code was 'https://' and I removed the s and it worked without a problem. 0 Quote Link to comment Share on other sites More sharing options...
rodeoXtreme Posted January 17, 2008 Share Posted January 17, 2008 Weird! I just checked our checkout script and we are using the one from iDev; just ran a test and had 5 orders today from affiliates; all went through correctly. We have iDev setup to hold the new orders in a pending state until one of our Admin's verify the information for fraud. We also keep it as pending for 30 days in case the order is canceled. here is the script that we have loaded: <?php $idev_query = mysql_query("select amount from tblorders WHERE id='$orderid'"); $idev_query = mysql_fetch_array($idev_query); $idev_saleamt = $idev_query[amount]; print "<img border=\"0\" src=\"http://www.ourdomainname.com/idevaffiliate/sale.php?idev_saleamt=$idev_saleamt&idev_ordernum=$orderid\" width=\"1\" height=\"1\">"; ?> 0 Quote Link to comment Share on other sites More sharing options...
gain4you Posted February 4, 2008 Share Posted February 4, 2008 I cannot find the file /includes/checkoutscript.php in WHMCS installation folder. Should I just create that file in the includes folder and add to it the codes suggested by IdevAffiliate? 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted February 5, 2008 Share Posted February 5, 2008 add to it the codes suggested by IdevAffiliate? No, add to it the correct code which is found on this forum 0 Quote Link to comment Share on other sites More sharing options...
Emerson Posted September 27, 2008 Share Posted September 27, 2008 No, add to it the correct code which is found on this forum So should I just add the code below to actionhooks.php? I was using the code at http://www.idevdirect.com/whmcs.php but it stopped working after upgrading to 3.7.1 $idev_query = mysql_query("select amount from tblorders WHERE id='$orderid'"); $idev_query = mysql_fetch_array($idev_query); $idev_saleamt = $idev_query['amount']; $site_url = "https://domain.com/affiliates/sale.php?idev_saleamt=$idev_saleamt&idev_ordernum= $orderid"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $site_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 100); $result = curl_exec($ch); curl_close($ch); Thanks 0 Quote Link to comment Share on other sites More sharing options...
neobug103 Posted September 29, 2008 Author Share Posted September 29, 2008 I have the same problem, after I upgraded I realized idevaffiliate isn't working anymore. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted September 30, 2008 Share Posted September 30, 2008 the latest version of WHMCS doesnt use the checkoutscript - add the code to the handles system. 0 Quote Link to comment Share on other sites More sharing options...
R-n-R Posted October 3, 2008 Share Posted October 3, 2008 Has anyone gotten this working with 3.7.1 yet? And if so, would care to provide a detail how-to for use non coders? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
Emerson Posted October 3, 2008 Share Posted October 3, 2008 The instructions at http://www.idevdirect.com/whmcs.php do work. You just need to make sure you edit the correct template according to the "Default Order Form Template" you have selected at "General Settings > Ordering". 0 Quote Link to comment Share on other sites More sharing options...
Bitrain Posted October 6, 2008 Share Posted October 6, 2008 Hello, I have same problem. Strange, but this method http://www.idevdirect.com/whmcs.php not work for me with idev 5.1 and whmcs 3.7.1 and editing correct templates. Emerson, which method you use in "Auto Redirect on Checkout"? 0 Quote Link to comment Share on other sites More sharing options...
Emerson Posted October 15, 2008 Share Posted October 15, 2008 Hello,I have same problem. Strange, but this method http://www.idevdirect.com/whmcs.php not work for me with idev 5.1 and whmcs 3.7.1 and editing correct templates. Emerson, which method you use in "Auto Redirect on Checkout"? David I have "Select to automatically redirect the user to the invoice" 0 Quote Link to comment Share on other sites More sharing options...
Hayk Posted October 30, 2008 Share Posted October 30, 2008 Hello. I have the same problem. Both WHMCS and iDevAffiliates support points at the link http://www.idevdirect.com/whmcs.php, but after doing all described here, making a test purchase (I am not paying for order, I just accept it from admin panel), no any commission shown in idevs admin and user panels. What must I do? Maybe the thing that I don't pay for order causes this problem? Thanks:) 0 Quote Link to comment Share on other sites More sharing options...
Ninthcom Posted November 13, 2008 Share Posted November 13, 2008 Hello, Does the code in in this forum go in the actionhooks.php file in WHMCS / includes folder? We tweaked the templates file as iDev stated but no data has transferred to the our test client... 0 Quote Link to comment Share on other sites More sharing options...
Chad Posted November 18, 2008 Share Posted November 18, 2008 Same problem here. This method does not work. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.