Vladshes Posted November 12, 2014 Share Posted November 12, 2014 (edited) Hello. I developing some (dutycalculator) module. It works fine with 1.5.* But in actual version (1.6.0.9) I have a big problem with updating some additional fields in "orders" table while using hookActionValidateOrder(). Here is my code: public function hookActionValidateOrder($params) { /** @var Cart $cart */ $cart = $params['cart']; /** @var Order $order */ $order = $params['order']; $order->dc_calculation_id = $cart->dc_calculation_id; $order->update(); } For some reasons list of fields (def['fields'] in ObjectModel) to update are getting from orders cache, and dc_calculation_id is not setting up. I tried to clean orders cache before update - no effect. Also I tried to use another hook postUpdateOrderStatus - no effect. This module (dutycalculator) also have ability to rebuild calculation from backend (after order was created), and all works fine there - all data setting up normal with the same method $order->update(); Please help) Update: I tried to use hook displayOrderConfirmation and it works! But please let me know when this bug wil be fixed as well, because this is not the best way to resolve this issue. Edited November 12, 2014 by Vladshes (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts