diff --git a/.changeset/add-to-cart-reasons.md b/.changeset/add-to-cart-reasons.md
new file mode 100644
index 00000000..33304c35
--- /dev/null
+++ b/.changeset/add-to-cart-reasons.md
@@ -0,0 +1,5 @@
+---
+"@godaddy/gd-commerce-storefront": minor
+---
+
+`AddToCartButton` now says why it is disabled through its accessible description: more than the available stock, a quantity that is not a whole number of 1 or more, the cart still loading, the store connecting, the store not reachable, or no store connected. `ProductDetailsQuantity` shows the quantity message under the field and marks the field invalid. A SKU whose available count is negative (oversold) now counts as sold out, like a count of 0. Default rendering is unchanged for quantities that can be added.
diff --git a/.changeset/catalog-header-deprecation.md b/.changeset/catalog-header-deprecation.md
new file mode 100644
index 00000000..f7be1d5a
--- /dev/null
+++ b/.changeset/catalog-header-deprecation.md
@@ -0,0 +1,5 @@
+---
+"@godaddy/gd-commerce-storefront": patch
+---
+
+Deprecate `Catalog`'s `title`, `description` and `showHeader` props. They still work. Compose `CatalogRoot` with `
Nothing here yet.
+Custom
}line
+{text}
+ )} ++ {storageWarning} +
+ )} + {error && ( +{error}
+ +Loading your cart…
} + {/* A `+ {option.attribute}: {option.values.join(', ')} +
+ ))} +{subtotal === null ? 'Price unavailable' : money(subtotal, currency)}
+Your cart is empty
++ {isSample ? 'Add a sample product to try the cart.' : 'Find something you love in the shop.'} +
+ + Browse products + + > + )} +Shipping, taxes, and discounts are calculated at checkout.
+Example total in USD. Checkout is not set up yet.
; + else if (!checkoutEnabled) + content =Checkout is not available yet.
; + else + content = ( + + ); + return
{error}
@@ -87,263 +96,3 @@ export function AddToCartButton({
);
}
-
-export function CartDrawer(): ReactElement {
- const {
- config,
- connection,
- cart,
- open,
- setOpen,
- restoreFocus,
- pending,
- hydrating,
- error,
- storageWarning,
- changeQuantity: changeLiveQuantity,
- removeItem: removeLiveItem,
- refresh,
- checkout,
- } = useCommerce();
- const sample = useSampleCart();
- const isSample = connection === 'unbound';
- const changeQuantity = isSample ? sample.changeQuantity : changeLiveQuantity;
- const removeItem = isSample ? sample.remove : removeLiveItem;
- const [drawerAction, setDrawerAction] = useState
- {storageWarning}
- {error} Loading your cart… Your cart is empty
- {isSample
- ? 'Add a sample product to try the cart.'
- : 'Find something you love in the shop.'}
-
- {option.attribute}: {option.values?.join(', ')}
-
- {typeof item.subtotal === 'number'
- ? money(item.subtotal, item.currency ?? currency)
- : 'Price unavailable'}
-
- Shipping, taxes, and discounts are calculated at checkout.
-
- Example total in USD. Checkout is not set up yet.
- Checkout is not available yet. {message(products.error)} No products available.
{availableQuantity === null
? 'Available to order'
- : availableQuantity === 0
+ : isSoldOut(availableQuantity)
? 'This variant is out of stock'
: `${availableQuantity} available`}
- {items.map((item) => (
-
-
- )}
-
{item.name}
- {item.options?.map((option) => (
-
- {(isSample || typeof cart?.totals?.subTotal?.value === 'number') && (
-
- {!isSample && (
-