Home is for the experience. Projects are for the ones who are interested!

How To Get Order Status ID In Prestashop

How To Get Order Status ID In Prestashop

In this tutorial I will show you how to get order status id for a certain module, I mean let's say you have installed as payment method the bank wire, when the client will pay using bank wire you will have to add an id to the order status. We are talking here about programatically orders where you need to add all details to the order object in order to insert properly the order in the database. So, default payment modules will insert in the database its ids for order status, therefore you will have to go in phpmyadmin and look for configuration table, once found search for the certain column where the status should be. Normally search for word 'payment' and the column should look like something like this: PS_OS_BANKWIRE

Now, in backend to get the id you only need to use the following function to get it working:

$order_status = Configuration::get('PS_OS_BANKWIRE')

Now as you have the order id you can add it to the order object and it should appear in the dashboard with the right status.

Leave a Reply

Your email address will not be published. Required fields are marked *