When calling Recalculate() on a basket, the basket's shipment province and postal codes are replaced with the warehouse's province and postal code for some reason. The following is a code snippet from our checkout process.
Code: Select all
Address address = new Address();
address.Company = CompanyName.Text;
address.FullName = ContactName.Text;
address.Address1 = ShipToAddress.Text;
address.Address2 = ShipToAddress2.Text;
address.Phone = Phone.Text;
address.Fax = Fax.Text;
address.City = ShipToCity.Text;
address.Province = ShipToState.SelectedValue;
address.PostalCode = ShipToZip.Text;
address.Email = Email.Text;
Token.Instance.User.Basket.Save();
Token.Instance.User.Basket.Package();
foreach (BasketShipment shipment in Token.Instance.User.Basket.Shipments)
{
shipment.SetAddress(address);
shipment.ShipMessage = ShippingMessage.Text;
shipment.Save();
}
Token.Instance.User.Basket.Recalculate();
This is an urgent matter and any help would be appreciated.
Thanks,
Adam