Can Webflow provide a solution for calculating shipping costs based on different cities in Brazil, considering the variations in shipping rates?

TL;DR
  • Webflow doesn't support city-based shipping natively, so use a third-party integration like Foxy, Shopify, or Snipcart for custom rules.  
  • Alternatively, implement custom JavaScript, connect to a shipping API like Correios, or use a dropdown workaround for manual city rate selection.

Webflow does not natively support city-specific shipping cost calculations, but you can implement a solution by integrating third-party tools or custom code.

1. Use an E-Commerce Integration with Shipping Logic

  • Webflow’s built-in e-commerce only allows shipping rates to be set by country or region (state), but not by city.
  • To support city-based shipping rates in Brazil, you need to integrate with a platform that supports granular shipping logic, such as:
  • Foxy.io (connects with Webflow and allows custom shipping rules)
  • Shopify (use Buy Buttons and advanced shipping logic)
  • Snipcart (lets you define detailed backend rules and shipping APIs)

2. Use Custom JavaScript with a Shipping Table

  • Create a custom shipping cost table using JavaScript within a Webflow embed:
  • Collect the city input from the user during checkout or in a shipping form.
  • Use a data object or API call to return the correct rate.
  • Add the result to the total or show it dynamically.
  • This solution works best when tied to a custom checkout process, since Webflow's default checkout doesn't allow custom scripting at that stage.

3. Connect to a Shipping API (e.g., Correios Brazil)

  • For real-time data, integrate Webflow with a shipping API, such as from Correios (Brazilian Postal Service) or Shippo.
  • You’ll need to:
  • Collect address info before checkout.
  • Trigger an API call (via serverless functions or Make/Zapier) to fetch the shipping price.
  • Display the result to the user or update the checkout costs.
  • Limitations: Requires developer setup; Webflow Forms won’t by default update the e-commerce total, so you may need to redirect users to an external checkout.

4. Use a Multi-Option Shipping Dropdown Workaround

  • As a basic alternative, in Webflow’s e-commerce settings, you can:
  • Create multiple shipping methods named after cities (e.g., “São Paulo - R$20 shipping”).
  • Let the user choose based on their city.
  • This is manual and error-prone, but may work for small stores.

Summary

Webflow alone cannot support dynamic city-level shipping cost calculation for Brazil. You’ll need to integrate a third-party tool like Foxy, use custom JavaScript, or connect to a shipping API to offer accurate city-based shipping pricing. For a scalable setup, consider using a specialized e-commerce backend.

Rate this answer

Other Webflow Questions