Add to cart HOw do I do this?

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.

Hi @thomasmatovu

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

  1. Hack together a solution using the List Shifter plugin (I demo this here) - this iterates over each line in the RG.
  2. Use the “Repeating Group Tools” plugin from BDK makes it a bit simpler (extracts the price and quantity).
  3. 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.