MixAddToCart
MixAddToCart is a mixin for the add to cart function in ecommerce development.
It allows developers to add a product to the cart on the server, performing a GraphQL mutation. This powerful tool simplifies the process of adding products to the cart, making it a crucial component for any ecommerce application.
The MixAddToCart mixin is easy to use, with only two parameters required: the SKU ID, which is a number, and the product quantity, also a number.
Additionally, the mixin accepts a product object for even more flexibility. This article will explore the different methods offered by the MixAddToCart mixin and how they can be utilized to simplify the add to cart process.
Methods
Method | Description | Parameters |
---|---|---|
addToCart | Add a product to the cart on the server. Performs a graphql mutation | sku id (Number), product quantity (Number), product (Object) |