getCartByUUID
Get a cart by its UUID.
Import
import { getCartByUUID } from "@evershop/evershop/checkout/services";
Syntax
getCartByUUID(uuid: string): Promise<Cart>
Parameters
uuid
Type: string
Cart UUID.
Return Value
Returns Promise<Cart> with cart instance.
Examples
Basic Usage
import { getCartByUUID } from "@evershop/evershop/checkout/services";
const cart = await getCartByUUID('cart-uuid-123');
console.log(`Cart has ${cart.getItems().length} items`);
See Also
- getMyCart - Get cart by session
- createNewCart - Create new cart