@php /* $layout_page = shop_cart $cart: no paginate $shippingMethod: string $paymentMethod: string $totalMethod: array $dataTotal: array $shippingAddress: array $countries: array $attributesGroup: array */ @endphp @extends($sc_templatePath.'.layout') @section('block_main')
@if (count($cart) ==0)
{!! trans('cart.cart_empty') !!}!
@else {{-- Item cart detail --}}
@foreach($cart as $item) @php $n = (isset($n)?$n:0); $n++; // Check product in cart $product = $modelProduct->start()->getDetail($item->id, null, $item->storeId); if(!$product) { continue; } // End check product in cart @endphp @endforeach
No. {{ trans('product.sku') }} {{ trans('product.name') }} {{ trans('product.price') }} {{ trans('product.quantity') }} {{ trans('product.total_price') }}
{{ $n }} {{ $product->sku }} {{ $product->name }} {{ $product->name }}
{{-- Process attributes --}} @if ($item->options->count()) @foreach ($item->options as $groupAtt => $att) {{ $attributesGroup[$groupAtt] }}: {!! sc_render_option_price($att) !!} @endforeach @endif {{-- //end Process attributes --}}
{!! $product->showPrice() !!}
@if (session('arrErrorQty')[$product->id] ?? 0)
{{ trans('cart.minimum_value', ['value' => session('arrErrorQty')[$product->id]]) }}
@endif
{{sc_currency_render($item->subtotal)}} $item->rowId]) }}">
{{-- //Item cart detail --}} {{-- Button backshop, clear cart --}}
{{--// Button backshop, clear cart --}}
{{-- Required csrf for secirity --}} @csrf {{--// Required csrf for secirity --}}
{{-- Select address if customer login --}} @if (auth()->user())
@endif {{--// Select address if customer login --}} {{-- Render address shipping --}} @if (sc_config('customer_lastname')) @else @endif @if (sc_config('customer_name_kana')) @endif @if (sc_config('customer_phone')) @else @endif @if (sc_config('customer_country')) @endif @if (sc_config('customer_postcode')) @endif @if (sc_config('customer_company')) @endif @if (sc_config('customer_address2')) @else @if (sc_config('customer_address1')) @endif @endif
@if($errors->has('first_name')) {{ $errors->first('first_name') }} @endif @if($errors->has('last_name')) {{ $errors->first('last_name') }} @endif @if($errors->has('first_name')) {{ $errors->first('first_name') }} @endif
@if($errors->has('first_name_kana')) {{ $errors->first('first_name_kana') }} @endif @if($errors->has('last_name_kana')) {{ $errors->first('last_name_kana') }} @endif
@if($errors->has('email')) {{ $errors->first('email') }} @endif @if($errors->has('phone')) {{ $errors->first('phone') }} @endif @if($errors->has('email')) {{ $errors->first('email') }} @endif
@php $ct = old('country',$shippingAddress['country']); @endphp @if ($errors->has('country')) {{ $errors->first('country') }} @endif
@if($errors->has('postcode')) {{ $errors->first('postcode') }} @endif @if($errors->has('company')) {{ $errors->first('company') }} @endif
@if($errors->has('address1')) {{ $errors->first('address1') }} @endif @if($errors->has('address2')) {{ $errors->first('address2') }} @endif @if($errors->has('address1')) {{ $errors->first('address1') }} @endif
{{--// Render address shipping --}}
{{-- Total --}}
{{-- Data total --}} @foreach ($dataTotal as $key => $element) @if ($element['code']=='total') @elseif($element['value'] !=0) @endif @endforeach
{!! $element['title'] !!} {{$element['text'] }}
{!! $element['title'] !!} {{$element['text'] }}
{{-- Data total --}} {{-- Total method --}}
@if($errors->has('totalMethod')) {{ $errors->first('totalMethod') }} @endif
@foreach ($totalMethod as $key => $plugin) @if (view()->exists($plugin['pathPlugin'].'::render')) @include($plugin['pathPlugin'].'::render') @endif @endforeach
{{-- //Total method --}} {{-- Shipping method --}}

{{ trans('cart.shipping_method') }}:

@if($errors->has('shippingMethod')) {{ $errors->first('shippingMethod') }} @endif
@foreach ($shippingMethod as $key => $shipping)
@endforeach
{{-- //Shipping method --}} {{-- Payment method --}}

{{ trans('cart.payment_method') }}:

@if($errors->has('paymentMethod')) {{ $errors->first('paymentMethod') }} @endif
@foreach ($paymentMethod as $key => $payment)
@endforeach
{{-- //Payment method --}}
{{-- End total --}} {{-- Button checkout --}}
{!! $viewCaptcha ?? ''!!}
{{-- Button checkout --}}
@endif
@endsection {{-- breadcrumb --}} @section('breadcrumb') @endsection {{-- //breadcrumb --}} @push('scripts') @endpush @push('styles') {{-- Your css style --}} @endpush