nuxt-x-affiliate
Deal Alert
Email me when price drops
Deal Alert
The XAFDealAlert component is an inline email-capture for "tell me when the price drops" — pairs naturally with <XAFBuyButton> on a product review. Captures the current price, optional target price, product name, and product URL, and POSTs them to your endpoint.
Components
<XAFDealAlert />
<XAFDealAlert
product-name="Logitech MX Keys S"
url="https://amazon.com/dp/B0CX123"
:current-price="99.99"
:target-price="79.99"
endpoint="/api/deal-alerts"
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
productName | string | required | Shown in the alert body and email payload. |
url | string | required | Product URL — included in the alert payload. |
currentPrice | number | — | Current price displayed in the alert body. |
targetPrice | number | — | Threshold — alert fires when price drops below. |
endpoint | string | — | POST { email, productName, url, targetPrice } here. |
The submit handler is purely additive — it always emits and posts if an endpoint is given, and renders a success state after submit regardless.
AI Context
component: XAFDealAlert
package: "@xenterprises/nuxt-x-affiliate"
use-when: "Email me when price drops" signup capturing email, product name, URL, and optional target price.
