@extends('layouts.admin') @section('styles') @endsection @section('content')
@include('alerts.admin.form-both') @include('alerts.form-success')

{{ __('Order Details') }}

@if($order->shipping_title != null && $order->is_shipping == 0) @endif @if($order->shipping_cost != 0) @endif @if($order->tax != 0) @endif @if($order->packing_title != null && $order->is_shipping == 0) @endif @if($order->packing_cost != 0) @endif @if($order->wallet_price != 0) @if($order->method != "Wallet") @endif @endif @if($order->method != "Cash On Delivery" && $order->method != "Wallet") @if($order->method=="Stripe") @endif @endif @if($order->payment_status == 'Pending') {{__('Unpaid')}} @else {{__('Paid')}} @endif @if(!empty($order->order_note)) @endif
{{ __('Order ID') }} : {{$order->order_number}}
{{ __('Total Product') }} : {{$order->totalQty}}
{{ __('Shipping Method') }} : {{ $order->shipping_title }}
{{ __('Shipping Cost') }} : {{ \PriceHelper::showOrderCurrencyPrice($order->shipping_cost,$order->currency_sign) }}
{{ __('Tax :') }} : {{ \PriceHelper::showOrderCurrencyPrice((($order->tax) / $order->currency_value),$order->currency_sign) }}
{{ __('Packaging Method') }} : {{ $order->packing_title }}
{{ __('Packaging Cost') }} : {{ \PriceHelper::showOrderCurrencyPrice($order->packing_cost,$order->currency_sign) }}
{{ __('Paid From Wallet') }} : {{ \PriceHelper::showOrderCurrencyPrice(($order->wallet_price * $order->currency_value),$order->currency_sign) }}
{{$order->method}} : {{ \PriceHelper::showOrderCurrencyPrice(($order->pay_amount * $order->currency_value),$order->currency_sign) }}
{{ __('Total Cost') }} : {{ \PriceHelper::showOrderCurrencyPrice((($order->pay_amount + $order->wallet_price) * $order->currency_value),$order->currency_sign) }}
{{ __('Ordered Date') }} : {{date('d-M-Y H:i:s a',strtotime($order->created_at))}}
{{ __('Payment Method') }} : {{$order->method}}
{{$order->method}} {{ __('Charge ID') }} : {{$order->charge_id}}
{{$order->method}} {{ __('Transaction ID') }} : {{$order->txnid}}
{{ __('Payment Status') }} :{{ __('Order Note') }} : {{$order->order_note}}

{{ __('Billing Details') }} {{ __("Edit") }}

@if($order->customer_state != null) @endif @if($order->coupon_code != null) @endif @if($order->coupon_discount != null) @if($gs->currency_format == 0) @else @endif @endif @if($order->affilate_user != null) @endif @if($order->affilate_charge != null) @endif
{{ __('Name') }} : {{$order->customer_name}}
{{ __('Email') }} : {{$order->customer_email}}
{{ __('Phone') }} : {{$order->customer_phone}}
{{ __('Address') }} : {{$order->customer_address}}
{{ __('Country') }} : {{$order->customer_country}}
{{ __('State') }} : {{$order->customer_state}}
{{ __('City') }} : {{$order->customer_city}}
{{ __('Postal Code') }} : {{$order->customer_zip}}
{{ __('Coupon Code') }} : {{$order->coupon_code}}
{{ __('Coupon Discount') }} :{{ $order->currency_sign }}{{ $order->coupon_discount }}{{ $order->coupon_discount }}{{ $order->currency_sign }}
{{ __('Affilate User') }} : @if( App\Models\User::where('id', $order->affilate_user)->exists() ) {{ App\Models\User::where('id', $order->affilate_user)->first()->name }} @else {{ __('Deleted') }} @endif
{{ __('Affilate Charge') }} : {{ \PriceHelper::showOrderCurrencyPrice(($order->affilate_charge * $order->currency_value),$order->currency_sign) }}
@if($order->dp == 0)

{{ __('Shipping Details') }} {{ __("Edit") }}

@if($order->shipping == "pickup") @else @endif
{{ __('Pickup Location') }}: : {{$order->pickup_location}}
{{ __('Name') }}: : {{$order->shipping_name == null ? $order->customer_name : $order->shipping_name}}
{{ __('Email') }}: : {{$order->shipping_email == null ? $order->customer_email : $order->shipping_email}}
{{ __('Phone') }}: : {{$order->shipping_phone == null ? $order->customer_phone : $order->shipping_phone}}
{{ __('Address') }}: : {{$order->shipping_address == null ? $order->customer_address : $order->shipping_address}}
{{ __('Country') }}: : {{$order->shipping_country == null ? $order->customer_country : $order->shipping_country}}
{{ __('State') }} : {{$order->shipping_state == null ? $order->customer_state: $order->shipping_state }}
{{ __('City') }}: : {{$order->shipping_city == null ? $order->customer_city : $order->shipping_city}}
{{ __('Postal Code') }}: : {{$order->shipping_zip == null ? $order->customer_zip : $order->shipping_zip}}
@endif
@php foreach ($cart['items'] as $key => $item) { $userId = $item["user_id"]; if (!isset($resultArray[$userId])) { $resultArray[$userId] = []; } $resultArray[$userId][$key] = $item; } @endphp
@foreach($resultArray as $key1 => $productt) @php if($key1 == 0){ $vendor = App\Models\Admin::find(1); }else{ $vendor = App\Models\User::find($key1); } @endphp

