Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

EstimateShipping container

The EstimateShipping container renders a form that allows shoppers to estimate shipping costs based on their specified location. The form includes fields for the shopper to enter their country, state, and postal code.

EstimateShipping container

EstimateShipping container

Configurations

The EstimateShipping container provides the following configuration options:

Option Type Req? Description
countryFieldVNodeNo The input field for the country.
destinationTextstringNo The text describing the destination.
estimateButtonVNodeNo The button to trigger the shipping estimate calculation.
estimatedbooleanNo Indicates whether the shipping is estimated.
loadingbooleanYes Indicates whether the container is loading.
onEstimatefunctionNo Callback function to handle the shipping estimate calculation.
priceVNodeYes The price object for shipping.
priceExcludingTaxVNodeNo The element displaying the price excluding tax.
priceIncludingTaxVNodeNo The element displaying the price including tax.
stateFieldVNodeNo The input field for the state.
taxExcludedbooleanNo Indicates whether the tax is excluded from the price.
taxIncludedbooleanNo Indicates whether the tax is included in the price.
zipFieldVNodeNo The input field for the zip code.

Example configuration

The following example demonstrates how to render the EstimateShipping container:

EstimateShipping: (ctx) => {
const estimateShippingForm = document.createElement('div');
provider.render(EstimateShipping, {
showDefaultEstimatedShippingCost: true,
})('#estimate-shipping');