prevent checkout with unavailable product variants

- Include is_available flag in hydrated cart items
- Show unavailable message on cart items and product page
- Block add-to-cart for unavailable variants
- Redirect back to cart with error if checkout has unavailable items

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-13 13:34:22 +00:00
parent 09f55dfe67
commit a6e5db73c0
6 changed files with 49 additions and 10 deletions

View File

@@ -781,6 +781,15 @@
font-weight: 600;
}
/* ── Unavailable message ── */
.variant-unavailable-msg {
color: var(--t-sale-color);
font-size: var(--t-text-small);
font-weight: 500;
margin-bottom: 1rem;
}
/* ── Add to cart ── */
.atc-wrap {
@@ -1709,6 +1718,13 @@
margin: 0;
}
.cart-item-unavailable {
font-size: var(--t-text-caption);
color: var(--t-sale-color);
font-weight: 500;
margin: 0.25rem 0 0;
}
.cart-item-actions {
display: flex;
justify-content: space-between;