I have a custom form which on submit creates a new order, loads a product and a custom line item type. I then save the information from the form in the line item. The line item price is updated via a rule which calls a custom PHP function. The problem is when I redirect to checkout/order_id the Order Total is not updated.
I've tried altering the order directly using my order_wrapper and i've also tried using commerce_price_component_add. I tried a rule which called "Save entity" again but nothing seems to be working.
Can somebody give me a point in the right direction on how to get the order total to re-calculate.
Also if anyone has any good examples of creating orders using custom line item types from a custom form that may be helpful