Jump to content

Auto Accept Completed Orders


Recommended Posts

I had an older version of WHMCS and had it set up to automatically accept orders like this, so that I did not have to go into pending orders and accept them.  I cannot seem to figure out how I did it now since I upgraded to version 8.  Anyone have any suggestions on how to do this?

 

Inked9ff913d5eca79b0e75c13cef1fa6d800_LI.thumb.jpg.0e149be0104714432cc46ce238fc081e.jpg

Link to comment
Share on other sites

10 hours ago, BigGainz said:

I cannot seem to figure out how I did it now since I upgraded to version 8.

there was a free addon that did that, perhaps you were using it.

10 hours ago, BigGainz said:

Anyone have any suggestions on how to do this?

if wanting an action hook to auto accepting orders once paid...

https://github.com/Katamaze/WHMCS-Free-Scripts/blob/master/hooks/AcceptOrderOnInvociePaid.php

Link to comment
Share on other sites

Thank you!  1 last question, I'm sorry I don't know the official field name but in the image in my OP if it says Pending for Status instead of Active, will the order be left in the Pending Orders list then?  I just want to make sure it wouldn't be pushed out if it isn't complete.

Link to comment
Share on other sites

14 hours ago, BigGainz said:

I'm sorry I don't know the official field name but in the image in my OP if it says Pending for Status instead of Active, will the order be left in the Pending Orders list then?

generally speaking, orders remain pending until approved - so if still Pending in the dropdown, it will remain in the pending list until you manually accept it... if using Kian's hook, it will change the status to Active as soon as its invoice is marked as paid.

Link to comment
Share on other sites

9 minutes ago, brian! said:

generally speaking, orders remain pending until approved - so if still Pending in the dropdown, it will remain in the pending list until you manually accept it... if using Kian's hook, it will change the status to Active as soon as its invoice is marked as paid.

The free addon that you mentioned in your response to my OP, would that leave it as pending?  If so how could I go about finding it again?

Link to comment
Share on other sites

10 minutes ago, brian! said:

auto accept the order, but still leave it marked as Pending ?

Umh... what about this?

localAPI('AcceptOrder', array('orderid' => $orderID), $adminUsername);
localAPI('PendingOrder', array('orderid' => $orderID), $adminUsername);

It should do the trick.

Link to comment
Share on other sites

1 hour ago, brian! said:

the one I was thinking of was Auto Accept - but I don't know if it would work on recent releases.

what do you want to do - auto accept the order, but still leave it marked as Pending ? 😕

So im using WHMCS for something a little different than what others are maybe I believe.  I am using it to automatically credit monthly accounts.  I added examples below to hopefully explain a little better.

This image shows how my pendings orders list looks.  Note that there is no way to tell the good order from the incomplete one on this page:

9f239b7e7c58f4d923676a52a442fa92.thumb.png.5d36847c2caaa6046945bb5c789e5a95.png

 

This image shows a product that the customer chose a username that was already in use and not available, so the status is still Pending and cannot be automatically accepted.

74621e1f410418cf3f859f80af6416df.thumb.png.fe794413029839b3ebc84f089ea153a1.png

 

This image shows a product that everything processed and I would like to automatically accept instead of going in and manually doing it:

6a7b20c14d5673a999eb79221a2a3291.thumb.png.6b00c8e35520583a14386501c25aeb66.png

I want the complete orders to auto accept, but not also wipe out the ones that are not complete.  Payment was received on both, the issue is the module was sucessful on one, failed on the other.

Edited by BigGainz
Link to comment
Share on other sites

52 minutes ago, Kian said:

Umh... what about this?


localAPI('AcceptOrder', array('orderid' => $orderID), $adminUsername);
localAPI('PendingOrder', array('orderid' => $orderID), $adminUsername);

It should do the trick.

Is this a hook or what is this?  Sorry im a total novice with WHMCS yet.  Will this work with the example above?

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