# E-commerce conditional shipping calculation

**URL:** <https://forum.adalo.com/t/e-commerce-conditional-shipping-calculation/21742>\
**Category:** Get Help\
**Created:** [January 8, 2022, 12:45am UTC](https://forum.adalo.com/t/e-commerce-conditional-shipping-calculation/21742 "2022-01-08T00:45:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nadcjp](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@nadcjp](https://forum.adalo.com/u/nadcjp)\
**Post date:** [January 8, 2022, 12:45am UTC](https://forum.adalo.com/t/e-commerce-conditional-shipping-calculation/21742/1 "2022-01-08T00:45:02Z")

</div>

Hello Adalo Community,

You have been very helpful through the development of my 1st app.  
Working on my 2nd one, I have an issue I can’t find a solution anywhere.

I am creating an e-commerce app for a friend, using Adalo’s Rungne Clone template.

The idea is simple; it has 30 or so products of various sizes, with different shipping fees (5 areas/calculation grades).

I set these shipping fees in the product database, as they are different per the size of the items. Upon ordering, user sets their state (which is numbered in a separate column).

I would like my app to do the following;

> User set their state
> 
> > If the state number is greater than 3 less than 5, set the product’s shipping to be grade 3
> > 
> > > show the final quote before the payment with the product price and the applicable shipping fee

It seems simple, but I can’t find a way to update a record related to another in the same collection.

Thank you for reading. If you know a related post, it would be much appreciated if you can send me a link.

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [January 8, 2022, 1:24am UTC](https://forum.adalo.com/t/e-commerce-conditional-shipping-calculation/21742/2 "2022-01-08T01:24:20Z")

</div>

Hi @nadcjp ,

Welcome,

To do this I use binary total, it could be 2 expressions or more, it can be used for AND or OR, depending what we want to achieve, but we must plan ahead.

Search term binary total in this forum.

> **[Value Comparation](https://previewer.adalo.com/29fc31a7-128b-4429-8e42-1932dc18b2bf)**
>
> To get second highest value and between

This is a cloneable app that you can check for reference.

But hopefully, Adalo make multiple expressions for action in the near future.

---

<div class="post-metadata">

**Author:** ![nadcjp](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@nadcjp](https://forum.adalo.com/u/nadcjp)\
**Post date:** [January 8, 2022, 1:45pm UTC](https://forum.adalo.com/t/e-commerce-conditional-shipping-calculation/21742/3 "2022-01-08T13:45:17Z")

</div>

Thank you!  
I can see a handful of use cases with your suggested solution.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [January 18, 2022, 1:45pm UTC](https://forum.adalo.com/t/e-commerce-conditional-shipping-calculation/21742/4 "2022-01-18T13:45:20Z")

</div>

Closed on January 18, 2022, 1:45pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
