Hello,
I’m customizing the Shipping section and I’m including custom map modals which enables the user to select the parcel shops of certain courier companies as the shipping address. So far so good, I can receive the address of the parcel shop and set it as the shipping address with Snipcart.api.cart.update
. It works correctly, if I set the shipping address while a normal shipping method is selected (which has a price). I have however a free shipping discount added, which adds a Free Shipping method (as expected). If I modify the shipping address through the API while Free Shipping is selected, the Continue to payment button stays disabled. (As if its stuck in validation or something.) The shipping address is modified correctly though.
const currentShipping = window.Snipcart.store.getState().cart.shippingAddress
await window.Snipcart.api.cart.update({
shipToBillingAddress: false,
shippingAddress: {
name: currentShipping.name,
company: currentShipping.company,
address1: `FOXPOST: ${apt.name}, ${apt.street}`,
address2: '',
city: apt.city,
country: 'HU',
postalCode: apt.zip,
province: '',
phone: currentShipping.phone,
vatNumber: currentShipping.vatNumber,
errors: currentShipping.errors,
}
})
Do I have to take some extra care in case of free shipping?
Please tell me if I have to provide extra info!
Thanks in advance!