nickfromtq Posted April 9, 2015 Share Posted April 9, 2015 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 More sharing options...
tuk66 Posted April 10, 2015 Share Posted April 10, 2015 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 More sharing options...
sandipchandela Posted April 10, 2015 Share Posted April 10, 2015 Insert value in this table.- ps_order_history You can get id_order from ps_orders table and get id_state ( which you want to set ) from ps_order_state Link to comment Share on other sites More sharing options...
nickfromtq Posted April 10, 2015 Author Share Posted April 10, 2015 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now