Feat: Publishing Payment and Order Emails

This commit is contained in:
2026-09-03 11:46:55 +03:00
parent 53f30ff51a
commit b87e22381f
5 changed files with 112 additions and 0 deletions
+100
View File
@@ -0,0 +1,100 @@
@extends('layouts.app')
@section('title', 'Αναζήτηση')
@section('content')
<section class="px-8 py-16 lg:px-16">
<form method="GET" action="{{ route('search') }}" class="max-w-xl mb-12">
<x-ui.field label="Αναζήτηση" for="search-q">
<x-ui.input id="search-q" name="q" value="{{ $query }}" autocomplete="off" />
</x-ui.field>
</form>
@if ($query === '')
<p class="text-neutral-500">Πληκτρολόγησε κάτι για αναζήτηση.</p>
@else
<div class="grid grid-cols-1 lg:grid-cols-[1fr_230px] gap-14">
<div>
@if ($results->isEmpty())
<p class="text-neutral-500">Δεν βρέθηκαν αποτελέσματα για "{{ $query }}".</p>
@else
<p class="mb-6 text-neutral-500">{{ $results->count() }} αποτελέσματα για "{{ $query }}"</p>
<ul>
@foreach ($results as $product)
<li>
#{{ $product->id }} —
<a href="{{ route('product.show', ['id' => $product->id]) }}">
{{ $product->translateAttribute('name') ?? '(no name — id: ' . $product->id . ')' }}
</a>
</li>
@endforeach
</ul>
@endif
</div>
{{-- Filter sidebar — same shape/components as category/partials/listing.blade.php,
adapted to SearchListing's query() (which always carries `q`) instead of
CategoryListing's collection-scoped one. --}}
<aside class="flex flex-col gap-10">
<form
method="get"
action="{{ route('search') }}"
data-controller="auto-submit"
data-action="change->auto-submit#submit range-slider:change->auto-submit#submit"
class="contents"
>
<input type="hidden" name="q" value="{{ $listing->query }}">
@if ($listing->sort)
<input type="hidden" name="sort" value="{{ $listing->sort->value }}">
@endif
@if ($priceFloor !== null && $priceCeil !== null && $priceCeil > $priceFloor)
<div class="flex flex-col gap-4">
<p class="font-extrabold text-h4">{{ __('storefront.shop.filter_price') }}</p>
<x-ui.range-slider
name="price"
:min="$priceFloor"
:max="$priceCeil"
:min-value="max($priceFloor, $listing->minPrice ?? $priceFloor)"
:max-value="min($priceCeil, $listing->maxPrice ?? $priceCeil)"
prefix="€"
separator=" - "
:legend="__('storefront.shop.filter_price')"
:min-label="__('storefront.shop.price_min')"
:max-label="__('storefront.shop.price_max')"
>
@if ($priceFiltered)
<a
href="{{ route('search', $listing->query(['price_min' => null, 'price_max' => null, 'page' => null])) }}"
class="underline-slide [--slide-h:1px] font-display text-sm font-bold uppercase italic"
>{{ __('storefront.shop.reset') }}</a>
@endif
</x-ui.range-slider>
</div>
@endif
<div class="flex flex-col gap-4 [&_label]:text-base">
<p class="font-extrabold text-h4">{{ __('storefront.shop.availability') }}</p>
<x-ui.checkbox id="search-in-stock" name="in_stock" :checked="$listing->inStockOnly">
{{ __('storefront.shop.in_stock_only') }}
</x-ui.checkbox>
</div>
<button type="submit" class="sr-only">{{ __('storefront.shop.apply') }}</button>
</form>
</aside>
</div>
@endif
</section>
@endsection
@@ -0,0 +1,3 @@
<p>Hi,</p>
<p>Payment of <strong>{{ $amount }}</strong> for your order <strong>{{ $reference }}</strong> has been captured.</p>
@@ -0,0 +1,3 @@
<p>Hi,</p>
<p>Good news — your order <strong>{{ $reference }}</strong> has been delivered.</p>
@@ -0,0 +1,3 @@
<p>Hi,</p>
<p>A refund of <strong>{{ $amount }}</strong> has been issued for your order <strong>{{ $reference }}</strong>.</p>
@@ -0,0 +1,3 @@
<p>Hi,</p>
<p>Your order <strong>{{ $reference }}</strong> is now: <strong>{{ $statusLabel }}</strong></p>