Jump to content

How to create new order status while module Installations.


nisargPresta

Recommended Posts

There are two tables involved:

ps_order_state

ps_order_state_lang

 

(ps_ = prefix)

 

On installation, make your SQL statement with INSERT INTO ....   (Google if you're not sure about the syntax)

 

Easiest is to make the state manually in your own shop, with all settings correctly set, and then just copy these values in the INSERT INTO values part

 

Then just execute the sql statement for each table, using this   ($sql is string that holds the SQL query)

 

 Db::getInstance()->executeS($sql);

 

 

On uninstal, you could do a DELETE FROM.... WHERE .... query and again execute it

 

 

Hope this helps,

pascal.

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