Results 1 to 6 of 6

Thread: Run some SQL queries after Order

  1. #1
    Join Date
    Aug 2010
    Posts
    13

    Default Run some SQL queries after Order

    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

  2. #2
    Join Date
    Feb 2010
    Location
    United Kingdom
    Posts
    608

    Default

    Quote Originally Posted by Belelros View Post
    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.

  3. #3
    Join Date
    Aug 2010
    Posts
    13

    Default

    Quote Originally Posted by disgruntled View Post
    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?

  4. #4
    Join Date
    Feb 2010
    Location
    United Kingdom
    Posts
    608

    Default

    Quote Originally Posted by Belelros View Post
    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

  5. #5
    Join Date
    Aug 2010
    Posts
    13

    Default

    Thanks again

    Now the question is which file runs order accepts! How could I start finding it?

  6. #6
    Join Date
    Feb 2010
    Location
    United Kingdom
    Posts
    608

    Default

    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

Similar Threads

  1. Migration queries
    By dmc_ss in forum Pre-Sales Questions
    Replies: 3
    Last Post: 01-06-09, 05:04 PM