(relationsip problem?) Cannot delete the data

Hi! I’m new to Adalo and now, I am creating a market app(roughly similar to Amazon).
I implemented a shopping cart feature, but it doesn’t work…

The flow of user story is

  • logged in [User] click button to add Item to his or her [shopping cart].
  • when he or she finishes selecting Item they want, clicks and goes to the submit page.
  • in the submit page, they click button to submit his or her shopping cart and buy the [Item]s.

Model and Relationships are

[User] has many [shopping cart]
[Item] has many [shopping cart]

The problem occurs in the submit button’s action.
I wanted to add a delete action to a submit button(delete [logged in User > shopping cart ALL]).
However, when I added a delete action, there is no choice to delete them!

Could anyone help me? Thank you!

depending on your relationship you might have to delete the shopping cart from the item and not the item from the shopping cart?

Thank you for replying @rjp!
OK, I’ll check the relationships again to delete the cart from [logged in User]!

I changed relationships like below.

[User]s belong to [Cart] .

And I can delete the cart logged in User belongs to.
But, this relationship is uncomfortable and I can’t do other things which I want to do! Can anyone help me?

Hi @Ryuichi,

In my other project I did something like this:

User can have many Orders (i.e. carts), but Order belongs to one User
Order can have many OrderItems, but OrderItem can belong to one Order

Also I had Offers collection, from which I add the individual Offer to the Order (cart), by creating new OrderItem. I do it not by linking, but by copying some if its values to the OrderItem.

This tutorial video from Adalo team is quite useful: https://www.youtube.com/watch?v=e72ba15QwQ4
Imagine that you have just one Food Truck, to create a ecom app.

Hope this helps

Thank you for replying and showing me a useful video tutorial, @Victor!

Oh, I see!
We can implement market flow by using create action!
Your advice helps me a lot! :laughing:

1 Like

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