I wanted to ask how I can add just one product from a product list to the shopping cart in Adalo, and how the add button disappears if the product is already in the shopping cart. Currently, I don’t know how to set the button’s visibility and filters so that the button is only displayed if no order item has been created for this product. Does anyone have any ideas?
You can use “Counts” approach to manage this visibility. Let’s assume you have Products, Carts and Cart Items:
create a relationship between Products and Cart Items, so that each Cart Item can belong only to one Product. Also you need a relationship Carts - Cart Items (one cart can have many items).
when you add an item to the cart, you do it with the action Create Cart Item, and you set the relationship to Product and to Cart at this time
then: on the Product list entry (e.g. Add button), you add a visibility condition, so that Current Cart → Cart Items → Count, where Cart Item → Product → ID is equal to Current Product → ID, is equal to 0.
Please see the screenshot (collection names are different):