CartQuickAdd
Add one product to the active cart by article number or name, on one line: the buyer types, picks a suggestion or keeps what they typed as the SKU, sets the quantity and adds. A product the cart refuses says why in place, and the field keeps it; an added one clears the field for the next.
import { CartQuickAdd } from "@evolve-storefront/feature-cart/cart-quick-add";Renders inside CartProvider.
Preview
Usage
Typing part of a name offers the product; picking it and adding clears the field.
// On the cart page, where the new line is already in view.<CartQuickAdd onAdded={() => {}} />;Props
| Prop | Type | Description |
|---|---|---|
onAdded? | ((result: LineItemsAddedResult) => void) | After the add, overriding |
Any other props go to the root element, like on a plain HTML element.
Examples
RefusedA typed article number is added as is; the cart's refusal says why, in place.
<CartQuickAdd onAdded={() => {}} />;
