Amazzing Posted October 29, 2014 Share Posted October 29, 2014 (edited) Hi everyone, I want to set a special order status from shipping module. I can actually change the status and it is visible in order history, but for some reason it is immideately updated by default one, so in order status history I see: 1) my_custom_status 2) default_status (current_state) I tried to do change order status with this code: // tried the following hooks: // hookActionValidateOrder // hookActionOrderStatusUpdate // hookActionOrderStatusPostUpdate public function hookActionOrderStatusPostUpdate($params) { ... $requires_status_update = true; $custom_order_status = 15; if ($params['newOrderStatus']->id == $custom_order_status || !$requires_status_update) return; $history = new OrderHistory(); $history->id_order = $params['id_order']; $history->changeIdOrderState($custom_order_status, $params['id_order']); ... } also tried to update order status in a different way, using same hooks as above: $order = new Order($params['id_order']); $order->setCurrentState($custom_order_status); None of these ways worked. everytime my custom order status is overriden by status set in paymentModule. So is there a way to change order status from shipping module, using hooks, without modifying payment module? Edited October 29, 2014 by Amazzing (see edit history) Link to comment Share on other sites More sharing options...
PrestaMake Posted April 3, 2019 Share Posted April 3, 2019 Did anybody solve this issue? v1.7.4 got this problem too 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