Same problem, We work with Prestashop version 1.7.6.7 and with some customers the sales field does not match with the user orders. We use an own payment module.
We use hookActionValidateOrder hook to change the order reference, but when we changed the reference the total_paid_real field changes to double the total_paid field. Here is my code:
Do you know what is the problem?
// Modify reference if prefix was provided if ($prefix_order_reference != "") { $new_reference = $prefix_order_reference.str_pad(strval($order_id), 4, "0", STR_PAD_LEFT); } else { $new_reference = $params['order']->reference; } // Add reference if information was provided if ($ws_order_reference != "") { $new_reference = $new_reference."/".$ws_order_reference; } // Assign new reference $params['order']->reference = $new_reference;
Thanks