@@ -3,21 +3,21 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Корзина', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Корзина'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Товары в корзине</h2>
|
||||
<h2>{{ __('Товары в корзине') }}</h2>
|
||||
</div>
|
||||
|
||||
@if ($items->isEmpty())
|
||||
<div class="pc-card">
|
||||
<h3>Корзина пустая</h3>
|
||||
<p>Добавьте товары из каталога, чтобы оформить заказ.</p>
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Перейти в каталог</a>
|
||||
<h3>{{ __('Корзина пустая') }}</h3>
|
||||
<p>{{ __('Добавьте товары из каталога, чтобы оформить заказ.') }}</p>
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
|
||||
</div>
|
||||
@else
|
||||
<div class="pc-cart-layout">
|
||||
@@ -38,13 +38,13 @@
|
||||
@csrf
|
||||
@method('patch')
|
||||
<input type="number" name="quantity" min="1" max="{{ max(1, $product->stock) }}" value="{{ $item['quantity'] }}">
|
||||
<button class="pc-btn ghost" type="submit">Обновить</button>
|
||||
<button class="pc-btn ghost" type="submit">{{ __('Обновить') }}</button>
|
||||
</form>
|
||||
<strong class="pc-cart-subtotal">{{ number_format($item['subtotal'], 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
<form method="post" action="{{ route('cart.remove', $product) }}" data-preserve-scroll="true">
|
||||
@csrf
|
||||
@method('delete')
|
||||
<button class="pc-btn ghost" type="submit">Удалить</button>
|
||||
<button class="pc-btn ghost" type="submit">{{ __('Удалить') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</article>
|
||||
@@ -52,16 +52,16 @@
|
||||
</div>
|
||||
|
||||
<aside class="pc-card pc-cart-summary">
|
||||
<h3>Итого</h3>
|
||||
<h3>{{ __('Итого') }}</h3>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Товаров</span>
|
||||
<span>{{ __('Товаров') }}</span>
|
||||
<strong>{{ $itemsCount }}</strong>
|
||||
</div>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Сумма</span>
|
||||
<span>{{ __('Сумма') }}</span>
|
||||
<strong>{{ number_format($total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</div>
|
||||
<a class="pc-btn primary" href="{{ route('checkout.show') }}">Перейти к оформлению</a>
|
||||
<a class="pc-btn primary" href="{{ route('checkout.show') }}">{{ __('Перейти к оформлению') }}</a>
|
||||
</aside>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user