Validation and Errors
Validation management
When the user has finished to create his configuration project, he can follow through the purchase step by clicking the Add to cart button 🔗
When doing so, we send a "configuratorValidated" event with all the necessary information about the current project.
Event name | Input / Output | Payload | Reason |
---|---|---|---|
configuratorValidated | Input event | See the description below. | Retrieve all the necessary information for an Add to cart purchase |
Example
configurator.addEventListener("configuratorValidated", (event) => {
console.log(event.detail);
// Here your code to follow through an Add to cart purchase
});
Payload description
Attribute name | Type | Content |
---|---|---|
name | String | The name of the configuration project |
bom | See bom dedicated page 🔗 | The BOM object. |
projectInfo | See project info dedicated page 🔗 | The Project info. |
Error management
You can listen to an event that will let you know that an error occurred during the initialization or the validation of the Storage Configurator. For example if the requested project does not exist. With this, you can choose to display your custom error screen and hide the configurator.
Event name | Input / Output | Payload | Reason |
---|---|---|---|
configuratorError | Output event | Javascript "Error" object | An error occurred during the initialization. |
Example
configurator.addEventListener("configuratorError", (event) => {
console.log(event.detail.message);
});