generated from boboko/starter
Feat: Updating entrypoint and missing lunar translations!
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
{{--
|
||||
Order confirmation (boboko-core's OrderPlacedNotification).
|
||||
|
||||
Core only passes $reference, $total and $lines, so the order itself is
|
||||
reached through a line (every OrderLine belongs to it). Interim until core
|
||||
passes the Order to this view.
|
||||
|
||||
Sent from the queue with no locale of its own, so it always renders in the
|
||||
app default (Greek). Copy is Greek on purpose, like the other core emails.
|
||||
Copy is hardcoded Greek regardless of the order's own saved locale
|
||||
(Order.meta['locale'], set at checkout) — the notification is still sent
|
||||
with ->locale() so subject/wrapper text picks it up, but this view's own
|
||||
prose isn't translated per-locale yet.
|
||||
--}}
|
||||
@extends('emails.layout')
|
||||
|
||||
@php
|
||||
$order = $lines->first()->order;
|
||||
$productLines = $lines->where('type', '!=', 'shipping');
|
||||
$shippingLine = $lines->firstWhere('type', 'shipping');
|
||||
|
||||
@@ -21,15 +18,18 @@
|
||||
->first()
|
||||
?->translate('name');
|
||||
|
||||
// Lunar doesn't copy the coupon onto the order; the cart row keeps it.
|
||||
$couponCode = $order->cart?->coupon_code;
|
||||
// Copied onto Order.meta at checkout (CheckoutService::initiatePayment()),
|
||||
// rather than read from the cart row — the cart may since have been
|
||||
// cleared/reused, but the order's own record of what coupon it was
|
||||
// placed with must stay fixed.
|
||||
$couponCode = $order->meta['coupon_code'] ?? null;
|
||||
|
||||
$email = $order->billingAddress?->contact_email ?? $order->shippingAddress?->contact_email;
|
||||
$comments = $order->shippingAddress?->delivery_instructions;
|
||||
|
||||
// Sanitized HTML from Store Details, only for bank transfer orders.
|
||||
$bankTransferInstructions = app(\Modules\Core\Store\Services\StoreDetailsService::class)
|
||||
->bankTransferInstructionsFor($order, 'el');
|
||||
->bankTransferInstructionsFor($order, $order->meta['locale'] ?? 'el');
|
||||
|
||||
$muted = 'color:#5c5c5c;font-size:14px;';
|
||||
$font = "font-family:'Manrope',Arial,Helvetica,sans-serif;";
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
{{-- Core passes only the order reference here (and the amount for payment emails). Greek on purpose: sent from the queue in the app default locale. --}}
|
||||
{{-- Greek on purpose: sent from the queue in the app default locale. --}}
|
||||
@extends('emails.layout')
|
||||
|
||||
@php
|
||||
// Core passes Lunar's English label; map it back to the status key so the
|
||||
// shared <x-order-status> can show the translated one. Interim, until core
|
||||
// passes the order (or its status) to this view.
|
||||
$status = collect(config('lunar.orders.statuses'))
|
||||
->search(fn (array $config) => $config['label'] === $statusLabel) ?: $statusLabel;
|
||||
@endphp
|
||||
|
||||
@section('title', "Ενημέρωση παραγγελίας")
|
||||
|
||||
@section('preheader', "Η παραγγελία σου #{$reference} ενημερώθηκε.")
|
||||
@@ -18,7 +10,7 @@
|
||||
Η παραγγελία σου ενημερώθηκε
|
||||
</h1>
|
||||
|
||||
<p style="margin:0 0 32px;">Η κατάσταση της παραγγελίας σου <strong>#{{ $reference }}</strong> είναι τώρα: <strong><x-order-status :status="$status" /></strong></p>
|
||||
<p style="margin:0 0 32px;">Η κατάσταση της παραγγελίας σου <strong>#{{ $reference }}</strong> είναι τώρα: <strong><x-order-status :status="$order->status" /></strong></p>
|
||||
|
||||
@include('emails.partials.button', [
|
||||
'url' => route('account.orders', ['locale' => 'el']),
|
||||
|
||||
Reference in New Issue
Block a user