generated from boboko/starter
Feat: Adding Order reference to views
This commit is contained in:
@@ -29,6 +29,9 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@foreach ($orders as $order)
|
@foreach ($orders as $order)
|
||||||
|
@php
|
||||||
|
$orderReference = \Modules\Core\Order\Support\OrderReferenceDisplay::resolve($order);
|
||||||
|
@endphp
|
||||||
<li class="grid grid-cols-2 gap-x-6 gap-y-2 border-b border-black py-5 sm:grid-cols-[1fr_1fr_1.5fr_1fr_auto] sm:items-center">
|
<li class="grid grid-cols-2 gap-x-6 gap-y-2 border-b border-black py-5 sm:grid-cols-[1fr_1fr_1.5fr_1fr_auto] sm:items-center">
|
||||||
<span>
|
<span>
|
||||||
<span class="sr-only">{{ __('storefront.orders.date') }}:</span>
|
<span class="sr-only">{{ __('storefront.orders.date') }}:</span>
|
||||||
@@ -36,7 +39,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="text-right font-bold sm:text-left">
|
<span class="text-right font-bold sm:text-left">
|
||||||
<span class="sr-only">{{ __('storefront.orders.number') }}:</span>
|
<span class="sr-only">{{ __('storefront.orders.number') }}:</span>
|
||||||
#{{ $order->reference }}
|
#{{ $orderReference }}
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<span class="sr-only">{{ __('storefront.orders.status') }}:</span>
|
<span class="sr-only">{{ __('storefront.orders.status') }}:</span>
|
||||||
@@ -49,7 +52,7 @@
|
|||||||
<a
|
<a
|
||||||
href="{{ route('account.orders.show', ['orderId' => $order->id]) }}"
|
href="{{ route('account.orders.show', ['orderId' => $order->id]) }}"
|
||||||
class="col-span-2 mt-2 inline-flex w-24 items-center gap-2 font-bold underline hover:no-underline sm:col-span-1 sm:mt-0"
|
class="col-span-2 mt-2 inline-flex w-24 items-center gap-2 font-bold underline hover:no-underline sm:col-span-1 sm:mt-0"
|
||||||
aria-label="{{ __('storefront.orders.view_order', ['number' => $order->reference]) }}"
|
aria-label="{{ __('storefront.orders.view_order', ['number' => $orderReference]) }}"
|
||||||
>
|
>
|
||||||
{{ __('storefront.orders.view') }}
|
{{ __('storefront.orders.view') }}
|
||||||
<x-ui.icon name="arrow-right" :size="16" />
|
<x-ui.icon name="arrow-right" :size="16" />
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
@extends('layouts.account')
|
@extends('layouts.account')
|
||||||
|
|
||||||
@section('title', __('storefront.orders.order_title', ['number' => $order->reference]))
|
@php
|
||||||
|
$orderReference = \Modules\Core\Order\Support\OrderReferenceDisplay::resolve($order);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@section('title', __('storefront.orders.order_title', ['number' => $orderReference]))
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$productLines = $order->lines->where('type', '!=', 'shipping');
|
$productLines = $order->lines->where('type', '!=', 'shipping');
|
||||||
@@ -18,7 +22,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<h1 class="font-display text-h3 font-black tracking-tight sm:text-h2">
|
<h1 class="font-display text-h3 font-black tracking-tight sm:text-h2">
|
||||||
{{ __('storefront.orders.order_title', ['number' => $order->reference]) }}
|
{{ __('storefront.orders.order_title', ['number' => $orderReference]) }}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user