Jump to content

what happened to checkout script?


angelcosta

Recommended Posts

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 ?

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

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']);

 

}

Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated