Add Woo Manager email notification milestones with shared mail templates.
Deploy Ladill Woo Manager / deploy (push) Successful in 2m11s

New order, store connected, Pro expiry, and past-due alerts use the Ladill notification layout with woo branding; expiry reminders dedupe per threshold like hosting.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-07 02:59:45 +00:00
co-authored by Cursor
parent 1edf5aad43
commit cfdc8c7c09
22 changed files with 926 additions and 12 deletions
@@ -0,0 +1,80 @@
@extends('mail.notifications.layout')
@section('email-header')
@include('mail.partials.brand-header', ['brand' => 'woo'])
@endsection
@section('email-footer')
@include('mail.partials.brand-footer', ['brand' => 'woo'])
@endsection
@section('content')
<div class="highlight-box highlight-box-success">
<p class="highlight-box-text">New order received</p>
<p class="highlight-box-subtext">Order #{{ $order->order_number }}</p>
</div>
<h1 class="email-title">You have a new WooCommerce order</h1>
<p class="email-text">
A customer placed an order on <strong>{{ $store->site_name ?? parse_url($store->site_url, PHP_URL_HOST) }}</strong>.
Review it in Woo Manager to confirm and fulfill.
</p>
<div class="email-details">
<p class="email-details-title">Order details</p>
<div class="email-details-row">
<p class="email-details-label">Order number</p>
<p class="email-details-value">#{{ $order->order_number }}</p>
</div>
<div class="email-details-row">
<p class="email-details-label">Store</p>
<p class="email-details-value">{{ $store->site_name ?? $store->site_url }}</p>
</div>
@if($order->customer_name)
<div class="email-details-row">
<p class="email-details-label">Customer</p>
<p class="email-details-value">{{ $order->customer_name }}</p>
</div>
@endif
@if($order->customer_email)
<div class="email-details-row">
<p class="email-details-label">Email</p>
<p class="email-details-value">{{ $order->customer_email }}</p>
</div>
@endif
<div class="email-details-row">
<p class="email-details-label">Status</p>
<p class="email-details-value"><span class="status-badge status-info">{{ ucfirst($order->wc_status ?: 'pending') }}</span></p>
</div>
</div>
@if(is_array($order->line_items) && count($order->line_items) > 0)
<div class="email-details">
<p class="email-details-title">Items</p>
@foreach($order->line_items as $item)
<div class="email-details-row">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="color: #0f172a; font-size: 14px;">
{{ $item['name'] ?? 'Product' }} × {{ $item['quantity'] ?? 1 }}
</td>
<td style="color: #0f172a; font-size: 14px; text-align: right; font-weight: 600;">
{{ strtoupper($order->currency ?: 'GHS') }} {{ number_format(($item['total_minor'] ?? 0) / 100, 2) }}
</td>
</tr>
</table>
</div>
@endforeach
</div>
@endif
<div style="text-align: center; padding: 24px 0; background-color: #f8fafc; border-radius: 12px; margin: 24px 0;">
<p class="email-text-sm" style="margin-bottom: 8px;">Order total</p>
<p class="amount-large">{{ $order->totalFormatted() }}</p>
</div>
<p style="text-align: center;">
<a href="{{ $manageUrl }}" class="email-button">View orders</a>
</p>
@endsection
@@ -0,0 +1,48 @@
@extends('mail.notifications.layout')
@section('email-header')
@include('mail.partials.brand-header', ['brand' => 'woo'])
@endsection
@section('email-footer')
@include('mail.partials.brand-footer', ['brand' => 'woo'])
@endsection
@section('content')
<div class="highlight-box highlight-box-warning">
<p class="highlight-box-text">Plan expiring soon</p>
<p class="highlight-box-subtext">Woo Manager {{ $planLabel }}</p>
</div>
<h1 class="email-title">Your Woo Manager {{ $planLabel }} plan is expiring</h1>
<p class="email-text">
Your subscription ends soon. Renew to keep multiple stores, unlimited products, and Pro features.
</p>
<div class="email-details">
<p class="email-details-title">Subscription</p>
<div class="email-details-row">
<p class="email-details-label">Plan</p>
<p class="email-details-value">Woo Manager {{ $planLabel }}</p>
</div>
<div class="email-details-row">
<p class="email-details-label">Expires</p>
<p class="email-details-value">{{ $subscription->current_period_end?->format('F j, Y') ?? 'N/A' }}</p>
</div>
<div class="email-details-row">
<p class="email-details-label">Days remaining</p>
<p class="email-details-value"><span class="status-badge status-warning">{{ $daysRemaining }} days</span></p>
</div>
</div>
<p style="text-align: center; margin-top: 24px;">
<a href="{{ $renewUrl }}" class="email-button">Renew plan</a>
</p>
<div class="email-divider"></div>
<p class="email-text-sm">
If auto-renew is enabled and your wallet has enough balance, your plan may renew automatically on the expiry date.
</p>
@endsection
@@ -0,0 +1,37 @@
@extends('mail.notifications.layout')
@section('email-header')
@include('mail.partials.brand-header', ['brand' => 'woo'])
@endsection
@section('email-footer')
@include('mail.partials.brand-footer', ['brand' => 'woo'])
@endsection
@section('content')
<div class="highlight-box highlight-box-warning">
<p class="highlight-box-text">Payment failed</p>
<p class="highlight-box-subtext">Woo Manager {{ $planLabel }}</p>
</div>
<h1 class="email-title">We could not renew your subscription</h1>
<p class="email-text">
Your Woo Manager {{ $planLabel }} renewal did not go through.
Top up your Ladill wallet and renew to restore full access.
</p>
@if($subscription->last_error)
<div class="email-details">
<p class="email-details-title">Details</p>
<div class="email-details-row">
<p class="email-details-label">Reason</p>
<p class="email-details-value">{{ $subscription->last_error }}</p>
</div>
</div>
@endif
<p style="text-align: center; margin-top: 24px;">
<a href="{{ $renewUrl }}" class="email-button">Manage subscription</a>
</p>
@endsection
@@ -0,0 +1,39 @@
@extends('mail.notifications.layout')
@section('email-header')
@include('mail.partials.brand-header', ['brand' => 'woo'])
@endsection
@section('email-footer')
@include('mail.partials.brand-footer', ['brand' => 'woo'])
@endsection
@section('content')
<div class="highlight-box highlight-box-success">
<p class="highlight-box-text">Store connected</p>
<p class="highlight-box-subtext">{{ $store->site_name ?? parse_url($store->site_url, PHP_URL_HOST) }}</p>
</div>
<h1 class="email-title">Your WooCommerce store is linked</h1>
<p class="email-text">
<strong>{{ $store->site_name ?? $store->site_url }}</strong> is now connected to Ladill Woo Manager.
Orders, products, and categories will sync from your store.
</p>
<div class="email-details">
<p class="email-details-title">Connection details</p>
<div class="email-details-row">
<p class="email-details-label">Store URL</p>
<p class="email-details-value">{{ $store->site_url }}</p>
</div>
<div class="email-details-row">
<p class="email-details-label">Connected</p>
<p class="email-details-value">{{ $store->connected_at?->format('F j, Y \a\t g:i A') ?? now()->format('F j, Y \a\t g:i A') }}</p>
</div>
</div>
<p style="text-align: center; margin-top: 24px;">
<a href="{{ $manageUrl }}" class="email-button">Open Woo Manager</a>
</p>
@endsection
@@ -26,6 +26,7 @@
'email' => 'bg-pink-50',
'billing' => 'bg-amber-50',
'success' => 'bg-green-50',
'order' => 'bg-indigo-50',
default => 'bg-slate-100',
};
$iconColor = match ($icon) {
@@ -4,7 +4,7 @@
@section('content')
@include('notifications._list', [
'subtitle' => 'Hosting activity for your account.',
'emptyMessage' => "You're all caught up. We'll notify you when something happens with your hosting.",
'subtitle' => 'Orders, stores, and subscription activity for Woo Manager.',
'emptyMessage' => "You're all caught up. We'll notify you when you receive orders or account updates.",
])
@endsection