Update/Set shipping details of an cart

New Member
4 0 0

I want to create a map that opens in the frontend and let the customer choose location after he choose the shipping location i want to update his cart/checkout to show this location.

my question are:

1. how can i use ajax to set custom data into a cart and will be saved.

2. how do i set the shipping details , like address ,city etc.. before the customer arrives to the checkout page