AddThisFeature

Shipping Calculator

Show real delivery options and costs for the shopper's address before they commit.

moderate Monetization

What it adds

An address-aware shipping quote in the cart and at checkout, listing each available service with its cost and delivery estimate.

What your agent is told to do

5
  1. 1

    Quote as early as the shopper gives you a country and postal code, and requote at checkout once the full address is known. A cost that appears for the first time on the final screen is the most common reason a cart is abandoned.

  2. 2

    Derive each rate from the actual cart: weights, dimensions, quantity, and any per-item shipping class the catalogue already carries. Do not quote from order value alone unless the business genuinely prices that way.

  3. 3

    Present options the way a shopper compares them, by delivery date rather than by carrier product code, and preselect the cheapest rather than the fastest.

  4. 4

    Store the quoted rate against the order with the inputs that produced it, so support can later answer why a customer was charged what they were charged.

  5. 5

    Do not treat tax as part of shipping. The app already has Tax and VAT Collection; call into it and show duties, taxes, and shipping as separate lines rather than folding them into one number.

Edge cases it handles

8
  • Rate providers time out. When the lookup fails or takes too long, fall back to a configured flat estimate, label it as an estimate, and let the order proceed rather than blocking the sale.
  • A cart can split across warehouses or shipping classes, which means more than one shipment and more than one rate. Decide whether the shopper sees one combined total or a shipment-by-shipment breakdown, and be consistent everywhere the total appears.
  • An address outside the regions the business serves must be caught at the address step with a plain explanation, not accepted and then silently quoted at zero.
  • A quoted rate has a shelf life. Hold it for a defined window, and requote whenever the cart contents, quantity, or address change, so the charge at capture matches what was shown.
  • Cross-border orders carry duties and import taxes that are not shipping. Show them on their own line and say clearly whether they are prepaid or collected on delivery.
  • Postal codes have wildly different formats by country. Validate against the selected country rather than a single pattern, and never reject a valid foreign code.
  • A shopper changing address repeatedly must not fire a rate lookup on every keystroke. Debounce, and cancel the in-flight request when a newer one starts.
  • Free shipping promotions and rate quotes have to agree. If a promotion zeroes the cost, the quoted service must still be recorded so the correct carrier is used at fulfilment.

Definition of done

8
  • The shopper sees shipping options and costs before reaching the payment step.
  • Rates reflect the cart's real weight, dimensions, and shipping classes.
  • A provider failure degrades to a labelled flat estimate and the order still completes.
  • Unserved regions are rejected at the address step with a clear message.
  • Shipping, duties, and taxes appear as separate lines throughout the cart, checkout, and receipt.
  • The rate charged at capture matches the rate quoted, or the shopper is requoted before payment.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.