{{ __("Add Product") }} {{ __('Products Ordered By') }} - {{$vendor->shop_name}}

@php $vendor_total = 0; @endphp @foreach ($productt as $itemKey => $product) @php $vendor_total += $product['price']; @endphp @endforeach @php $order_shipping = @json_decode($order->vendor_shipping_id, true); $order_package = @json_decode($order->vendor_packing_id, true); $vendor_shipping_id = @$order_shipping[$key1]; $vendor_package_id = @$order_package[$key1]; if($vendor_shipping_id){ $shipping = App\Models\Shipping::findOrFail($vendor_shipping_id); }else{ $shipping = []; } if($vendor_package_id){ $package = App\Models\Package::findOrFail($vendor_package_id); }else{ $package = []; } @endphp
{{ __('Product ID#') }} {{ __('Shop Name') }} {{ __('Vendor Status') }} {{ __('Product Title') }} {{ __('Details') }} {{ __('Total Price') }} {{ __('Action') }}
{{ $product['item']['id'] }} @if($product['item']['user_id'] != 0) @php $user = App\Models\User::find($product['item']['user_id']); @endphp @if(isset($user)) {{$user->shop_name}} @else {{ __('Vendor Removed') }} @endif @else {{ App\Models\Admin::find(1)->shop_name }} @endif @if($product['item']['user_id'] != 0) @php $user = App\Models\VendorOrder::where('order_id','=',$order->id)->where('user_id','=',$product['item']['user_id'])->first(); @endphp @if($order->dp == 1 && $order->payment_status == 'Completed') {{ __('Completed') }} @else @if($user->status == 'pending') {{ucwords($user->status)}} @elseif($user->status == 'processing') {{ucwords($user->status)}} @elseif($user->status == 'on delivery') {{ucwords($user->status)}} @elseif($user->status == 'completed') {{ucwords($user->status)}} @elseif($user->status == 'declined') {{ucwords($user->status)}} @endif @endif @endif @if($product['item']['user_id'] != 0) @php $user = App\Models\User::find($product['item']['user_id']); @endphp @if(isset($user)) {{mb_strlen($product['item']['name'],'utf-8') > 30 ? mb_substr($product['item']['name'],0,30,'utf-8').'...' : $product['item']['name']}} @else {{mb_strlen($product['item']['name'],'utf-8') > 30 ? mb_substr($product['item']['name'],0,30,'utf-8').'...' : $product['item']['name']}} @endif @else {{mb_strlen($product['item']['name'],'utf-8') > 30 ? mb_substr($product['item']['name'],0,30,'utf-8').'...' : $product['item']['name']}} @endif @if($product['license'] != '') {{ __('View License') }} @endif @if($product['affilate_user'] != 0)

{{ __('Referral User') }} : {{ \App\Models\User::find($product['affilate_user'])->name }}

@endif
@if($product['size'])

{{ __('Size') }} : {{str_replace('-',' ',$product['size'])}}

@endif @if($product['color'])

{{ __('color') }} :

@endif

{{ __('Price') }} : {{ \PriceHelper::showCurrencyPrice(($product['item_price'] ) * $order->currency_value) }}

{{ __('Qty') }} : {{$product['qty']}} {{ $product['item']['measure'] }}

@if(!empty($product['keys'])) @foreach( array_combine(explode(',', $product['keys']), explode(',', $product['values'])) as $key => $value)

{{ ucwords(str_replace('_', ' ', $key)) }} : {{ $value }}

@endforeach @endif
{{ \PriceHelper::showCurrencyPrice($product['price'] * $order->currency_value) }} {{ $product['discount'] == 0 ? '' : '('.$product['discount'].'% '.__('Off').')' }}
@if (App\Models\Product::whereId($product['item']['id'])->exists()) {{ __("Edit") }} @endif
@if ($shipping)

{{ __('Shipping Method') }} : {{$shipping->title}} | {{ \PriceHelper::showCurrencyPrice($shipping->price * $order->currency_value) }}

@endif @if ($package)

{{ __('Packaging Method') }} : {{$package->title}} | {{ \PriceHelper::showCurrencyPrice($package->price * $order->currency_value) }}

@endif

{{ __('Total Amount') }} : {{ \PriceHelper::showCurrencyPrice(($vendor_total + @$shipping->price + @$package->price ) * $order->currency_value )}}

@endforeach
{{-- LICENSE MODAL --}} {{-- LICENSE MODAL ENDS --}} {{-- BILLING DETAILS EDIT MODAL --}} @include('admin.order.partials.billing-details') {{-- BILLING DETAILS MODAL ENDS --}} {{-- SHIPPING DETAILS EDIT MODAL --}} @include('admin.order.partials.shipping-details') {{-- SHIPPING DETAILS MODAL ENDS --}} {{-- ADD PRODUCT MODAL --}} @include('admin.order.partials.add-product') {{-- ADD PRODUCT MODAL ENDS --}} {{-- EDIT PRODUCT MODAL --}} {{-- EDIT PRODUCT MODAL ENDS --}} {{-- DELETE PRODUCT MODAL --}} {{-- DELETE PRODUCT MODAL ENDS --}} {{-- MESSAGE MODAL --}}
{{-- MESSAGE MODAL ENDS --}} {{-- ORDER MODAL --}} {{-- ORDER MODAL ENDS --}} @endsection @section('scripts') @endsection