AvailabilitySubscriber
is a VTEX Component that shows the availability subscriber form that is shown when the product isn't available. This Component can be imported and used by any VTEX App.
Attention: This component only creates a list of the users that subscribe to this product. Currently it doesn't send an automatic email to these users when the product becomes available. It only collects the emails of the users that show interest on the products.
📢 Disclaimer: Don't fork this project, use, contribute, or open issue with your feature request.
You should follow the usage instruction in the main README.
Then, add availability-subscriber
block into your app theme, as we do in our Product Details app.
In order to collect the emails correctly, this feature needs a special configurantion on Master Data as it is detailed below:
The form is submitted to Master Data on the Entity: AS
Prop name | Type | Description |
---|---|---|
skuId |
String | The id of the product sku to which will be watched for changes in the product quantity |
name |
String | The name of the user |
email |
String | The email of the user |
notificationSend |
Boolean | If the notification has been sent already |
createdAt |
String - ISO format | When the document was created Ex.: ISO (2011-10-05T14:48:00.000Z) |
sendAt |
String - ISO format | When the user was notificated Ex.: ISO (2011-10-05T14:48:00.000Z) |
When implementing this component as a block, various inner blocks may be available. The following interface lists the available blocks within AvailabilitySubscriber
and describes if they are required or optional.
"availability-subscriber": {
"component": "AvailabilitySubscriber"
}
For now this block does not have any required or optional blocks.
🚧 🚧 🚧
You should follow the Styles API instruction in the main README.
Below, we describe the namespace that are defined in the AvailabilitySubscriber
.
Class name | Description | Component Source |
---|---|---|
subscriberContainer |
AvailabilitySubscriber container |
index |
title |
AvailabilitySubscriber title |
index |
subscribeLabel |
AvailabilitySubscriber subscribe label |
index |
form |
AvailabilitySubscriber form container |
index |
content |
AvailabilitySubscriber form content container |
index |
input |
AvailabilitySubscriber form input containter |
index |
inputName |
AvailabilitySubscriber form input name |
index |
inputEmail |
AvailabilitySubscriber form input email |
index |
submit |
AvailabilitySubscriber form submit button |
index |
success |
AvailabilitySubscriber success feedback message |
index |
error |
AvailabilitySubscriber error feedback message |
index |