angelcosta Posted January 14, 2008 Share Posted January 14, 2008 Why there is no longer a checkout script on includes folder? How can i implement actions now? 0 Quote Link to comment Share on other sites More sharing options...
dsaunier Posted January 14, 2008 Share Posted January 14, 2008 I feel there is : from the manual : "The checkout script is designed for developers who need to add their own functionality to the order system. It can be used to do things such as tracking orders via a third party affiliate system and triggering events when certain products are ordered. To actually enable it to be run, you need to enable it in Configuration > General Configuration > Other in the WHMCS Admin Area, otherwise the file is not run. You will find details about the variables that are available to you inside the file itself." which IMHO runs actionhooks.php ? 0 Quote Link to comment Share on other sites More sharing options...
angelcosta Posted January 14, 2008 Author Share Posted January 14, 2008 By actions I meant the code I had on checkoutscript. I know it works on legacy mode. But why was it removed from default whmcs version? 0 Quote Link to comment Share on other sites More sharing options...
BizGlobalSolutions Posted February 28, 2008 Share Posted February 28, 2008 Hi all I did put a post else where I need help to where I put the code for jrox Following the instructions it says to open includes/checkout.php and there is none so where do I put the code to intergrate jrox please can some one help 0 Quote Link to comment Share on other sites More sharing options...
mylove4life Posted February 29, 2008 Share Posted February 29, 2008 any luck on finding the script 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted February 29, 2008 WHMCS CEO Share Posted February 29, 2008 The checkout script was superseeded by action hooks. Although the checkout script still can be used with the legacy order form if required. matt 0 Quote Link to comment Share on other sites More sharing options...
BizGlobalSolutions Posted February 29, 2008 Share Posted February 29, 2008 So how do I put the following instructions to action hooks in what format please To integrate JAM with WHMCS, follow these instructions: 1. Open up your whmcs/includes/checkoutscript.php file for editing. 2. Near the bottom of the file, add the following lines: // You got mail! mail($emailto, $subject, $message, $headers); $result=mysql_query("SELECT * FROM tblorders WHERE ordernum = '$ordernumber' LIMIT 1"); $row = mysql_fetch_array($result); $amount = $row['amount']; $JAMIntegrate = file_get_contents("http://www.domain.com/affiliates/sale.php?amount=".$amount."&trans_id=".$ordernumber."&custom_mid=".$_COOKIE['jrox'].""); ?> 3. Make sure to point http://www.domain.com/affiliates to your JAM installation URL 0 Quote Link to comment Share on other sites More sharing options...
jack10k Posted March 1, 2008 Share Posted March 1, 2008 Anyone figured this out? 0 Quote Link to comment Share on other sites More sharing options...
mylove4life Posted March 1, 2008 Share Posted March 1, 2008 I talked to them and they said to add this in the actionhook.. This is not 100% tested, but he siad it should be ok.. try this inside the actionhooks.php file: function actionhook_InvoicePaid($vars) { # This function runs when an invoice is fully paid and therefore the services renewed # $vars["InvoiceID"] $query = mysql_query("SELECT amount FROM tblorders WHERE id='{$vars["OrderID"]}' "); $amount = mysql_result($query,0); $JAMIntegrate = file_get_contents("http://www.DOMAIN.COM/affiliates/sale.php?amount=".$amount."&trans_id=".$vars["OrderID"]."&custom_mid=".$_COOKIE['jrox']); } 0 Quote Link to comment Share on other sites More sharing options...
BizGlobalSolutions Posted March 27, 2008 Share Posted March 27, 2008 HI all, thank you for that and I have entered that, Now what I want to understand is how does the affiliate get the commission do they need same user name do I need to alter any thing else or is it just pick up the cookies. so when the client pays the invoice will it pick up the cookie of that affiliate and set the commissions of in jrox and then every time that an invoice gets made it is does the commissions what about when they purchase just a one time product and not the affiliate associated I also have where they can purchase shares how does jrox know the difference I will set the commisions to recurring in jrox with intergrated here just want to make sure that it sets the commissions to the hosting and not any other product I gather that when they are a client in the jrox it will do what is set I hope some one can shed some more light on this as I would liek it done proper Andy Biz Global Solutions 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.