Hi guys. I just found out about weweb and just in awe how amazing the product is. I think we will be so close to everyone can build web app now and am so excited about the future.
I need some help, I can’t code and I am figuring out how to make an add to cart button instacart-like, with add and subtract function right at the product. I hope someone can enlighten me. Thank you so much weweb and everyone.
create a list of cards binding the items to a list of products (you need a unique id for every product). In the example I am using an array of data directly in the formula but this should be from a collection or another data source.
Either you do not consider an element in the cart if the value is 0 or you need to add other actions to remove the value from the cart object when the calculated new value is 0.
This will be eqsier to do with nocode once the team add the conditional workflows.
dorilama sorry if i am bothering you. I made an array containing the objects just now to make the cart, my array just content the id and quantity of the product, how do I show the product’s name, or price in the cart and also to push through the database
You have the id of the product, you can retrieve the product informations with that. Try exploring the other formulas available.
For the database it depends by your backend, what data you want to save and when you want to update the data.
There are a lot of different ways of doing it. Try one, see how it works for you and then iterate.