The Add to Cart Action component creates an Action that creates a model state from the current state of the App, and creates a line item in the cart of an eCommerce store using that model state (see ShapeDiver for Shopify or ShapeDiver for WordPress/WooCommerce).
The action can be triggered in the App using an Action Control button, or used in other contexts (upcoming feature).
Inputs of the component
-
Model State (MS): A model state is created when adding an item to the cart. Use this input to overrides the default settings of this model state.
-
Title (T):
-
Quantity (Q): The quantity to be used for the line item.
-
Price (P): The price to be used for the line item.
-
Description (D): The description to be used for the line item. Include the placeholder
{modelStateId}to turn the description in the cart into a link that allows the user to go back to the configurator and continue editing. -
Product ID (PI): Identifier of the product to add to the cart. Optional, defaults to the product defined by the context. Note that this productId is not necessarily the same as the id of the product in the e-commerce system. Translations of product identifiers can be done by the plug-in embedding App Builder in the respective e-commerce system.
Tutorial models
The following sections of our tutorial center contain models including this component: