nikita324324 Posted March 9, 2023 Share Posted March 9, 2023 Hi everybody. I'm trying to do a partial return with the hookActionProductCancel hook. How can I get a list of returned items? Link to comment Share on other sites More sharing options...
idnovate.com Posted March 10, 2023 Share Posted March 10, 2023 Check the params received in the hook: ['order' => $order, 'id_order_detail' => (int) $orderDetailId, 'cancel_quantity' => $productRefund['quantity'], 'cancel_amount' => $productRefund['amount'], 'action' => CancellationActionType::PARTIAL_REFUND] 1 Link to comment Share on other sites More sharing options...
nikita324324 Posted March 10, 2023 Author Share Posted March 10, 2023 15 minutes ago, idnovate.com said: Check the params received in the hook: ['order' => $order, 'id_order_detail' => (int) $orderDetailId, 'cancel_quantity' => $productRefund['quantity'], 'cancel_amount' => $productRefund['amount'], 'action' => CancellationActionType::PARTIAL_REFUND] if multiple positions are returned, then a separate instance of hookActionProductCancel is called for each position? Is there any way to load the whole object at once Link to comment Share on other sites More sharing options...
idnovate.com Posted March 11, 2023 Share Posted March 11, 2023 Your function receive a parameter public function hookActionProductCancel($params) Then: $params['order'] $params['id_order_detail'] ... 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