Jump to content

Run some SQL queries after Order


Belelros

Recommended Posts

Hi there,

 

I have a question that would like to solve... How can I do to run some SQL queries after accept an order using some of the order's data?

 

I hope you got the idea!

 

Regards

 

 

If you want to run queries after the order process you can create your own confirmation page you will need the new page code from the whmcs integration documentation Find This here

 

Lets say its ordercheckout.php

and the tpl file you will create will be ordercheckout.tpl inside of your templates folder.

 

Inside your ordercheckout.php you will run all of the normal post checkout processes and after these have run successfully you will then run any "extra" queries you desire.

Link to comment
Share on other sites

If you want to run queries after the order process you can create your own confirmation page you will need the new page code from the whmcs integration documentation Find This here

 

Lets say its ordercheckout.php

and the tpl file you will create will be ordercheckout.tpl inside of your templates folder.

 

Inside your ordercheckout.php you will run all of the normal post checkout processes and after these have run successfully you will then run any "extra" queries you desire.

 

Thanks for that!

 

So, should I edit these pages or create a new ones using them as model... if so, how can I make them work instead of these?

Link to comment
Share on other sites

Thanks for that!

 

So, should I edit these pages or create a new ones using them as model... if so, how can I make them work instead of these?

 

 

with regards your situation specificaly you will need to figure out which file exactly runs your order accept and work on building a new one of those. Remember though that you are starting to delve into the core admin tools of the whmcs program and the file is essentially the gateway to your cpanel server so security within your coding is 100% a must

Link to comment
Share on other sites

thats easy mate lol, i just viewed the source of my installation for an order page in google chrome you can inspect an element (in this case the accept order button on the order page)

 

the file you need to work on building new is.

 

/adminfolder/order.php (where adminfolder is your admin location just admin if you have not renamed it

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