Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Form in account_history_info


dentalstrategy

Recommended Posts

Hello,

 

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.,

 

Thanks

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...