Describe the bug
Shopify Buy One Get One discount breaks cart functionality.
The following instructions are based off of this minimum reproducible example which uses Shopify’s own code! Here is a Loom video which demonstrates the issue
Steps to reproduce:
- Create a collection listing all products example
- Create a Buy One Get One Discount example
- Using this example code in react-js-buy folder, add a product that is part of the Buy One Get One discount (eg “Foundations in MDMA Safety, Therapeutic Applications & Research”) to cart multiple times
Expected:
Cart should show line items with quantity.
You should be able to add or remove the line items from cart.
Actual:
Strange presentation in the cart with same variant split into multiple line items.
You’re unable to remove line items from the cart which are involved in the BOGO discount. 500 error from the graphql endpoint for example:
index.js:4078 Uncaught (in promise) Error: [{"message":"Internal error. Looks like something went wrong on our end.\nRequest ID: 9ef6a61e-3635-4426-b263-b7c59582e46f (include this in support requests).","extensions":{"code":"INTERNAL_SERVER_ERROR","requestId":"9ef6a61e-3635-4426-b263-b7c59582e46f"}}]
Code Example:
Here is a minimum reproducible example code based off of the storefront-api-examples repo
Video Example:
Here is a Loom video which demonstrates the issue
This issue is also open on Shopify Buy github https://github.com/Shopify/js-buy-sdk/issues/926