# Related or unique shopping cart

**URL:** <https://community.glideapps.com/t/related-or-unique-shopping-cart/45288>\
**Category:** Ask for Help\
**Created:** [July 27, 2022, 12:26am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288 "2022-07-27T00:26:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_David](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jose_david/32/45339_2.png) [@Jose\_David](https://community.glideapps.com/u/Jose_David)\
**Post date:** [July 27, 2022, 12:26am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288/1 "2022-07-27T00:26:11Z")

</div>

I am creating a local app that communicates a business and a customer by whatsapp but I need to have a shopping cart that only accepts products from the same store and does not allow adding from several, so that the order message reaches a single business by whatsapp.  
Someone help me who knows how to do it or has any idea thanks

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 27, 2022, 1:12am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288/2 "2022-07-27T01:12:53Z")

</div>

> [@Editar los pedidos del carrito](https://community.glideapps.com/t/editar-los-pedidos-del-carrito/45281/3):
>
> Normalmente, la configuración ideal es: Una mesa para los artículos Una tabla para los artículos del carrito, aquí es donde sus vendedores añadirán artículos a cada pedido. Digamos que pido 1 coca y 1 hamburguesa, serán 2 filas. Asegúrese de que cada fila tiene un rowID (lo llamaré cartID) y capture el correo electrónico de la persona que agregó el artículo. Tener una pestaña que apunte a la tabla de artículos del carrito, filtrar por email es usuario registrado, y “añadido al pedido” n…

Basically it’s the same idea as above, but for each “Cart item” you would have the “Business rowID” in there as well.

In your User Profiles table, create a relation to check for un-submitted rows, and return the business rowID (a single value column).

If the user is trying to add an item with a business ID different from their “currently added business ID” as described above, then you don’t allow them to add.

---

<div class="post-metadata">

**Author:** ![Jose\_David](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jose_david/32/45339_2.png) [@Jose\_David](https://community.glideapps.com/u/Jose_David)\
**Post date:** [July 27, 2022, 1:40am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288/3 "2022-07-27T01:40:14Z")

</div>

> [@ThinhDinh](#):
>
> Basically it’s the same idea as above, but for each “Cart item” you would have the “Business rowID” in there as well.
> 
> In your User Profiles table, create a relation to check for un-submitted rows, and return the business rowID (a single value column).
> 
> If the user is trying to add an item with a business ID different from their “currently added business ID” as described above, then you don’t allow them to add.

So I would have to create a new cart table where the orders arrive?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/d/8d8891ca88625b3f74b8dd55a550bc3ab3a6f351.png)  
So I have made my tables in orders I call the user, quantity and all that and I have a relationship with the unique product code and where in the cart I only put that relationship

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 27, 2022, 1:45am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288/4 "2022-07-27T01:45:28Z")

</div>

I assume each row in your screenshot is an item in the order?

---

<div class="post-metadata">

**Author:** ![Jose\_David](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jose_david/32/45339_2.png) [@Jose\_David](https://community.glideapps.com/u/Jose_David)\
**Post date:** [July 27, 2022, 2:02am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288/5 "2022-07-27T02:02:02Z")

</div>

yes

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 27, 2022, 2:13am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288/6 "2022-07-27T02:13:10Z")

</div>

Then you just need to add a column to capture the business ID, and follow my explanation in the first comment.

---

<div class="post-metadata">

**Author:** ![Jose\_David](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jose_david/32/45339_2.png) [@Jose\_David](https://community.glideapps.com/u/Jose_David)\
**Post date:** [July 27, 2022, 2:19am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288/7 "2022-07-27T02:19:50Z")

</div>

whit relationship? or single value? sorry for the noobs questions, and the BussinesID not is necesary in the product table? (and how ☹ )

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 27, 2022, 2:23am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288/8 "2022-07-27T02:23:48Z")

</div>

I assume you’re letting your users add items to the cart. Your Items table should contain a business ID related to that item (that would be added when you as an admin add the item to the database).

Then, when your users add items to the cart, capture that business ID as a new column.

---

<div class="post-metadata">

**Author:** ![Jose\_David](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jose_david/32/45339_2.png) [@Jose\_David](https://community.glideapps.com/u/Jose_David)\
**Post date:** [July 27, 2022, 2:38am UTC](https://community.glideapps.com/t/related-or-unique-shopping-cart/45288/9 "2022-07-27T02:38:25Z")

</div>

> [@ThinhDinh](#):
>
> Then, when your users add items to the cart, capture that business ID as a new column.

I am traying make relation in “pedidos” to column “codigo bussines to ID bussines” but the code its not visible
