I have displayed a list of Products on My Home Page. With a repeating Group. However How to i add the - Add to cart option and how can i let the user choose multiple amounts of that product. Is there tutorial or link to a page that someone can share with me. So i can learn how to do this.
All you need is to create a new Thing which represents the users Shopping Cart Items. Fields: Product, quantity. Then:
- include an input element for the quantity in your Products repeating group
- include a button to âadd to cartâ
- when that button clicked, workflow: create new Shopping Cart Item. Product = current cells product, quantity = inputâs value
Then when you display the shopping cart itâs just an RG of those shopping cart items
2 Likes
Hello Rob. Thank you so much for your response. It was very helpful.
Now that I have displayed the cart in a Repeating group how can i get a grand total of the listed items? ??
Ideally, a âCheck Outâ Process
Unfortunately thereâs no native way to sum up a repeating group⌠a seemingly odd shortcoming that will hopefully be addressed soon. There are some previous threads dealing with this topic. As I see it you can either
- Hack together a solution using the List Shifter plugin (I demo this here) - this iterates over each line in the RG.
- Use the âRepeating Group Toolsâ plugin from BDK makes it a bit simpler (extracts the price and quantity).
- I believe the free Orchestra plugin has the ability to do this too but I havenât explored how to implement it.
This topic was automatically closed after 70 days. New replies are no longer allowed.