[Bug Report] Appended URL discount code is not persistent when inventory is updated

Alex666
Shopify Partner
9 0 2

Hello,

 

  We have a Discounts App which generates a discount code and appends it to the URL.

  When the cart includes a product with partial stock, Shopify prompts the customer in the /checkout section that the cart was updated with the maximum available number of stocked products. The problem is that the discount code generated by our app, despite the fact that it was created for the correct amount of products, the URL parameter is not persistent without a manual page refresh (see attachment).

  Merchants are blaming our app for this behavior, but our app has no control in the checkout section.
  Please help us with a resolution or a temporary workaround for such cases. 


Example:

  1. customer adds to cart 6 pieces of a product that only has 5 pieces available in the inventory
  2. customer reaches checkout with a discount code generated by our discount app in the URL (discount is generated only for the 5 available products)
  3. customer clicks the "Continue" button to update the cart with the new available quantity
  4. the discount code is not applied to the checkout after the cart is adjusted and checkout reloaded
Reply 1 (1)
Alex666
Shopify Partner
9 0 2