docex Posted November 3, 2008 Share Posted November 3, 2008 I've searched through the forums and the wiki, but I can't seem to find an answer to this problem: Obviouslly, when a new order is placed, it is automcatically set to "pending" until you approve it. I want to remove that feature so that all new orders are automcatically set to "active" without me having to go in and manually change it. Yes, yes... I know this can be a security issue but I've weighed both sides of the story and I would definately prefer to have all new orders set as "active" instead of pending. Ive searched the wiki and the forums and have not found a clear way to do this. Any help is appreciated. Thanks 0 Quote Link to comment Share on other sites More sharing options...
chickendippers Posted November 4, 2008 Share Posted November 4, 2008 It can't be done. Either add this as a feature request, or contact WHMCS to pay for a custom development. 0 Quote Link to comment Share on other sites More sharing options...
docex Posted November 4, 2008 Author Share Posted November 4, 2008 Isnt there some sort of cronjob we can setup to do something like this? A cronjob would seem easy enough. Just scan all pending orders every 30min and set them as active. That's one of the biggest features of WHMCS- to automate as much as possible. 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted November 5, 2008 Share Posted November 5, 2008 why would you need to do this? You shouldn't ever have to refer to that value for any customer-side info. 0 Quote Link to comment Share on other sites More sharing options...
docex Posted November 5, 2008 Author Share Posted November 5, 2008 If they've paid, they should be set to active. And if you notice an issue in the future you can always suspend their account. Like I said, the whole point of WHMCS is to automate as much as possible. Its a hassle having to login everyday to simply mark each account as "active" and making them wait until I can login and do that before their account is fully activated. At least have the option somewhere to enable or disable this feature. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 5, 2008 Share Posted November 5, 2008 (edited) Write some code to change the status to active and place it in the appropriate actionhook to run when its paid. Edited November 5, 2008 by sparky 0 Quote Link to comment Share on other sites More sharing options...
docex Posted November 5, 2008 Author Share Posted November 5, 2008 White some code to change the status to active and place it in the appropriate actionhook to run when its paid. OK... no offense but I have no idea what you're talking about. And PS- thanks for the help you've given me over the past few days. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 5, 2008 Share Posted November 5, 2008 [sorry typo in post (write)] When an invoice has been paid any code that is in the InvoicePaid actionhook function is run. You can write some code to set the status of the order to Active. 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted November 5, 2008 Share Posted November 5, 2008 um you dont have to click "Active", it just starts working automatically. when it's set to "Pending" it still works, its just aesthetic. ...isn't it? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 5, 2008 Share Posted November 5, 2008 um you dont have to click "Active", it just starts working automatically. when it's set to "Pending" it still works, its just aesthetic. ...isn't it? Yes thats right. The order is left set as pending so that you can see what new orders has been placed. 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted November 5, 2008 Share Posted November 5, 2008 i think that's a good thing. you never "NEED" to go and set them to "Active". just leave them as pending if you couldn't care less, they still work either way. 0 Quote Link to comment Share on other sites More sharing options...
docex Posted November 5, 2008 Author Share Posted November 5, 2008 (edited) [sorry typo in post (write)]When an invoice has been paid any code that is in the InvoicePaid actionhook function is run. You can write some code to set the status of the order to Active. Yes. but my custom emails are not being sent per product. Only the default email is being sent. I found out that when a order status is changed to "active", the custom welcome email is sent, so I want to disable the default email and automatically set all orders as "active" so that my custom welcome email is sent... if that makes sense. Where can I find the InvoicePaid action hook? Im searching now, but dont see it. Thanks again for your kind help. Edited November 5, 2008 by docex 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 5, 2008 Share Posted November 5, 2008 ActionHooks are in /includes/actionhooks.php What is the product? If its a download then take a look here http://wiki.whmcs.com/Contribution:Auto_Release_Module 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted November 5, 2008 Share Posted November 5, 2008 you can use the WHMCS API to send emails, its got a functions specifically for it. 0 Quote Link to comment Share on other sites More sharing options...
docex Posted November 5, 2008 Author Share Posted November 5, 2008 (edited) you can use the WHMCS API to send emails, its got a functions specifically for it. OK I found api, but I still can't figure out why the default welcome emails aren't being sent. I shouldn't have to read through all this PHP in order to perform a built in function in WHMCS.... Edited November 5, 2008 by docex 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted November 5, 2008 Share Posted November 5, 2008 i thought you said it was because the "Pending" status was not being changed automatically. the WHMCS API is REALLY easy to use, there's example code there. It sounds like you're trying to write frontend code for WHMCS so I assume you have some knowledge of how to use it. 0 Quote Link to comment Share on other sites More sharing options...
docex Posted November 5, 2008 Author Share Posted November 5, 2008 (edited) I would write the API code for it but I dont know where to start, even though I would say I have moderate PHP knowledge. I couldn't find any examples for what I want to do. Customer checks out > status automatically changed to "Active" instead of "Pending" -OR- To solve the problem completely, send the specified welcome email for each product instead of the default "Order Confirmation" email. I have everything setup correctly, none are disabled and it will only send the default email. I noticed that if the status changes to "Active", my specified welcome email is sent instead of the default "Order Confirmation" email. Thats it. *** Again, thank you very much for your kind assistance. *** Edited November 5, 2008 by docex 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 5, 2008 Share Posted November 5, 2008 @docex Can you please answer a few questions What product is it you are having the problem with? In Module Settings, what module are you using? In Module Settings at the bottom, which of the 4 setup options have you chosen? 0 Quote Link to comment Share on other sites More sharing options...
docex Posted November 5, 2008 Author Share Posted November 5, 2008 (edited) @docex Can you please answer a few questions What product is it you are having the problem with? In Module Settings, what module are you using? In Module Settings at the bottom, which of the 4 setup options have you chosen? Here's a screenshot of my product details. Notice the welcome email setting: My emails are setup and ARE NOT DISABLED: All new orders, even when paid (you can see through my test checkout for $0.01, they are set to "Pending" If you look at the "Pending" orders details page, you get this: You'll notice "Send Welcome Email" is checked on that screen. If I click "Accept Order", my custom welcome email is sent. The problem is that I would like my customers status set to "Active" and my custom welcome email sent when the customer checks out rather than the default "Order Confirmation" email. If I can accomplish this, it saves a LOT of time for me and makes things a little more automated. I hope this helps. Thanks again. If you can help me fix this I can send you a few bucks via PayPal. Edited November 5, 2008 by docex 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 5, 2008 Share Posted November 5, 2008 Screenshot of the Server Settings tab (which is now Module Settings) What version of WHMCS are you using? 0 Quote Link to comment Share on other sites More sharing options...
docex Posted November 5, 2008 Author Share Posted November 5, 2008 Screenshot of the Server Settings tab (which is now Module Settings) What version of WHMCS are you using? I think Im still using 3.5.1 because Ive done soooo many customizations to it I hate to lose any of it. Im not actually using WHMCS for hosting. Im using it for an automated client creation/billing solution and using an external script for members only file management, so I don't have any servers setup. 0 Quote Link to comment Share on other sites More sharing options...
docex Posted November 5, 2008 Author Share Posted November 5, 2008 If you would be so kind, I am available on live chat: http://chat.jriv.net/request_email.php?l=jriv4&x=1&deptid=4 target=new 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 5, 2008 Share Posted November 5, 2008 So I take it the Server Settings tab is set to None Install this mod, http://support.whmcs.com/dl.php?type=d&id=35 select the None Server Module and set the second option Automatically create the account as soon as the first payment is received Test it again and let us know how you went 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted November 6, 2008 Share Posted November 6, 2008 So I take it the Server Settings tab is set to None Install this mod, http://support.whmcs.com/dl.php?type=d&id=35 select the None Server Module and set the second option Automatically create the account as soon as the first payment is received Test it again and let us know how you went I'm running this mod and I can confirm that it does NOT do what the OP is requesting. It does propperly activate the account and all that, but it doesn't change it from "Pending" status, and thus doesn't send the email that he's after. Like i said before, the API does exactly what you need, sparky, use it. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 6, 2008 Share Posted November 6, 2008 I'm running this mod and I can confirm that it does NOT do what the OP is requesting. It does propperly activate the account and all that, but it doesn't change it from "Pending" status, and thus doesn't send the email that he's after. Of course it won't, He had more problems than just what he asked. That was just a fix to make his downloads active. The OP also needs to upgrade to the latest version as he is using V3.5.1 (hopefully not the pirated one). To fix what he asked originally I have answered already on my FIRST post which was obviously too hard and was ignored. Go back and READ it for yourself. Like i said before, the API does exactly what you need, sparky, use it. OK Mr Smart Ass lets nut this out. Q: Where and when are you going to call the API when the invoice is paid? A: The Actionhook as I sugested in my first post. Q: Why call the API for a DB UPDATE when it can be done directly where you have to call it from? A: You Don't. Q: Why get the API to send the welcome email? A: You Don't need to, or else the customer will get 2 emails instead of 1. Q: So why should I USE IT in this instance? A: Do I really have to answer that one, or are you able to work it out for yourself. You are however correct about one thing the API can send email!! 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.