Skip to content

Commit f321a24

Browse files
committed
Update documentation for renamed globals and email customisation
1 parent 4cf7457 commit f321a24

1 file changed

Lines changed: 53 additions & 6 deletions

File tree

DOCUMENTATION.md

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ After a successful donation, donors can be redirected to a built-in thank you pa
425425
'recurring_donation_success_url' => '/donation-checkout/thank-you?session_id={CHECKOUT_SESSION_ID}',
426426
```
427427

428-
The thank you page displays a customisable heading, message, and call-to-action button. Edit the copy from the CP under **Globals > Donation Messages** (separate tabs for Single Donations and Recurring Donations).
428+
The thank you page displays a customisable heading, message, and call-to-action button. Edit the copy from the CP under **Globals > Donation Checkout Messages** (separate tabs for Single Donations and Recurring Donations).
429429

430430
If you prefer to build your own thank you template, use the `{{ donation:thank_you }}` tag pair:
431431

@@ -452,7 +452,7 @@ Gift Aid allows UK charities to claim an extra 25% on donations from UK taxpayer
452452

453453
### Enabling Gift Aid
454454

455-
1. Go to **CP > Globals > Donation Messages > Settings**
455+
1. Go to **CP > Globals > Donation Checkout Messages > Settings**
456456
2. Enable **Gift Aid** (toggle switch)
457457
3. Optionally customise the label (default: "Boost your donation by 25% with Gift Aid")
458458
4. Enable **Collect Billing Address** (Stripe Checkout will require the donor's full address)
@@ -538,7 +538,7 @@ If you prefer to build your own portal template, use the `{{ donation:portal }}`
538538

539539
### Configuration
540540

541-
The following portal settings can be changed from the CP under **Globals > Donation Messages > Settings**:
541+
The following portal settings can be changed from the CP under **Globals > Donation Checkout Messages > Settings**:
542542

543543
- **Enable Donor Portal** (show/hide the magic link form)
544544
- **Donors Can Cancel** (allow donors to cancel their own subscriptions)
@@ -581,7 +581,7 @@ php artisan donation-checkout:setup-webhook --update
581581

582582
| Stripe Event | What Happens |
583583
|---|---|
584-
| `checkout.session.completed` | Clears caches, dispatches `DonationCompleted` event |
584+
| `checkout.session.completed` | Sends donation confirmation email, clears caches, dispatches `DonationCompleted` event |
585585
| `customer.subscription.updated` | Detects pause/resume, sends donor email, dispatches `SubscriptionPaused`/`SubscriptionResumed`/`SubscriptionUpdated` |
586586
| `customer.subscription.deleted` | Clears caches, dispatches `SubscriptionCancelled` |
587587
| `charge.refunded` | Clears caches, dispatches `DonationRefunded` |
@@ -662,14 +662,61 @@ Add the Donation Stats widget to your dashboard via **CP > Dashboard**. It shows
662662

663663
### Donor Emails
664664

665-
When a subscription is paused or resumed (from the CP or via Stripe webhook), the donor receives an email thanking them for their support. Email templates are publishable:
665+
Donors receive styled HTML emails at key moments in the donation lifecycle:
666+
667+
| Email | Trigger |
668+
|---|---|
669+
| **Donation Confirmation** | Single donation completed via Stripe Checkout |
670+
| **Recurring Confirmation** | Monthly donation set up via Stripe Checkout |
671+
| **Subscription Paused** | Recurring donation paused from CP or Stripe Dashboard |
672+
| **Subscription Resumed** | Paused donation resumed |
673+
| **Magic Link** | Donor requests portal access |
674+
675+
#### Email Branding
676+
677+
Configure the email appearance from **CP > Globals > Donation Checkout Emails > Branding**:
678+
679+
- **Logo**: upload via the asset picker (recommended: 200px wide, PNG or SVG)
680+
- **Organisation Name**: shown in the header when no logo is set, and in the sign-off
681+
- **Accent Colour**: used for the header band, buttons, and amount highlight boxes
682+
- **Greeting**: the opening line of every email, with placeholder support (`{first_name}`, `{last_name}`, `{name}`, `{email}`). Defaults to "Hi {first_name},"
683+
684+
#### Email Content
685+
686+
Each email type has its own tab in the Donation Checkout Emails global with customisable **subject line**, **heading**, and **body text**:
687+
688+
- **Donation Confirmation** tab (single donations)
689+
- **Recurring Confirmation** tab (monthly donations)
690+
- **Subscription Paused** tab
691+
- **Subscription Resumed** tab
692+
693+
The subject line controls what appears in the inbox. The heading is the bold title inside the email. The body is the main paragraph text.
694+
695+
#### Publishing Email Templates
696+
697+
The compiled email views are publishable for full markup control:
666698

667699
```bash
668700
php artisan vendor:publish --tag=donation-checkout-views
669701
```
670702

671-
Templates are in `resources/views/vendor/donation-checkout/emails/`:
703+
Templates in `resources/views/vendor/donation-checkout/emails/`:
672704

705+
- `donation-single.blade.php`
706+
- `donation-recurring.blade.php`
673707
- `subscription-paused.blade.php`
674708
- `subscription-resumed.blade.php`
675709
- `magic-link.blade.php`
710+
711+
#### Developing Email Templates
712+
713+
Email source templates live in the `emails/` directory and use the [Maizzle](https://maizzle.com) framework with Tailwind CSS. To modify the email design:
714+
715+
```bash
716+
cd emails
717+
npm install
718+
npm run dev # preview with hot reload
719+
npm run build # compile to resources/views/emails/
720+
```
721+
722+
The production build inlines all CSS, adds Outlook compatibility, and outputs `.blade.php` files with Blade variables preserved. Only the compiled output is used at runtime.

0 commit comments

Comments
 (0)