# Changing Quantity when adding to cart

**URL:** <https://community.glideapps.com/t/changing-quantity-when-adding-to-cart/33632>\
**Category:** Ask for Help\
**Created:** [October 27, 2021, 12:00am UTC](https://community.glideapps.com/t/changing-quantity-when-adding-to-cart/33632 "2021-10-27T00:00:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chana\_Chanin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chana_chanin/32/22440_2.png) [@Chana\_Chanin](https://community.glideapps.com/u/Chana_Chanin)\
**Post date:** [October 27, 2021, 12:00am UTC](https://community.glideapps.com/t/changing-quantity-when-adding-to-cart/33632/1 "2021-10-27T00:00:47Z")

</div>

Would anyone know how I can change my inventory when someone adds something to their cart even if they don’t actually purchase? For example, If I have 10 left of a specific item, I want it to display 9 left one added to the cart. And if it’s deleted from the cart, I’d want it to change back to 10. is that possible?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [October 27, 2021, 1:30am UTC](https://community.glideapps.com/t/changing-quantity-when-adding-to-cart/33632/2 "2021-10-27T01:30:09Z")

</div>

Not possible with Glide’s built in Buy Button/Cart, but if you create your own custom cart, it’s possible…just need to keep track of cart items (one item per row in a “Cart” sheet, for example).

---

<div class="post-metadata">

**Author:** ![MIKAHEL](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mikahel/32/25039_2.png) [@MIKAHEL](https://community.glideapps.com/u/MIKAHEL)\
**Post date:** [October 27, 2021, 8:21am UTC](https://community.glideapps.com/t/changing-quantity-when-adding-to-cart/33632/3 "2021-10-27T08:21:06Z")

</div>

As @Robert_Petitto said you may have to create your application  
That’s mine you may use as a sample

> **[My App](https://karter.glideapp.io)**
>
> put in the kart and pay ;)

Further more i recommend you to use the action on submit, that allows you to update back the table when you remove or add item to a new or edited record.  
In my sample you won’t find it, this is a feature introduced later on.

---

<div class="post-metadata">

**Author:** ![Chana\_Chanin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chana_chanin/32/22440_2.png) [@Chana\_Chanin](https://community.glideapps.com/u/Chana_Chanin)\
**Post date:** [October 27, 2021, 12:50pm UTC](https://community.glideapps.com/t/changing-quantity-when-adding-to-cart/33632/4 "2021-10-27T12:50:41Z")

</div>

thank you!

---

<div class="post-metadata">

**Author:** ![Chana\_Chanin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chana_chanin/32/22440_2.png) [@Chana\_Chanin](https://community.glideapps.com/u/Chana_Chanin)\
**Post date:** [October 27, 2021, 12:51pm UTC](https://community.glideapps.com/t/changing-quantity-when-adding-to-cart/33632/5 "2021-10-27T12:51:04Z")

</div>

this is so helpful! Thanks
