thanks. So there isn't a way to validate the cart with just Supabase? I will need to use something like Netlify to do the validation?
m
Mihai Andrei
12/21/2021, 7:49 PM
The database should be enough for prices
Mihai Andrei
12/21/2021, 7:49 PM
I mean. The database should be enough for tracking prices. But you still need some backend code for the checkout
Mihai Andrei
12/21/2021, 7:50 PM
Like, in your cart for each user, you should only store the product name and id
Mihai Andrei
12/21/2021, 7:50 PM
The price should come from a “product table” that the user does not handle it
j
Jshen
12/21/2021, 8:15 PM
Yes I know that, but if we have more than 1 product then a subtotal calculation needs to be done. If I do the calculations on the client side and then insert, it wouldn't be the right way to do so?
Jshen
12/21/2021, 8:15 PM
I would need supabase to allow me to write a function that handles that logic and then I would just call it from the client