@extends('frontend.layouts.template') @section('stylesheet') @endsection @section('content')
@if( $carts ) @foreach( $carts as $cart ) @php $total += $cart->price * $cart->quantity; $shipping_price += $cart->shipping_price; $product_weight = $cart->product->weight * $cart->quantity; @endphp @endforeach @endif
  {{ trans('label.product') }} {{ trans('label.price') }} {{ trans('label.quantity') }} {{ trans('label.total') }} {{ trans('label.remove') }}
{{ $cart->product_name }} {{ $cart->product_name }} ฿{{ nb( $cart->price ,2 )}}
฿{{ nb( $cart->price * $cart->quantity, 2 )}}
{{-- @if(auth()->check() && auth()->user()->level == 'staff')
@if( $cartHead && !$cartHead->event_code )
@endif
@endif --}}
@if (count($carts) > 0 ) @endif
{{ trans('label.cart_totals') }}
@php if( $total == 0 ) $shipping_price = 0; @endphp @if ( auth()->check() && auth()->user()->level == 'staff' && auth()->user()->login_type != 'staff-event' ) @php $discount = $total * 10 / 100; $total = $total - $discount; @endphp @endif
{{ trans('label.staff_discount') }} {{ nb( $discount,2) }}
{{ trans('label.cart_subtotal') }} ฿{{ nb($total,2) }}
{{ trans('label.shipping') }} ฿{{ nb( $shipping_price, 2 ) }}
{{ trans('label.total_price') }} ฿{{ nb( $total + $shipping_price ,2 ) }}
{{ trans('label.shipping_remark') }}
@if (count($carts) > 0 ) {{ trans('label.proceed_to_checkout') }} @endif
@endsection @section('javascript') @endsection