# How to add quantity to products on ecommerce

**URL:** <https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122>\
**Category:** Ask for Help\
**Created:** [May 14, 2020, 9:50am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122 "2020-05-14T09:50:41Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suleimaan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/suleimaan/32/2503_2.png) [@Suleimaan](https://community.glideapps.com/u/Suleimaan)\
**Post date:** [May 14, 2020, 9:50am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/1 "2020-05-14T09:50:41Z")

</div>

How do I add “quantity feature” to products on an e-commerce based application?

suggestions needed @Jeff_Hager

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:** [May 14, 2020, 10:01am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/2 "2020-05-14T10:01:33Z")

</div>

Not sure it’s what you mean, I take it as you want to have kind of an “inventory” that can be updated. If that’s the case, you can read this thread.

> [@Qty for inventory](https://community.glideapps.com/t/qty-for-inventory/6460/2):
>
> It is possible. I have this functionality in my app [itemstore.glideapp.io](http://itemstore.glideapp.io) Just have to set the initial amount. Then, do a relation to the item name in your sales sheet. Roll up the count and use a math column to subtract the count from the original total.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 15, 2020, 5:00am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/3 "2020-05-15T05:00:29Z")

</div>

This might be useful. Add a user specific column to the products sheet where the user can select a quantity, attach it to a template column, and include it as part of the description for the buy button.

> [@Help - Products with multiple options to be selected before check out](https://community.glideapps.com/t/help-products-with-multiple-options-to-be-selected-before-check-out/9012/2):
>
> The most critical question I have is if you will be using the Stripe integration or building your own cart. I’m going to assume you are. User Specific columns will work for a public app, but once the app is closed, the selections will be lost. I think in your case this will not be a problem. If you are using stripe, then you will most likely be using the cart functionality. You can either display the delivery option as an item to add to the cart, or add it as an option along with the other …

---

<div class="post-metadata">

**Author:** ![bul](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bul/32/7945_2.png) [@bul](https://community.glideapps.com/u/bul)\
**Post date:** [May 25, 2020, 11:31pm UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/4 "2020-05-25T23:31:02Z")

</div>

I am still lost. Sounds daunting for no code. 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:** [May 25, 2020, 11:43pm UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/5 "2020-05-25T23:43:51Z")

</div>

What problems are you facing in implementing this?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 25, 2020, 11:51pm UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/6 "2020-05-25T23:51:57Z")

</div>

I know there are issues with using glide columns (ie. the Math column, user specific columns) to use a calculated price for the buy button. I think all of this would need to be done in the sheet with formulas. So basically the user would need to make their selections…possibly with a form button…and write the data to the sheet where formulas are done to calculate the cost with the quantity. Then you would have to display the results and then the user can view the item and then click on the buy button. Maybe I’m completely wrong. I don’t use the buy button either, but just from what I’ve read in the past, I’ve seen that some things do not work as expected. You may be able to get to the checkout with a calculated quantity x price total and everything looks fine, then when completing checkout, you get a message that item is no longer available. I’m sure Glide is working to enhance this, but I don’t know where they are at with this. Maybe others that have done eCommerce stuff with their apps can chime in.

---

<div class="post-metadata">

**Author:** ![bul](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bul/32/7945_2.png) [@bul](https://community.glideapps.com/u/bul)\
**Post date:** [May 25, 2020, 11:53pm UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/7 "2020-05-25T23:53:18Z")

</div>

Thanks for your timely assistance. I am building a community app for listing stuff for sale. What I want to do is to let users be able to add the quantity of items they have and on the other end, let buyers be able to check whetever quantities they want so it multiplies the price on checkout but also reduce their inventory. I have been able to do this (see photo) so far but the quantities arent happening at listing page so I am having trouble making it happen in the sheet end.! Thanks again

[quantity|620x500](https://community.glideapps.com/uploads/short-url/gIhYLACoAaIPj4pudMXuH4dbf5A.png) . P.s you will notice i am having trouble getting the $ to display on the listing front end but thats a whole different problem.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 25, 2020, 11:56pm UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/8 "2020-05-25T23:56:33Z")

</div>

Some additional resources. An additional note that you can’t perform formatting (ie. $ or decimal on an entry component). You can do it on the result when viewing the value in a text component.

> **[Math Column](https://docs.glideapps.com/all/reference/data-editor/computed-columns/math-column)**
>
> Performs instant calculations on your data

[https://docs.glideapps.com/all/reference/data-editor/basic-columns/number-formats#precision-decimal-places](https://docs.glideapps.com/all/reference/data-editor/basic-columns/number-formats#precision-decimal-places)

---

<div class="post-metadata">

**Author:** ![bul](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bul/32/7945_2.png) [@bul](https://community.glideapps.com/u/bul)\
**Post date:** [May 26, 2020, 12:13am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/9 "2020-05-26T00:13:08Z")

</div>

Ok, where do I define the “replacement fields to tell the Math Column what `i``t` and `n` refer to.”? 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:** [May 26, 2020, 12:15am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/10 "2020-05-26T00:15:42Z")

</div>

When you type the formula in a math column, does it automaticallly suggest what columns to replace? I worked on a math column just yesterday and that was its behavior.

Let’s say you type Quantity \* SellingPrice into the formula, it will automatically suggest the Quantity text to be replaced by Quantity column.

Can you try it and tell me if it works?

---

<div class="post-metadata">

**Author:** ![bul](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bul/32/7945_2.png) [@bul](https://community.glideapps.com/u/bul)\
**Post date:** [May 26, 2020, 12:26am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/11 "2020-05-26T00:26:59Z")

</div>

I am I on the right path adding the defined colums in the user first like this? I am assuming i am doing the calculation wrong as i am unable to do the tax calculation part

 ![user](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/a/a365278ebbc273efbe3376eaf3f7b75bc9c46abe.png)

---

<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 26, 2020, 12:29am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/12 "2020-05-26T00:29:54Z")

</div>

What is it showing with that Tax column? As it have linked to the right replacements I assume it would calculate things the right way?

---

<div class="post-metadata">

**Author:** ![bul](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bul/32/7945_2.png) [@bul](https://community.glideapps.com/u/bul)\
**Post date:** [May 26, 2020, 12:32am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/13 "2020-05-26T00:32:32Z")

</div>

Nothing. I am assuming the it has to be something like item x quantity /tax (which is 8% sales tax in my province)

---

<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 26, 2020, 12:33am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/14 "2020-05-26T00:33:51Z")

</div>

Check my personal message. I will take some time to look at it for you.

---

<div class="post-metadata">

**Author:** ![bul](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bul/32/7945_2.png) [@bul](https://community.glideapps.com/u/bul)\
**Post date:** [May 26, 2020, 12:58am UTC](https://community.glideapps.com/t/how-to-add-quantity-to-products-on-ecommerce/9122/15 "2020-05-26T00:58:26Z")

</div>

Perfect thanks
