Smootify.removeCartLines()
`dispatchEvents: false` changes the cart without events or re-render (1.x)
dispatchEvents: false changes the cart without events or re-render (1.x) Since 1.x.
removeCartLines(ids: string[], dispatchEvents?: boolean): Promise<Cart>Types
Cart
export interface Cart {
/** `gid://shopify/Cart/<id>` */
id: string;
checkoutUrl: string;
totalQuantity: number;
note: string | null;
attributes: Attribute[];
buyerIdentity: {
countryCode: string | null;
email: string | null;
phone: string | null;
customer: {
id: string;
email: string | null;
firstName: string | null;
lastName: string | null;
displayName: string;
} | null;
};
lines: { nodes: CartLine[] };
cost: {
subtotalAmount: Money;
totalAmount: Money;
totalDutyAmount: Money | null;
totalTaxAmount: Money | null;
subtotalAmountEstimated: boolean;
totalTaxAmountEstimated: boolean;
};
discountCodes: { code: string; applicable: boolean }[];
appliedGiftCards: { id: string; lastCharacters: string; amountUsed: Money; balance: Money }[];
discountAllocations: DiscountAllocation[];
}