Hello, I'm learning app development using OutSystems, I am trying to create an eCommerce app.
I'm having some problems with the cart logic, I can't figure out how can I make a cart for the app, what is the logic here.
I apologize if my question is naive but I really can't figure out what should be the logic behind the cart.
Thanks in advance.
Kilian Hekhuis wrote:
Hi Riyad,
Why do you think saving the items to the database is not a good idea?
Not only is a good Idea, as it is the common behaviour of these applications.Otherwise, everytime you login, your cart for an unfineshed purchase would be empty, but in most online stores it isn't :)
I assume that with "cart" you mean a virtual shopping cart that contains the items the user wishes to purchase? What exactly don't you know how to handle? What kind of "logic" are you searching for?
Hello Kilian,
Yes I mean a shopping cart that contain the items.
What I have problem with is the logic to implement the cart. Like should I add the product Id to a list and then display the list in the cart page, or just create a database entity "Cart" and add the products to the entity and clear it later.
I think saving the items to a Cart entity in the database is not a good idea.
Eduardo Jauch wrote:
Thanks guys I just solved it using the database method.
Thank you for the help :)
Riyad Bandi wrote:
How did you solve it and made the Add to Cart logic?
can you show me please?
Badeea Nashar wrote:
Hi Badeea,
Did you discover what is the cart logic? I have just started learning how to use OutSystems and I can't figure out this part.
Thank you!
Hi Ana,
These is no "cart logic". You just add the selected item to the database entity representing the shopping cart, that's it.
Hello, I am Reuse The eCommerce Template which is previously available in OutSystems.
i developed a ecommerce app and i unable to refresh the cart . so please help me
Hi Subhashish,
Your question is not directly related to this topic, so please create a new one, thanks.