@extends('base') @section('title', 'Shopping Bag') @section('content') @include('common.no_cache') @php use App\Order; use App\Enumerables\Currency; use Illuminate\Support\Facades\Auth; /** * @var Order $order * @var array $orderItems */ if (isset($order['currency'])) { $currency = Currency::CURRENCY_SIGN[$order['currency']] . ' '; } else { $cookieCurrency = $_COOKIE['currency']; $currency = Currency::CURRENCY_SIGN[ array_key_exists($cookieCurrency, Currency::CURRENCY_SIGN) ? $cookieCurrency : Currency::CNY ]; } $orderItemsCount = count($orderItems); $orderTotal = $order['total'] - $order['orderRefund']; $discountTotal = $order['eventDiscounts'] + $order['discountTotal']; $lang = config('app.locale'); $user = Auth::user(); @endphp
{{__("Payment")}}
{{__('Choose payment type')}} @if($order['currency'] == \App\Enumerables\Currency::GBP)
{{__('Pay with')}}
@if(count($billings) > 0) @foreach($billings as $billing)
{{__('verified')}}
@endforeach
{{__('You have no saved billing addresses')}}
{{__('Please add an address before creating a new payment')}}
@else
{{__('You have no saved billing addresses')}}
{{__('Please add an address before creating a new payment')}}
@endif
{{"+ "}}{{ __('Add a new billing address') }}
{{"x "}}{{ __('Remove this Address') }}
{{ csrf_field() }}
{{__('what is this?')}}
{{__('By clicking PAY NOW you confirm that you have read')}}
{{__('understood and accepted the')}} {{__('order T&Cs')}} {{__('and')}} {{__('Privacy Policy')}} {{"*"}}
@endif
@if($order['currency'] == \App\Enumerables\Currency::GBP)
{{__('Pay with')}}
@else
{{__('Pay with')}}
{{__('Pay with')}} @if(\Illuminate\Support\Facades\Config::get('app.locale') == 'en') @else @endif
@endif
{{__('Order Summary')}} {{__('payment-total')}}{{": "}} {{$currency . number_format($orderTotal, 2)}} @if($discountTotal > 0) {{__('payment-discount')}}{{": "}} -{{$currency . number_format($discountTotal, 2)}} @endif {{__('Total')}}{{": "}} {{$currency . number_format($orderTotal - $discountTotal, 2)}}
{{$orderItemsCount}} @if($orderItemsCount == 1) {{__('item')}} @else {{__('items')}} @endif
@php use App\OrderItems; /** * @var OrderItems $item */ @endphp @foreach($orderItems as $item) @php $product = $item->getProductModel(); $itemImage = $product->productImage($lang, $item); $title = $product->title($lang, $item); $subtitle = $product->subtitle($lang, $item); $originalPrice = $currency.number_format($item->toPayWithoutDiscount(), 2, ".", ","); $currentPrice = $currency.number_format($item->toPayTotal(), 2, ".", ",") @endphp
{{$title}} {{$subtitle}}
@if($currentPrice != $originalPrice) {{$originalPrice}} {{$currentPrice}} @else {{$currentPrice}} @endif
@endforeach
@if($order['currency'] == \App\Enumerables\Currency::GBP) @include('order.modals.gbp_modals') @endif @if($order['currency'] != \App\Enumerables\Currency::GBP) @endif @if($order['currency'] == \App\Enumerables\Currency::GBP) @endif {{--start of wechat paymenent handling--}} @if($order['currency'] != \App\Enumerables\Currency::GBP) @endif {{--end of wechat paymenent handling--}} @endsection @section('document_ready_scripts') $('.ui.checkbox').checkbox(); @endsection