New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request:Remove all or single product item from basket #269
Comments
For now, I just used the destroy_basket function from utils to get this done with an ajax call. I think may be making this as a separate API would be better. |
Is the I think you can delete the whole basket by sending a PUT request with an empty array in the body to the basket endpoint: fetch(
`${host}/basket`,
{ method: 'PUT', body: JSON.stringify([]) }
) Although I agree an explicit 'DELETE' endpoint would be more intuitive |
Description
Great wagtail integration! Was trying to figure out on how to remove all items from the basket or a single product item. The current API allows subtracting the quantity of the product but not remove the product by itself.
The text was updated successfully, but these errors were encountered: