Type Alias: TriggerFinishEvent()
TriggerFinishEvent = (
variant) =>Promise<void>
Function
Function signature for triggering the finish event for a product configuration.
This function initiates the completion process for a product configuration, preparing all the necessary data and dispatching the appropriate events. It's used when a user completes their configuration and is ready to proceed with adding to cart, saving, or sharing.
The variant parameter determines the specific action to take, such as adding to cart, displaying the summary, or generating sharing links.
Which event fires depends on the variant parameter:
-
'basket'dispatchesmimeeq-add-to-cart,
-
'summary'(default) dispatchesmimeeq-show-summary,
-
- and
'selector'dispatchesmimeeq-select-product.
- and
-
- In basket mode,
mimeeq-show-basket-loader
- In basket mode,
-
- fires automatically when using Mimeeq's built-in cart.
-
- See Finish & Cart Events for the full branching flow.
Parameters
variant
string
The type of finish action to perform ('basket', 'summary', etc.)
Returns
Promise<void>
Promise that resolves when the finish process is complete
Example
// Trigger the "add to cart" action for the current configuration
triggerFinishEvent('basket');
// Trigger the summary display for the current configuration
triggerFinishEvent('summary');