Client complaint · RESOLVED · 2026-06-30

KC Card Finder showed sold-out cards as "in stock" — fixed

Reported for older rare cards at two Kansas City metro stores. Root cause found, fixed in the backend, deployed to production, and verified against the live stores.

1 The complaint

The finder at /kc-card-finder listed cards as in stock that were actually sold out, for Collector's Cache (Lenexa, KS) and Game Cafe (Independence, MO). Older rares, usually listed yet sold out, were the clearest examples.

2 Root cause

Backend: ~/Projects/kc-card-api/api/check.js, function checkCrystal. The old parse marked a product in stock when its price span was not tagged no-stock. But Crystal Commerce renders a <span class="regular price"> on sold-out items too, so every carried product counted as in stock, and a sold-out condition's price could even win as the displayed lowest price.

The real stock signal is the variant row class the store sets itself: <div class="variant-row in-stock"> (carries an "N In Stock" count and an add-to-cart form) versus <div class="variant-row no-stock"> (carries "Out of stock." and only a wishlist button).

3 The fix

A product now counts as in stock only when it has a real variant-row in-stock, and the lowest price comes only from those buyable rows. The result is no longer a guess, so approx is now false.

// before:  marked in_stock when a price span was not "no-stock"
//          (regular-price spans render on sold-out items too)
// after:   in_stock only if a "variant-row in-stock" exists;
//          low = lowest price among in-stock rows only

4 Verified live

Same backend, before vs after the deploy:

Card / storeTruthBeforeAfter (live)
Thoughtseize · Collector's Cacheall sold outin_stock · 14 · $5.56out_of_stock · 0
Thoughtseize · Game Cafeall sold outin_stock · 20 · $6.77out_of_stock · 0
Sol Ring · Game Cafein stockin_stock · inflatedin_stock · 1 · $22.83

Probe: GET https://kc-card-api.vercel.app/api/check?card=Thoughtseize

Resolved. Live tool: drwu-htmls.vercel.app/kc-card-finder

🛍️ Get the printable