Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion 1.x/reference/orders.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ The key factor for an order is whether the `placed_at` column is populated. Ever

## Order Notifications

Lunar allows specifying which Laravel mailers and notifications should be available when updating an order's status. These are configured in `config/lunar/orders.php`:
Lunar allows specifying which Laravel mailers should be available when updating an order's status. These are configured in `config/lunar/orders.php`:

```php
'statuses' => [
Expand All @@ -493,6 +493,10 @@ Lunar stores a render of the sent email in the activity log, providing a clear h
These email notifications are not sent automatically when updating the status programmatically outside of the admin panel.
</Tip>

<Warning>
The `notifications` key is present in the default config but is not currently read anywhere in Lunar — defining notifications here has no effect. Only `mailers` are dispatched. If you need to notify someone (staff, customer, a Slack channel, etc.) when an order's status changes outside the admin panel, listen for the update yourself, for example by observing the `Order` model's `updated` event and checking `$order->wasChanged('status')`.
</Warning>

### Mailer Template

When building a mailer template, the `$order` model is available in the view data. When the status is updated, the order is passed through along with any additional content entered. Since additional content may not always be present, check for its existence first.
Expand Down