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.
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');
Emits
mimeeq-show-basket-loader When the add to cart process begins
Emits
mimeeq-add-to-cart When a product is added to the cart
Emits
mimeeq-select-product When in selector mode and product is selected
Emits
mimeeq-show-summary When showing the configuration summary
Emits
mimeeq-app-url-change When the URL needs updating (non-modular)
Emits
mmq-app-url-change-sandbox For sandbox environment URL changes