generated from boboko/starter
125 lines
5.5 KiB
PHP
125 lines
5.5 KiB
PHP
{{--
|
|
Order confirmation. Reached only via a session flash of the placed order id
|
|
(CheckoutController::confirmation) — not deep-linkable. $order is a
|
|
Lunar\Models\Order with lines + shipping/billing addresses eager-loaded.
|
|
--}}
|
|
@extends('layouts.app')
|
|
|
|
@section('title', __('checkout.page.confirmation_title') . ' — ' . config('app.name'))
|
|
|
|
@section('content')
|
|
<div class="bbk-confirmation">
|
|
<h1 class="bbk-confirmation-heading">{{ __('checkout.page.confirmation_heading') }}</h1>
|
|
|
|
<dl class="bbk-confirmation-meta">
|
|
<div class="bbk-confirmation-meta-row">
|
|
<dt>{{ __('checkout.page.confirmation_order_number') }}</dt>
|
|
<dd>{{ $order->reference }}</dd>
|
|
</div>
|
|
|
|
@if ($order->billingAddress?->contact_email)
|
|
<div class="bbk-confirmation-meta-row">
|
|
<dt>{{ __('checkout.page.email_label') }}</dt>
|
|
<dd>{{ $order->billingAddress->contact_email }}</dd>
|
|
</div>
|
|
@endif
|
|
|
|
@if ($paymentMethodName)
|
|
<div class="bbk-confirmation-meta-row">
|
|
<dt>{{ __('checkout.page.payment_heading') }}</dt>
|
|
<dd>{{ $paymentMethodName }}</dd>
|
|
</div>
|
|
@endif
|
|
|
|
@if ($shippingLine = $order->lines->firstWhere('type', 'shipping'))
|
|
<div class="bbk-confirmation-meta-row">
|
|
<dt>{{ __('checkout.page.shipping_method_heading') }}</dt>
|
|
<dd>{{ $shippingLine->description }}</dd>
|
|
</div>
|
|
@endif
|
|
</dl>
|
|
|
|
<p class="bbk-checkout-note">{{ __('checkout.page.confirmation_email_note') }}</p>
|
|
|
|
<div class="bbk-confirmation-body">
|
|
<div class="bbk-confirmation-lines">
|
|
@foreach ($order->lines->where('type', '!=', 'shipping') as $line)
|
|
<div class="bbk-confirmation-line">
|
|
<div class="bbk-cart-item-media">
|
|
@if ($thumb = $line->purchasable?->getThumbnailImage())
|
|
<img src="{{ $thumb }}" alt="{{ $line->description }}" width="72" height="72" loading="lazy">
|
|
@endif
|
|
</div>
|
|
|
|
<div class="bbk-confirmation-line-detail">
|
|
<span class="bbk-confirmation-line-name">
|
|
{{ $line->description }}
|
|
<span class="bbk-confirmation-line-qty">× {{ $line->quantity }}</span>
|
|
</span>
|
|
|
|
@if ($line->option)
|
|
<p class="bbk-cart-item-variant">{{ $line->option }}</p>
|
|
@endif
|
|
|
|
@include('checkout::partials.line-custom-fields', ['line' => $line])
|
|
</div>
|
|
|
|
<span class="bbk-confirmation-line-total">{{ $line->sub_total?->formatted() }}</span>
|
|
</div>
|
|
@endforeach
|
|
|
|
<div class="bbk-cart-summary">
|
|
<div class="bbk-cart-summary-row">
|
|
<span>{{ __('checkout.cart.subtotal') }}</span>
|
|
<span>{{ $order->sub_total?->formatted() }}</span>
|
|
</div>
|
|
|
|
@if ($order->discount_total?->value > 0)
|
|
<div class="bbk-cart-summary-row bbk-cart-summary-row--discount">
|
|
<span>{{ __('checkout.cart.discount') }}</span>
|
|
<span>−{{ $order->discount_total->formatted() }}</span>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="bbk-cart-summary-row">
|
|
<span>{{ __('checkout.cart.shipping') }}</span>
|
|
<span>{{ $order->shipping_total?->formatted() }}</span>
|
|
</div>
|
|
|
|
@if ($order->tax_total?->value > 0)
|
|
<div class="bbk-cart-summary-row">
|
|
<span>{{ __('checkout.cart.tax') }}</span>
|
|
<span>{{ $order->tax_total->formatted() }}</span>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="bbk-cart-summary-row bbk-cart-summary-row--total">
|
|
<span>{{ __('checkout.cart.total') }}</span>
|
|
<span>{{ $order->total?->formatted() }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bbk-confirmation-addresses">
|
|
@if ($order->shippingAddress)
|
|
<div class="bbk-confirmation-address">
|
|
<h2 class="bbk-confirmation-address-heading">{{ __('checkout.page.confirmation_shipping_to') }}</h2>
|
|
<x-checkout::address-lines :address="$order->shippingAddress" />
|
|
</div>
|
|
@endif
|
|
|
|
@if ($order->billingAddress)
|
|
<div class="bbk-confirmation-address">
|
|
<h2 class="bbk-confirmation-address-heading">{{ __('checkout.page.confirmation_billing') }}</h2>
|
|
<x-checkout::address-lines :address="$order->billingAddress" />
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<a class="bbk-checkout-continue bbk-confirmation-continue" href="{{ route('products', app()->getLocale()) }}">
|
|
{{ __('checkout.page.confirmation_continue') }}
|
|
</a>
|
|
</div>
|
|
@endsection
|