📢 Use this project, contribute to it or open issues to help evolve it using Store Discussion.
The Shipping Simulator block estimates the shipping fee based on a zip code input.
- Import the
vtex.store-component
app to your theme's dependencies in themanifest.json
;
"dependencies": {
"vtex.store-components": "3.x"
}
- Add the
shipping-simulator
block to any block below store.product. For example:
"store.product": {
"children": [
"flex-layout.row#product",
]
},
"flex-layout.row#product": {
"children": [
"shipping-simulator"
]
},
"shipping-simulator": {
"props": {
"skuID": "342"
}
},
Prop name | Type | Description | Default value |
---|---|---|---|
skuId |
String |
ID of the current product SKU | - |
seller |
String |
ID of the product seller | - |
shouldUpdateOrderForm |
Boolean |
Whether interacting with the simulator should update the shopper's address in their orderForm | true |
In order to apply CSS customizations in this and other blocks, follow the instructions given in the recipe on Using CSS Handles for store customization.
CSS Handles |
---|
shippingContainer |
shippingContainerLoader |
shippingCTA |
shippingInputLoader |
shippingNoMessage |
shippingTable |
shippingTableBody |
shippingTableCell |
shippingTableCellDeliveryEstimate |
shippingTableCellDeliveryName |
shippingTableCellDeliveryPrice |
shippingTableHead |
shippingTableHeadDeliveryEstimate |
shippingTableHeadDeliveryName |
shippingTableHeadDeliveryPrice |
shippingTableLabel |
shippingTableRadioBtn |
shippingTableRow |
shippingZipcodeLabel |
shippingZipcodeLabelLoader |