Open Greg-Archer-at-Funko opened 4 years ago
Hi @Greg-Archer-at-Funko
Can you confirm when you are doing the checkout.removeLineItems
you are utilizing the Storefront API ID vs. a numerical ID? When I test this I'm getting a different result. The item is split as you have explained but removing one of the Line Items seems to be removing both when the BOGO is active.
@Greg-Archer-at-Funko I get the same result as @vixdug. I found this thread looking for a way to tell if the second line item is the bogo item. If anyone has ideas about that, please share!
Line items which are created by Automatic bogo discounts cannot be removed / updated.
Note: I am only describing my specific case, but the bug may apply to wider scenarios.
To Reproduce
Create an automatic discount.
Type: 'Buy X get Y' Customer buys: Minimum qty of items: 1 Customer gets: 1 Free
Add qty two of one item which is eligible to trigger discount, and eligible for discount offer.
Inspect checkout and note that the item is divided into two line items.
Attempt to remove / update second line item with JS Buy checkout methods.
ex:
example response:
Expected behavior The line item should be removed / updated
Environment (please complete the following information):