# How do you set shipping cost by cart weight in Adalo?

Store the cart weight and shipping cost on the order, then use mutually exclusive conditions to save the correct shipping tier before checkout.

- Canonical URL: https://adalocado.com/answers/set-shipping-cost-by-cart-weight-in-adalo
- Verification: Documented from current sources
- Topic: Actions and Logic
- Skill level: Intermediate
- Last reviewed: 2026-09-08
- Index status: index-now

## Short answer

Store Total Weight and Shipping Cost on the current Order, then run one conditional Update action for each nonoverlapping weight tier before calculating the checkout total.

Save the calculated weight and shipping charge on the Order before checkout. Use complete, nonoverlapping conditions for the shipping tiers, then add the stored Shipping Cost to the item subtotal. This keeps the rule testable at every boundary and gives the checkout screen one current Order value to read.

## Intended outcome

Each order saves exactly one shipping charge from its total weight, including a defined result at every tier boundary.

## Requirements

- An Orders collection with Number properties for Total Weight and Shipping Cost
- Order Items related to the current Order with a saved item weight or line weight
- A checkout action that has the current Order available

## Step by step

1. **Save the cart weight**

   Before checkout, save the sum of the current Order's related item weights into the Order's Total Weight property.

2. **Define complete shipping tiers**

   Write tiers with no gap or overlap. For example, use Total Weight less than or equal to 1500 for the lower charge and Total Weight greater than 1500 for the higher charge.

3. **Add conditional Update actions**

   On the checkout button, add one Update Current Order action per tier. Set Shipping Cost to the tier amount and configure each action to run only when its weight condition is true.

4. **Calculate the final total**

   After Shipping Cost is saved, display or save the final total as the item subtotal plus Current Order's Shipping Cost.

5. **Continue to checkout**

   Place the Link action after the shipping updates so the checkout screen reads the value stored on the current Order.

## Why it works

- Saving Shipping Cost on the Order gives later screens one stable value to read instead of trying to reuse the visibility state of a button.
- Mutually exclusive tier conditions ensure that one and only one shipping update runs for any valid weight.
- Action order matters because the checkout screen must open after the Order has received its shipping value.

## Data model

| Collection | Properties | Relationships |
| --- | --- | --- |
| Orders | Total Weight, Shipping Cost, and Item Subtotal are Number properties. | Each Order belongs to one User and has many Order Items. |
| Order Items | Quantity and Line Weight are Number properties. | Each Order Item belongs to one Order and one Product. |

## Common failures

### No shipping tier runs at the boundary

Check the comparison operators. Use less than or equal to on one side and greater than on the other so the boundary value is included exactly once.

### The checkout screen shows an old shipping cost

Confirm the actions update the same current Order that the checkout screen receives, and keep the Link action after both conditional updates.

### The tier uses the wrong weight

Inspect the related Order Items and confirm Total Weight is refreshed before the shipping conditions run.

## Testing checklist

- [ ] Test weights immediately below, exactly at, and immediately above every tier boundary and confirm that one expected charge is saved.
- [ ] Change an item's quantity or weight, return to checkout, and confirm Total Weight and Shipping Cost are recalculated on the same Order.
- [ ] Every valid cart weight matches exactly one tier
- [ ] Shipping Cost is stored on the current Order
- [ ] The checkout total adds item subtotal and Shipping Cost
- [ ] The Link action runs after the conditional updates

## Limitations

- Conditional actions currently support one condition each, so complex shipping rules may require a precomputed tier property or an external rate service.
- This pattern handles fixed weight tiers. It does not calculate carrier rates, address zones, taxes, discounts, or package dimensions.
- The forum source used a confirmation modal with conditionally visible buttons. This Answer keeps the accepted stored-shipping-cost pattern and uses current documented conditional Update actions to avoid asking the user to choose a charge the app can determine.

## Community evidence

### [Postage costs based on cart weight. Can't figure it out](https://forum.adalo.com/t/postage-costs-based-on-cart-weight-can-t-figure-it-out/54787/6)

The original author confirmed that saving a postage cost on the order, selecting the applicable tier, and reading that stored value on checkout solved the problem. Boundary: The source used manual buttons and left the exact tier boundary ambiguous, so the Answer defines nonoverlapping conditions from current official documentation.

## Sources

- [Adalo Forum accepted solution](https://forum.adalo.com/t/postage-costs-based-on-cart-weight-can-t-figure-it-out/54787/6)
- [Adalo Help: Using Conditions in Adalo](https://help.adalo.com/component-basics/conditions-and-filtering/using-conditions-in-adalo)
- [Adalo Help: Change Data](https://help.adalo.com/action-basics/creating-an-action-that-triggers-data-edit)
- [Adalo Help: Custom Math Formula](https://help.adalo.com/component-basics/inserting-dynamic-text/how-to-create-a-custom-math-formula)
- [Adalo Help: Store with Shopping Cart](https://help.adalo.com/feature-templates/store-with-shopping-cart/overview-screens-database-layout-settings-use-cases)

Markdown version: https://adalocado.com/answers/set-shipping-cost-by-cart-weight-in-adalo.md
