@php /* $layout_page = shop_cart $cart: no paginate $shippingMethod: string $paymentMethod: string $dataTotal: array $shippingAddress: array $attributesGroup: array $products: paginate Use paginate: $products->appends(request()->except(['page','_token']))->links() */ @endphp @extends($sc_templatePath.'.layout') @section('block_main') @if (count($cart) ==0) {!! trans('cart.cart_empty') !!} @else No. {{ trans('product.sku') }} {{ trans('product.name') }} {{ trans('product.price') }} {{ trans('product.quantity') }} {{ trans('product.total_price') }} @foreach($cart as $item) @php $n = (isset($n)?$n:0); $n++; $product = $modelProduct->start()->getDetail($item->id, null, $item->storeId); @endphp {{-- Render product in cart --}} {{ $n }} {{ $product->sku }} {{ $product->name }} {{-- Process attributes --}} @if ($item->options->count()) ( @foreach ($item->options as $keyAtt => $att) {{ $attributesGroup[$keyAtt] }}: {!! sc_render_option_price($att) !!} @endforeach ) @endif {{-- //end Process attributes --}} {!! $product->showPrice() !!} {{$item->qty}} {{sc_currency_render($item->subtotal)}} {{--// Render product in cart --}} @endforeach {{-- Required csrf for secirity --}} @csrf {{--// Required csrf for secirity --}} {{-- Display address --}} {{ trans('cart.shipping_address') }}: {{ trans('cart.name') }}: {{ $shippingAddress['first_name'] }} {{ $shippingAddress['last_name'] }} @if (sc_config('customer_name_kana')) {{ trans('cart.name_kana') }}: {{ $shippingAddress['first_name_kana'].$shippingAddress['last_name_kana'] }} @endif @if (sc_config('customer_phone')) {{ trans('cart.phone') }}: {{ $shippingAddress['phone'] }} @endif {{ trans('cart.email') }}: {{ $shippingAddress['email'] }} {{ trans('cart.address') }}: {{ $shippingAddress['address1'].' '.$shippingAddress['address2'].','.$shippingAddress['country'] }} @if (sc_config('customer_postcode')) {{ trans('cart.postcode') }}: {{ $shippingAddress['postcode']}} @endif @if (sc_config('customer_company')) {{ trans('cart.company') }}: {{ $shippingAddress['company']}} @endif {{ trans('cart.note') }}: {{ $shippingAddress['comment'] }} {{--// Display address --}} {{-- Total --}} @foreach ($dataTotal as $key => $element) @if ($element['code']=='total') {!! $element['title'] !!} {{$element['text'] }} @elseif($element['value'] !=0) {!! $element['title'] !!} {{$element['text'] }} @elseif($element['code'] =='shipping') {!! $element['title'] !!} {{$element['text'] }} @endif @endforeach {{-- Payment method --}} {{ trans('cart.payment_method') }}: {{-- //Payment method --}} {{-- End total --}} {{-- Button process cart --}} {{ trans('cart.back_to_cart') }} {{ trans('cart.confirm') }} {{--// Button process cart --}} @endif @endsection {{-- breadcrumb --}} @section('breadcrumb') @endsection {{-- //breadcrumb --}} @push('scripts') {{-- Your scripts --}} @endpush @push('styles') {{-- Your css style --}} @endpush