Jump to content
Sign in to follow this  

Form in account_history_info

Recommended Posts



I'm creating a form in "account_history_info" to allow the customers to inform a payment via wire transfer. Something very simple, just the date, wire transfer number and notes. I already create the form, and it successfully send out the email with those information.


Now I would like to change (by submitting this form) the order status to "processing" and refreshing the page (by Ajax but not necessarily) to inform the new status and disable the form.


To update the status I'm using this:


 tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . 2 . "', last_modified = now() where orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "'"); 
tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$HTTP_GET_VARS['order_id'] . "', '" . 2 . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments)  . "')"); 


But I'm a little noob with php and don't really know who to trigger this code together with the submit button, and what will be the command to refresh the account_history_info page to show the new status?


I didn't found any contribution for that and any help would be nice.,



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this