# How to make Add to Cart Button Work

**URL:** <https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, help\
**Created:** [September 10, 2024, 1:28pm UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757 "2024-09-10T13:28:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaryanbansal](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@aaryanbansal](https://community.thunkable.com/u/aaryanbansal)\
**Post date:** [September 10, 2024, 1:28pm UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/1 "2024-09-10T13:28:02Z")

</div>

Hi i was just making a app for shopping with some food items but i dont know how i can make the add to cart button work so when i click at Add to Cart then it shows a Alert and if user confirms it then it adds it to cart and they can view it later

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [September 11, 2024, 8:58pm UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/2 "2024-09-11T20:58:56Z")

</div>

Hi aaryanbansal, welcome to Thunkable! 🎉

Be sure to check out [How to ask Great Questions v2.0](https://community.thunkable.com/t/how-to-ask-great-questions-v2-0/2689983/1), the [Community Guidelines](https://community.thunkable.com/t/community-guidelines/78/8), and our [Getting Started Guide](https://docs.thunkable.com/getting-started/get-started) to make the best of your Thunkable Community experience!

To build this feature you could use [alert blocks](https://docs.thunkable.com/blocks/app-features/alert).

---

<div class="post-metadata">

**Author:** ![aaryanbansal](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@aaryanbansal](https://community.thunkable.com/u/aaryanbansal)\
**Post date:** [September 12, 2024, 1:12pm UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/3 "2024-09-12T13:12:01Z")

</div>

How do i bro i aldready used can you send me a picture of code

---

<div class="post-metadata">

**Author:** ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)\
**Post date:** [September 12, 2024, 2:13pm UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/4 "2024-09-12T14:13:48Z")

</div>

hi aryan,  
i have used a similar feature in one of my previous projects. I initialized a variable named (my shopping item, in this case flower) to 0. when the + button is pressed for the flower item, it changes the number of flowers by 1. while the minus button does the opposite. it will call an alert if the item amount is already 5 (you can change it to however many you want) and will call an alert if the item amount is already 0.

 ![Screen Shot 2024-09-12 at 5.49.10 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/e/3e590f7ebb61fe9f5a242246fb8610549b05edfa.jpeg)  
 ![Screen Shot 2024-09-12 at 6.00.58 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/0/008a54515d245851adce742b033bf204fa8ff035.jpeg)  
if you would like me to explain more, please feel free to ask me.  
my pleasure to help.

---

<div class="post-metadata">

**Author:** ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)\
**Post date:** [September 12, 2024, 2:14pm UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/5 "2024-09-12T14:14:48Z")

</div>

forgot to mention, it call an alert if the item amount is 0 and the + button is pressed to just make sure the user wants to buy it. you can remove it if you want

---

<div class="post-metadata">

**Author:** ![aaryanbansal](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@aaryanbansal](https://community.thunkable.com/u/aaryanbansal)\
**Post date:** [September 20, 2024, 12:02pm UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/11 "2024-09-20T12:02:27Z")

</div>

Please help get a module of this

---

<div class="post-metadata">

**Author:** ![tashasraff78](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@tashasraff78](https://community.thunkable.com/u/tashasraff78)\
**Post date:** [October 21, 2024, 2:14am UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/12 "2024-10-21T02:14:59Z")

</div>

![IMG_5865](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b983701326abac670dc30a6d21d2e47e3c447833.jpeg)

Hi do you how to make drop list button for select the amount item they want , and the + - if the customer want add more than 1

---

<div class="post-metadata">

**Author:** ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)\
**Post date:** [October 21, 2024, 4:18am UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/13 "2024-10-21T04:18:08Z")

</div>

hi @tashasraff78, could you explain what you mean by a drop list button and maybe explain your problem in a bit more detail, because i dont completely understand what you want

thanks!

---

<div class="post-metadata">

**Author:** ![tashasraff78](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@tashasraff78](https://community.thunkable.com/u/tashasraff78)\
**Post date:** [October 22, 2024, 7:33am UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/14 "2024-10-22T07:33:48Z")

</div>

![IMG_5945](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/8/881983c11b2357b0ec8a7a8689f88d50d6b71a5d.png)

right now I’m looking for a way to make a drop down list of selected images according to size, an example of the drop down list is in the picture below, this is for a university final project but most of the components I found are for “pro” only such as list picker and spinner. so i need the component in the thunkable free. Do you know how to make a drop down list in thunkable free?

---

<div class="post-metadata">

**Author:** ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)\
**Post date:** [October 22, 2024, 9:00am UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/15 "2024-10-22T09:00:27Z")

</div>

a simple list component is needed with it stating all the items inside of it. now what you want to do is when simple list item click, display item (do it however you want, either by setting a label’s text, displaying an image or both). then using what i have explained earlier with the incrementing and decrementing feature display a button to do this feature which will allow the item amount to increase or decrease

hope this is what you are looking for!

---

<div class="post-metadata">

**Author:** ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)\
**Post date:** [October 22, 2024, 9:01am UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/16 "2024-10-22T09:01:40Z")

</div>

and the code to make the drop down list is, when button pressed, set simple list visible to true and when item click, set the simple list visible to false. you can alter this to your needs

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [January 20, 2025, 9:02am UTC](https://community.thunkable.com/t/how-to-make-add-to-cart-button-work/3191757/17 "2025-01-20T09:02:37Z")

</div>

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