tj Posted February 19, 2007 Share Posted February 19, 2007 Anyone want to share how they are using the on checkout script? I'm about to get my hands dirty and hope my php skills are up to it! Anyone got something like, if $product = x sendmail ? Thanks 0 Quote Link to comment Share on other sites More sharing options...
DataHosts Posted February 19, 2007 Share Posted February 19, 2007 enclose the php script as follows: {php}your code{/php} 0 Quote Link to comment Share on other sites More sharing options...
tj Posted February 19, 2007 Author Share Posted February 19, 2007 gotta write it first 0 Quote Link to comment Share on other sites More sharing options...
DataHosts Posted February 19, 2007 Share Posted February 19, 2007 gotta write it first lol..yes...that would help out. 0 Quote Link to comment Share on other sites More sharing options...
tj Posted February 19, 2007 Author Share Posted February 19, 2007 Which is why I was asking if someone has written a script similar to the one I was asking for? 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted February 19, 2007 Share Posted February 19, 2007 Hey, For the checkout script, I don't think you use {php} as its not in the smarty system, but as its a PHP file. So you should use <?php or if you are lazy <? From, Adam 0 Quote Link to comment Share on other sites More sharing options...
tj Posted February 19, 2007 Author Share Posted February 19, 2007 Ok people thank you for all the info, much appreciated. Yes I am lazy and no im not a complete n00b in regards to how PHP works. What I'm asking, requesting is: Does anyone here have a script ready to go that e-mails a specific e-mail address if product x is ordered that I can just dump in the checkout.php file, before I go and write one up. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted February 19, 2007 Share Posted February 19, 2007 Ok people thank you for all the info, much appreciated. Yes I am lazy and no im not a complete n00b in regards to how PHP works. What I'm asking, requesting is: Does anyone here have a script ready to go that e-mails a specific e-mail address if product x is ordered that I can just dump in the checkout.php file, before I go and write one up. Thank you. Hey, In the check out script you can use the different variables to do a search in the database and pull information out from different tables. I might make a post on how to do this, of even give out my checkoutscript.php From, Adam 0 Quote Link to comment Share on other sites More sharing options...
tj Posted February 19, 2007 Author Share Posted February 19, 2007 Would be greatfull if you did! Run Script on Checkout - ticking this box means the script in the file "includes/checkoutscript.php" will be run when an order is placed. This can be used for running your own script to perform an action when an order is placed. You can use the variables $hostingid and $domainid in this file to retrieve data from the database about the order. Thats all the info I can find on the subject... Does that mean i can write something like, if $hostingid = shell sendmail? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted February 19, 2007 WHMCS CEO Share Posted February 19, 2007 If you look inside the file you'll see it says the following: ************************************************** ************** WHMCS CheckOut Script ************* ************************************************** You may enter code here which will be run when a user checks out if you have enabled it in Configuration > General Configuration > Other of your WHMCS Admin Area. The following variables are available to you: ************************************************** Order ID: $orderid Order Number: $ordernumber Invoice ID: $invoiceid Product ID: $productid Domain ID: $domainid Addons Array: $addons ************************************************** Therefore, you can run a query using the $orderid or $productid to see what was ordered and do something for certain products. The most common use of the checkout script is for integrating things like third party affiliate scripts or sales tracking software but you could do something like you suggest if you wanted. Matt 0 Quote Link to comment Share on other sites More sharing options...
tj Posted February 20, 2007 Author Share Posted February 20, 2007 Thank you Mattt. 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted February 24, 2007 Share Posted February 24, 2007 Hey, You can check out this post I made, http://forums.whmcs.com/viewtopic.php?t=3150 From, Adam 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.