Jump to content

Another order "pending" question...


docex

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

[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 by docex
Link to comment
Share on other sites

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 by docex
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by docex
Link to comment
Share on other sites

@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:

 

t54p5l.gif

 

My emails are setup and ARE NOT DISABLED:

 

a0ywpx.gif

 

All new orders, even when paid (you can see through my test checkout for $0.01, they are set to "Pending"

 

e6aqkz.gif

 

If you look at the "Pending" orders details page, you get this:

 

11rvz8n.gif

 

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 by docex
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!!

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