Hello
Thank You, it works now
However there is a bug where if user create a new address, it kinda reset the shipping choices and set the shipping price 0
It shows that my calculation works fine here is my code
//rate = method
//usable_rates = usable_method
$rate->shipping_price = $real_cost;
$usable_rates[$rate->shipping_id]=$rate;
This bug only occured if there is only 1 option available, [if there is 2 option out of 4 available, it will choose the 1st one]
edit : looks like it still used any shipping method the user choose before creating a new address and because the new address doesnt have that option available, it shows free shipping as the result is 0 (???)
If i pick another address and pick the one i just created, it will fix and show the real shipping price
Any suggestion what should i do? Thank You
Edit 2 :
I also noticed that the shipping will reset to 0 when i click the checkout button from cart
After changing address, the shipping price will be fixed
any suggestion what should i do? Why its resetting to 0?
Thanks
edit 3 : is there is a system that somehow store shipping methods? i noticed that the selected shipping methods are saved , even when i clicked the checkout button it will keep the previous settings? is it possible to force it to refresh shipping method everytime they open checkout?
thanks