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.
A very basic example:
result showing the value of the variable:
Thank you so much, this means very much to me. Cheers!
Hi sir sorry to bother, I came with another obstacle. How do I remove the empty products from the cart?
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.
I think removing would be better, but I can’t figure out how.
add one action with condition to the remove workflow:
you sir, are a hero. thank you so much!
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.
Alright, will do! Thank you so much for your help