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:

OptionTypeReq?Description
countryFieldVNodeNoThe input field for the country.
destinationTextstringNoThe text describing the destination.
estimateButtonVNodeNoThe button to trigger the shipping estimate calculation.
estimatedbooleanNoIndicates whether the shipping is estimated.
loadingbooleanYesIndicates whether the container is loading.
onEstimatefunctionNoCallback function to handle the shipping estimate calculation.
priceVNodeYesThe price object for shipping.
priceExcludingTaxVNodeNoThe element displaying the price excluding tax.
priceIncludingTaxVNodeNoThe element displaying the price including tax.
stateFieldVNodeNoThe input field for the state.
taxExcludedbooleanNoIndicates whether the tax is excluded from the price.
taxIncludedbooleanNoIndicates whether the tax is included in the price.
zipFieldVNodeNoThe 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');