Shipping Calculator
(BU)Shipping Calculator lets shoppers enter a delivery destination and calculate WooCommerce shipping for the current cart. It can display the destination, an address form, and selectable shipping rates. Use it in a custom Cart layout or a mini-cart to help shoppers estimate delivery before checkout.
- Configure WooCommerce and add the element
- Form, rate, and styling controls
- How calculation and updates work
- Use cases and limitations
- Testing and troubleshooting
Configure WooCommerce First
- In WooCommerce → Settings → General, confirm the countries you ship to. The calculator's country picker uses WooCommerce's allowed shipping countries.
- Under WooCommerce → Settings → Shipping → Shipping zones, create your zones and add enabled shipping methods. Put specific state or postcode zones above broader country zones because WooCommerce uses the first matching zone.
- Configure the method costs and any conditions, such as a minimum for Free shipping. For carrier rates, enable and configure the relevant shipping extension. The calculator displays what WooCommerce returns; it does not have its own pricing rules.
- Add a physical product to the cart. If a method depends on a shipping class, weight, or dimensions, make sure those product values are set. An empty or virtual-only cart does not provide the same shipping context.
For a detailed zone and minimum-spend walkthrough, see Free Shipping Notice. Free shipping must be available from WooCommerce before the calculator can show it.
Add the Calculator in Bricks
- Enable Shipping Calculator under Bricks → BricksUltimate → Woo Elements and save. Reopen the Bricks editor.
- Add (BU)Shipping Calculator to a cart summary or a mini-cart layout. It is not a loop element: add one calculator, outside repeated product rows.
- Keep it outside any existing
form. The element renders its own shipping form. Do not nest it in the cart-items form, the product Add to Cart form, or the checkout form. In a mini-cart, place it in a suitable section outside any child purchase forms. - Enter a form title and button label. Keep country, state, city, and postcode enabled for the first test. Under Shipping Methods, enable Enable shipping option if shoppers should see and select rates here.
- Save and test the actual page with a cart. The editor's session and preview may not have the same destination or shipping packages as a shopper.
Configure the Display
- Disable shipping to text: Hides the destination summary, such as Shipping to London. This does not change the destination itself.
- Disable shipping form: Removes the address entry form. Use this for a display-only rate section when another part of the store already collects the address. Shoppers cannot recalculate through this element while its form is disabled.
- Form title: Enter a heading such as Estimate shipping and style its typography, background, border, and spacing.
- Form fields: Individually disable country, state/county, city, or postcode. The state control adapts to the chosen country: it may be a dropdown, text input, or hidden field. Keep fields your rate rules need.
- Button Text: Enter an action label such as Calculate shipping or Update. Style the button, hover state, and loading icon.
Do not disable a destination field simply because most shoppers do not need to change it. WooCommerce's calculation handler treats omitted fields as empty, so a submission with hidden country or postcode controls can clear or reset part of the shipping location. Test the resulting saved destination whenever you remove fields.
Show Shipping Options
Enable Shipping Methods → Enable shipping option to show the available rate choices. Add an optional heading such as Delivery options. The chosen method is read from the current WooCommerce session.
Hide shipping option hides the entire options list when a core Free shipping rate is available. It does not filter out only the paid rates, remove those methods from WooCommerce, or select free shipping. Leave it off if shoppers must choose between free delivery and paid options. For rate filtering, use the separate Checkout Page settings in Misc.
Styling Controls
Use the form container controls for background and spacing. Under Form fields, style labels, input typography, borders, shadows, focus states, dropdown arrow color, and field dimensions. Keep labels visible where possible and avoid fixed field widths that overflow small screens.
The Shipping Methods group has styles for the outer area, heading, option background, border, inner spacing, labels, prices, and radio controls, including checked states. Check a long method name and a large shipping amount on mobile before publishing.
How Calculation and Updates Work
- The shopper selects a country and fills in the relevant state, city, and postcode. Clicking the button submits those values using AJAX.
- WooCommerce updates the current customer's shipping location and calculates shipping for the cart. It can also update the billing location when the customer has no billing first name. This is not an isolated preview: the location can carry forward to cart and checkout.
- BricksUltimate re-renders the calculator and replaces its storefront markup with the new destination and available rates.
- Selecting a shipping option sends the chosen rate to WooCommerce's shipping-method update endpoint. The script then requests the relevant classic cart, checkout, or cart-fragment refresh. Verify other totals displayed in your custom layout respond to that refresh.
The calculator can resubmit after supported add-to-cart, remove-from-cart, and BricksUltimate quantity-update events when both its form and a shipping-options section are present on the page. Do not assume a form-only or rate-only layout recalculates after every possible cart event; test the exact layout and cart controls you use.
Bricks Interactions
BricksUltimate adds the following triggers under Shipping Calculator in Bricks Interactions:
- Shipping cost calculated: Event name
buwoo_shipping_calculated, dispatched when the calculation request completes. - Shipping method updated: Event name
buwoo_shipping_method_updated, dispatched when the rate-selection request completes.
Use these to refresh related interface content or bring a summary into view. They are completion signals, not proof a valid address or rate was accepted, because they run when the request finishes. Avoid using them to promise delivery or start another calculation that triggers itself repeatedly.
Use Cases and Limitations
- Custom Cart page: Put the calculator next to the totals, outside the cart form. Avoid rendering another default calculator in the same layout.
- Mini-cart or off-canvas: Let shoppers estimate delivery while reviewing their cart. Test opening the panel, changing quantities, and recalculating after content refreshes. Keep one calculator instance per page: the current implementation uses shared field IDs and replaces all matching calculator elements with the response.
- Product page: You can show a calculator in a Bricks-rendered section, but it calculates for the cart, not the current product or selected variation. Tell shoppers to add the item first. Keep the form outside Add to Cart.
- Checkout: Use checkout's shipping-address fields and (BU)Shipping Methods for the main checkout form. Do not insert the calculator's separate form inside checkout. See Checkout Builder.
- Multiple shipping packages: The element shows the destination and rates from package
0and selects a rate for that package. It is not a complete split-shipment selector or a combined shipping quote for all vendors or warehouses. - Custom carriers and pickup: Methods must be returned by WooCommerce for the current package. A carrier that needs street-address information, a pickup selector, or its own JavaScript may need its native checkout interface as well. The calculator does not collect a full street address.
- Cart and Checkout Blocks: The live refresh logic uses classic WooCommerce events and fragments. This element is not a block replacement. Test any placement beside a WooCommerce block separately instead of assuming its totals will synchronize.
Testing and Troubleshooting
- Use a fresh guest session and a signed-in customer. Add a physical product and submit complete destinations from two different shipping zones.
- Test a valid postcode, a destination you do not serve, a cart below and above any free-shipping minimum, and changing between paid delivery and pickup where offered.
- Change quantities and remove products. Check the calculator, cart totals, mini-cart, and final checkout rate agree. For split shipments, verify all package charges using the full WooCommerce cart or checkout.
- The country or a method is missing: Check WooCommerce's allowed shipping countries, zone order, enabled rates, and the product's shipping requirements.
- No rate appears after submission: Enable Enable shipping option, enter a complete destination, and check whether the rate list is deliberately hidden when free shipping is available. No available rates can leave this area empty; do not interpret that as free delivery.
- An invalid postcode gives little feedback: The AJAX handler clears WooCommerce notices after re-rendering, so validation errors may not be visible in this element. Check the entered location and confirm it in the standard cart or checkout.
- The address or results seem to change unexpectedly: Check disabled address fields, another calculator on the page, and custom shipping filters. Use one address-entry workflow at a time.
- The form does not submit or totals stay stale: Check for nested forms, missing WooCommerce scripts, browser errors, and failed requests to
admin-ajax.phpor WooCommerce's shipping-method endpoint. Exclude cart and checkout sessions from shared caching.