Retrieves a cart.
The getCart()
function returns a Promise that resolves when the specified cart is retrieved.
function getCart(_id: string): Promise<Cart>;
ID of the cart to retrieve.
import { cart } from "@wix/ecom";
async function getCart(id) {
const response = await cart.getCart(id);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.