Stepel Posted April 26, 2022 Share Posted April 26, 2022 (edited) HI , I have a problem with adding and delete order state during install and uninstall module. I have something like this in install method: $order_state = new OrderState(); $order_state->send_email = false; $order_state->color = '#151400'; $order_state->hidden = true; $order_state->delivery = false; $order_state->logable = false; $order_state->invoice = false; $order_state->name = 'MY_CUSTOM_NAME'; if ($order_state->add()) { Configuration::updateValue('MODULE_MY_CUSTOM_NAME', $order_state->id); } and this in uninstall: $order_state = new OrderState(Configuration::get('MODULE_MY_CUSTOM_NAME')); if ($order_state->existsInDatabase(Configuration::get('MODULE_MY_CUSTOM_NAME'), 'order_state')) { $order_state->delete(); } but i got error 500 during installation if I don't comment this;) Any help ? suggestion ? Edited April 26, 2022 by Stepel (see edit history) Link to comment Share on other sites More sharing options...
knacky Posted April 27, 2022 Share Posted April 27, 2022 Link to comment Share on other sites More sharing options...
joseantgv Posted April 27, 2022 Share Posted April 27, 2022 Enable DEBUG mode to know the error. 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