Cart issues - i can't remove object from my cart

hi, i’m developing a shopping app, but i can’t structure the cart compartment well: i managed to create a good structure, you can add products to the cart regularly and they are shown separately depending on the stores you buy from. through a “true or false” it is possible to add these products to the order and then to the online purchase and everything proceeds according to plan. the problem comes at this moment: the order is completed successfully, but the products remain in the cart. I tried to use filters, but it creates an inconvenient effect: adding a filter like “show products that have not been added to the order” leads to the instant cancellation of the product, which is not optimal and only creates confusion. I tried, instead, to work on a confirmation button, but I can’t use this function: what I would like to do is use the “proceed” button to change the screen and at the same time remove the products from the cart, but I can’t find a way to do this, the fields are empty and this function cannot be performed. how can I do? What change should I make?

Tip: writing huge blocks of text just makes things harder. It pushes people away.

Please, split the information into corresponding paragraphs and include screenshots or a screen recording (I recommend Loom) to help better understand the issue.

Hey @charleshope, I think you misunderstood the question.

So @Marino Just a quick basic breakdown of how to make a shopping cart work well (as outlined in my Point of Sale template)

You need 4 database collections: Stores, Products, Order Items, and Orders.

Stores relationship with products where stores can have many products, products belong to one store. Stores also need a relationship with orders where stores can have many orders, orders belong to one store.

Products should have the following parameters:
Number = ID
Number = Price
Text = Name
Store Relationship (one-to-many (as mentioned above))

Order Items should have the following parameters:
Number = ID
Number = Price
Number = Quantity
Number = Subtotal
Text = Name
Orders relationship (one-to-many (as outlined below)

Orders should have the following parameters:
Number = Cart Number
Number = Paid Order Number
Number = Subtotal (without tax if tax is applicable)
Number = Tax (if applicable)
Number = Total
True/False = Paid
Date/Time = Paid Date & Time
User relationship (one-to-many, where user can have many orders, an order belongs to one user)
Store Relationship (one-to-many (as mentioned above))
Order Items relationship (one-to-many where orders can have many order items, an order item belongs to one order).

When a product is “added to cart”, you create a new order item for the logged-in user’s order. You use the Order Item ID and the Product ID numbers to know if the current product is already in the cart and to update the quantities when the add to cart button is pressed again.

You’ll also need to create an order prior to the user visiting your products list screen and/or grab the user’s unpaid order prior to visiting the products list screen.

I would highly recommend checking out Adalo’s e-commerce template to see how they set that up. Alternatively, you can purchase my Point of Sale template where I pretty much do this same exact method that I’ve walked you through here. The only difference is that my template does not have multiple stores as it’s made for an individual shop. A 3rd option, you can book a mentoring session with me where I’ll walk you through the process and answer any questions you have along the way.

I didn’t address the inquiry. I ask for a better explanation to make things easier for those helping. :wink:

There’s no misunderstanding.

thanks a lot :grin: I’ll try and let you know

I’m trying to do it, but I found a problem in the creation of the “Order Item”: the “Order” selection tells me “nothing available”. how can I fix it?

As mentioned:

You have to have the order created before the products screen.

On the point of sale template that I referenced, this is accomplished through a countdown timer on the splash screen:

Check your products list screen to ensure that you have “Current Order” data available. Like this:

1 Like

I’ve never used Splash, is it essential for that? is there no way to do it in Adalo only?

It’s just a screen. I named it splash because it looks like a splash screen, like a loading screen. It’s just a countdown timer.

1 Like

Sorry if I insist, but I think I have not understood: is it an external program or is it always a function of adalo?
in both cases could you give me a quick explanation or redirect me to a tutorial?

Steps:

  1. Add a blank screen.
  2. Change the name of the screen to “Splash”.
  3. Add countdown timer component.
  4. Add the “Create Order” action.
  5. Add the link to the products screen.
1 Like