@extends('layouts.admin') @section('title', 'Abandonment settings') @section('content') @php $steps = old('steps') ? collect(old('steps'))->mapWithKeys(fn ($s, $i) => [$i + 1 => array_merge($settings['steps'][$i + 1], ['enabled' => false, 'show_products' => false, 'discount_enabled' => false], $s)])->all() : $settings['steps']; $value = fn (string $key) => old($key, $settings[$key]); @endphp Abandoned checkouts @if(session('status')) {{ session('status') }} @endif @if($errors->any()) {{ $errors->first() }} @endif @csrf @method('PUT') Automatic recovery emails When on, reminder emails are sent on schedule without anyone clicking a button. Admins can still send any email manually. Send automatically @foreach([ ['Active checkouts', number_format($stats['open'])], ['Emails sent', number_format($stats['emails_sent'])], ['Recovered', number_format($stats['recovered'])], ['Recovery rate', number_format($stats['recovery_rate'], 1).'%'], ] as [$statLabel, $statValue]) {{ $statLabel }} {{ $statValue }} @endforeach Abandonment rules Mark as abandoned after (minutes) Minutes of inactivity after the customer entered their email. Only email carts worth at least AUD. Use 0 to email every abandoned checkout. Stop the sequence after (days) Older checkouts are marked expired. Stop reminders if the customer places any paid order with the same emailThe checkout is marked recovered and linked to that order. Email sequence Up to {{ \App\Domain\CartCheckout\Services\AbandonmentSettingsService::MAX_STEPS }} emails. Each delay is counted from the moment the checkout was abandoned. @foreach($steps as $number => $step) @php $index = $number - 1; @endphp any()) open @endif data-abandon-step> {{ $number }} {{ $step['subject'] }} {{ $step['enabled'] ? 'Sends '.$service->delayLabel($step).' after abandonment' : 'Off' }} @if($step['discount_enabled']) · includes {{ app(\App\Domain\CartCheckout\Services\AbandonedCheckoutService::class)->discountSummary($step['discount_type'], (float) $step['discount_value']) }} code @endif Send email {{ $number }} Send @foreach(\App\Domain\CartCheckout\Services\AbandonmentSettingsService::DELAY_UNITS as $unit => $unitLabel) {{ $unitLabel }} @endforeach after abandonment Subject line Preview text (shown after the subject in the inbox) Heading Email format @foreach(\App\Domain\CartCheckout\Services\AbandonmentSettingsService::FORMATS as $format => $formatLabel) {{ $formatLabel }} @endforeach Message {{ $step['body'] }} Leave a blank line between paragraphs. Placeholders are listed on the right. Write HTML, e.g. <p>, <strong>, <img>, links and inline styles. It sits inside the branded layout. Add {button}, {discount_box} or {cart_items} to place those blocks yourself. Full HTML email Insert starter layout {{ $step['layout_html'] ?? '' }} Paste a complete email (tables and inline styles work best in every inbox). This replaces the built-in design entirely. Use the text and HTML block placeholders on the right; a stop-reminders link is added if you leave out {unsubscribe_url}. Scripts and forms are removed. Button label Show cart products with images and totals Include a discount in this email Each customer gets their own single-use code, applied automatically when they click the button. Type @foreach(\App\Domain\CartCheckout\Services\AbandonmentSettingsService::DISCOUNT_TYPES as $type => $typeLabel) {{ $typeLabel }} @endforeach Value (% or AUD) Expires after (days) Minimum order (AUD) Preview changes Send test to me Preview shows your unsaved edits. Test emails use the saved version. @endforeach Email branding Brand colour Logo URL Reply-to address Footer note The sending address comes from the "Abandoned checkout" purpose under Settings → Email & SMTP. Save abandonment settings @foreach(array_keys($steps) as $number) @csrf @endforeach @endsection
When on, reminder emails are sent on schedule without anyone clicking a button. Admins can still send any email manually.
Up to {{ \App\Domain\CartCheckout\Services\AbandonmentSettingsService::MAX_STEPS }} emails. Each delay is counted from the moment the checkout was abandoned.
<p>
<strong>
<img>
{button}
{discount_box}
{cart_items}
{unsubscribe_url}
Each customer gets their own single-use code, applied automatically when they click the button.
The sending address comes from the "Abandoned checkout" purpose under Settings → Email & SMTP.