Jump to content

SQL query to update Order Status


nickfromtq

Recommended Posts

Hi, 

 

Would anyone know the SQL query I could use to change the order status of an order to shipped. 

 

Also if anyone has got the SQL query where I can add / send a message to a customer that would be great.

 

Any help or guidance would be very much appreciated.

 

Many thanks

Nick 

 

Link to comment
Share on other sites

Why do you want to use SQL queries. I suggest to use class methods. It is safer and applicable over multiple PrestaShop versions.

For example, see

$order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id);

and subsequent code in /classes/PaymentModule.php

Link to comment
Share on other sites

Hi, 

 

I'm getting a parser written so when we receive the pipe delimited file back from the fulfillment center, I can import the file and it will update the status to shipped and send a message to the customer with the tracking information.

 

hence why I need the sql statement for to change the order status to shipped and an sql statement to add a message to the customer so that we can send them the tracking information. 

 

Nick 

Link to comment
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
×
×
  • Create New...