Shopify Scripts Buy X get Y. Incorrect quantities of line items in checkout after page reload

Topic summary

Issue: Checkout quantities increment incorrectly when using a Shopify Scripts “Buy X get Y” (BOGO) promotion, specifically when the discount splits a line item.

Context: The store has run a “buy 2, get 1 free” script since November without issues. Starting last week, reloading the checkout page causes paid quantities to increase while the free line remains, affecting only cases where the discount creates a split line item (i.e., part paid, part free). Cart displays remain correct; the problem appears only in checkout after reloads.

Observed behavior:

  • Cart: Product_1 shows 2 paid + 1 free as expected.
  • Checkout initial load: Matches the cart (2 paid + 1 free).
  • After 1 reload: Paid quantity increases to 3 (price rises accordingly) + 1 free remains.
  • After 2 reloads: Paid quantity increases to 4 + 1 free remains.

Reproduction: The default Shopify BOGO script template exhibits the same behavior.

Status: No fix or workaround identified; assistance requested. The issue appears new/regressive and limited to checkout page reloads with split line items.

Summarized with AI on January 11. AI used: gpt-5.

Our customers recently encountered the problem of incorrect quantities in checkout.
I have a shopify script like buy 2 and get 1 free. The script was launched in November and we have not this issue before.

Last week there was an issue with the incorrect quantity of line items in the checkout after reloading the page. This only happens if the discount is applied to a certain number of product variants when it results in a split line item. Everything in the cart works correctly. But in the checkout, after each page reload, the quantity changes.

I also tried the default Buy one get one free (BOGO) script template. This behaves exactly the same and has a problem with the quantities in checkout.

example of behavior :

  1. Cart

Product_1 2 items 120$

Product_1 1 item free (Buy 2 get 1 Free)

  1. Checkout after cart

Product_1 2 items 120$

Product_1 1 item free (Buy 2 get 1 Free)

  1. Checkout after 1 page reload

Product_1 3 items 180$

Product_1 1 item free (Buy 2 get 1 Free)

  1. Checkout after 2 page reloads

Product_1 4 items 240$

Product_1 1 item free (Buy 2 get 1 Free)

I would really appreciate any help you can provide on this issue.