docs: added dividers + see also section (#2899)
This commit is contained in:
@@ -14,6 +14,8 @@ When the customer requests to claim the order, the event `order-update-token.cre
|
||||
|
||||
In this document, you’ll learn how to handle the `order-update-token.created` event on the server to send the customer a confirmation email.
|
||||
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Medusa Components
|
||||
@@ -30,6 +32,8 @@ To send an email or another type of notification method, you must have a notific
|
||||
|
||||
This document has an example using the [SendGrid](../../add-plugins/sendgrid.mdx) plugin.
|
||||
|
||||
---
|
||||
|
||||
## Step 1: Create a Subscriber
|
||||
|
||||
To subscribe to and handle an event, you must create a subscriber.
|
||||
@@ -66,6 +70,8 @@ You can learn more about dependency injection in [this documentation](../backend
|
||||
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Step 2: Subscribe to the Event
|
||||
|
||||
In the subscriber you created, add the following in the `constructor`:
|
||||
@@ -105,6 +111,8 @@ In this method, you should typically send an email to the customer’s old email
|
||||
|
||||
The page would then send a request to the server to verify that the `token` is valid and associate the order with the customer. You can read more about how to implement this in your storefront in [this documentation](../storefront/implement-claim-order.mdx).
|
||||
|
||||
---
|
||||
|
||||
## Example: Using SendGrid
|
||||
|
||||
For example, you can implement this subscriber to send emails using SendGrid:
|
||||
@@ -144,6 +152,8 @@ export default ClaimOrderSubscriber;
|
||||
|
||||
Notice how the `token` is passed to the storefront link as a parameter.
|
||||
|
||||
---
|
||||
|
||||
## See Also
|
||||
|
||||
- Learn [how to implement claim-order flow in your storefront](../storefront/implement-claim-order.mdx).
|
||||
- [Implement claim-order flow in your storefront](../storefront/implement-claim-order.mdx)
|
||||
|
||||
Reference in New Issue
Block a user