Just wondering how to store certain things from the getCurrentCart and how to use it:
https://www.wix.com/velo/reference/wix-stores-backend/getcurrentcart
-
Store _id from cart
-
Store “totals” , “total” value.
-
Store “lineItems” (everything if possible) (optional)
-
Delete everything from the cart?
Honestly not sure how to code this at all so any help would be appreciated!
My goal is to store the cart_id, store total from the cart, and delete everything from the cart in that order by pressing a button.
(My guess is to make a new variable for cart _id and totals and before I delete everything from cart, I store it in a database)
Any help or tips would be appreciated!