Issue: On Shopify’s Horizon 3.1.0 theme, adding a gift card to the cart resulted in nothing appearing. The network response showed status 422 with a message that the gift card variant was already sold out, despite gift cards being active and inventory not tracked. Other products added to cart normally.
Initial checks suggested: ensure cart integration uses the form ‘gift_card’, disable apps/JS conflicts, test in a default theme, and clear cache. These did not resolve it; the cart template did not contain the gift card form, but the root cause lay elsewhere.
Root cause and fix: A variant was manually added to the Gift Card product via Products instead of using Gift Card > Add a Gift Card (denominations). This caused the system to treat gift card variants as sold out. Creating a new gift card product with all desired denominations via the gift card flow, and retiring the old product (draft or delete), restored add-to-cart.
Outcome: Resolved with a workaround. Considered a Shopify platform bug; no code changes required.
Summarized with AI on December 11.
AI used: gpt-5.