diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index fcfd9cb..3dee436 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -87,6 +87,9 @@ php artisan db:seed --class="Modules\Core\Localization\Database\Seeders\Validati echo "[entrypoint] Seeding checkout translations..." php artisan db:seed --class="Modules\Core\Checkout\Database\Seeders\CheckoutTranslationsSeeder" --force --quiet || true +echo "[entrypoint] Seeding storefront translations..." +php artisan db:seed --class="Modules\Core\Localization\Database\Seeders\StorefrontTranslationsSeeder" --force --quiet || true + # Upserts by primary key (no --refresh), so this stays cheap and idempotent on # every boot rather than flushing and rebuilding the whole index each time. Runs # in production too — a deploy that changed an indexer's field list needs this diff --git a/lang/vendor/lunarpanel.shipping/el/relationmanagers.php b/lang/vendor/lunarpanel.shipping/el/relationmanagers.php new file mode 100644 index 0000000..b26f38c --- /dev/null +++ b/lang/vendor/lunarpanel.shipping/el/relationmanagers.php @@ -0,0 +1,18 @@ + [ + 'notices' => [ + 'prices_inc_tax' => 'Όλες οι τιμές περιλαμβάνουν ΦΠΑ, το οποίο θα ληφθεί υπόψη στον υπολογισμό της ελάχιστης αξίας παραγγελίας.', + ], + ], +]; diff --git a/lang/vendor/lunarpanel.shipping/en/relationmanagers.php b/lang/vendor/lunarpanel.shipping/en/relationmanagers.php new file mode 100644 index 0000000..4493074 --- /dev/null +++ b/lang/vendor/lunarpanel.shipping/en/relationmanagers.php @@ -0,0 +1,19 @@ + [ + 'notices' => [ + 'prices_inc_tax' => 'All prices include tax, which will be considered when calculating minimum spend.', + ], + ], +]; diff --git a/resources/views/vendor/core/order/notifications/placed.blade.php b/resources/views/vendor/core/order/notifications/placed.blade.php index 557b06f..f4c673b 100644 --- a/resources/views/vendor/core/order/notifications/placed.blade.php +++ b/resources/views/vendor/core/order/notifications/placed.blade.php @@ -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;"; diff --git a/resources/views/vendor/core/order/notifications/status-updated.blade.php b/resources/views/vendor/core/order/notifications/status-updated.blade.php index 74254b6..c6d0a4c 100644 --- a/resources/views/vendor/core/order/notifications/status-updated.blade.php +++ b/resources/views/vendor/core/order/notifications/status-updated.blade.php @@ -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 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 @@ Η παραγγελία σου ενημερώθηκε -

Η κατάσταση της παραγγελίας σου #{{ $reference }} είναι τώρα:

+

Η κατάσταση της παραγγελίας σου #{{ $reference }} είναι τώρα:

@include('emails.partials.button', [ 'url' => route('account.orders', ['locale' => 'el']),