# Adding Multiple Products to an order

**URL:** <https://community.glideapps.com/t/adding-multiple-products-to-an-order/73378>\
**Category:** Ask for Help\
**Created:** [May 14, 2024, 8:26pm UTC](https://community.glideapps.com/t/adding-multiple-products-to-an-order/73378 "2024-05-14T20:26:56Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [May 15, 2024, 11:31pm UTC](https://community.glideapps.com/t/adding-multiple-products-to-an-order/73378/5 "2024-05-15T23:31:11Z")

</div>

The flow would look like this, assuming your users are signed in:

- Add a Cart table that would contain the order id, the item id and the quantity.
- In your users table, add a “current order ID” column.
- Assuming you have an Items screen, on the entry to the details view of that screen, check if your “current order ID” is empty. If empty, set a unique ID to the “current order ID” column, then show them the details screen. Else just show them the details screen without doing anything.
- Add a form inside each item’s details screen, allow users to set a quantity and write to the Cart table: the “current order ID”, the “item ID” and the quantity.
- Add a Cart screen that uses a relation of “current order ID” to show items that have been added to the cart. You can leverage that relation to calculate the total cost of the order.
- Add a submit order button that writes a row to the Orders table that contains the “current order ID”, and set a new unique ID to the Users table preparing for the next iteration.

---

_[View the full topic](https://community.glideapps.com/t/adding-multiple-products-to-an-order/73378)._
