Steve05 Posted November 7, 2019 Share Posted November 7, 2019 Hi , I`m new to prestashop here. May i know how do i add new order status to using php coding. im currently trying to develop a plugin. the order status mean "Pending" , "complete". in the history. im using prestashop 1.6.1.24 Link to comment Share on other sites More sharing options...
tdsoft Posted November 7, 2019 Share Posted November 7, 2019 You can directly insert into 2 tables in database ps1_order_state ps1_order_state_lang Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted November 7, 2019 Share Posted November 7, 2019 Hi.. This is code create new status $orderStateObj = new OrderState(); $orderStateObj->send_email = 0; $orderStateObj->module_name = $this->name; $orderStateObj->invoice = 0; $orderStateObj->color = '#4169E1'; $orderStateObj->logable = 0; $orderStateObj->shipped = 0; $orderStateObj->unremovable = 1; $orderStateObj->delivery = 0; $orderStateObj->hidden = 0; $orderStateObj->paid = 0; $orderStateObj->pdf_delivery = 0; $orderStateObj->pdf_invoice = 0; $orderStateObj->deleted = 0; foreach ($this->languages as $language) { $orderStateObj->name[$language['id_lang']] = 'Your order status'; } $orderStateObj->add(); 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