I am using the store cart page with a URL parameter (wixLocation.query) containing the desired product SKUs, and a function that adds the products to the current cart.
Before adding the products I have to clear the cart so that the user gets only the products that are listed in the URL parameter.
Right now I am looping wixStores.cart.removeProduct() for the first product until the returned cart is empty, but it is slow and inefficient.
Is there a better option for doing this?
If not, do you plan on adding a wixStores.cart.clear() or a wixStores.cart.removeProducts( Array ) function?