I’m trying to calculate a grand total of some figures in a repeating group. I’ve got two repeating groups on my page. The top one is where you choose products which are then listed in the RG below where the user can change the quantity. It then calculates the Price * Quanity to give the Total on each row. That works fine. Here’s a screen shot of it…

What I want to do though is have a “Grand Total” where there’s a ‘0’ in the screen shot but that’s where I’m having trouble. I’ve done loads of searching and can only conclude that it’s actually really tricky involving Custom States and lots of “jiggery pokery” but surely it’s a pretty basic requirement so I’m wondering if I’ve missed something.
Could someone point me in the right direction? I promise I’ve spent ages looking for an answer and got nowhere so any help is much appreciated.
All the best
Joe

That’s extremely kind and looks like what I need. I don’t understand how to get it work in “run mode” (sorry, still quite new to Bubble) as a different user. I’m eager to see how you got this to work. Thank you.

@joefarrowsmith You’ll have to excuse the mathematic bugs and all that kinda jazz threw this together pretty quick. Hopefully this gives you a relatively OK understanding of how you could get a cart to work etc.

Sure, so if you look on the backend. Essentially the cart has a “Total” and when a new item is added to the cart I just do

Current User’s Cart Total + Current Cell’s Product’s Price

which updates total

Be aware that it will get quite complex when it comes to updating prices and quantities etc but it’s a good base. If you feel I’ve helped please mark my original comment as the solution