@extends('layouts.vendor') @section('content')

@lang('Order Details')

@lang('Order Details')
@if (@App\Models\DeliveryRider::where('vendor_id', auth()->id())->where('order_id', $order->id)->first()->status == 'delivered' && $order->vendororders()->where('status', 'completed')->count() == 0) @lang('Make Complete') @endif
  • @lang('Order ID') {{ $order->order_number }}
  • @lang('Total Product') {{ $order->vendororders()->where('user_id', '=', $user->id)->sum('qty') }}
  • @php $price = $order ->vendororders() ->where('user_id', '=', $user->id) ->sum('price'); if ($order->is_shipping == 1) { $vendor_shipping = json_decode($order->vendor_shipping_id); $user_id = auth()->id(); // shipping cost $shipping_id = $vendor_shipping->$user_id; $shipping = App\Models\Shipping::findOrFail($shipping_id); if ($shipping) { $price = $price + round($shipping->price * $order->currency_value, 2); } // packaging cost $vendor_packing_id = json_decode($order->vendor_packing_id); $packing_id = $vendor_packing_id->$user_id; $packaging = App\Models\Package::findOrFail($packing_id); if ($packaging) { $price = $price + round($packaging->price * $order->currency_value, 2); } } @endphp
  • @lang('Total Cost') {{ \PriceHelper::showOrderCurrencyPrice($price * $order->currency_value, $order->currency_sign) }}
  • @if (isset($shipping))
  • @lang('Shipping Method') {{ $shipping->title }} | {{ \PriceHelper::showOrderCurrencyPrice($shipping->price * $order->currency_value, $order->currency_sign) }}
  • @endif @if (isset($packaging))
  • @lang('Packaging Method') {{ $packaging->title }} | {{ \PriceHelper::showOrderCurrencyPrice($packaging->price * $order->currency_value, $order->currency_sign) }}
  • @endif
  • @lang('Ordered Date') {{ date('d-M-Y H:i:s a', strtotime($order->created_at)) }}
  • @lang('Payment Method') {{ $order->method }}
  • @lang('Transaction ID') {{ $order->txnid ?? '--' }}
  • @if ($order->payment_status == 'Pending') @lang('Payment Status') @lang('Unpaid') @else @lang('Payment Status') @lang('Paid') @endif
  • @if (!empty($order->order_note))
  • @lang('Order Note') {{ $order->order_note }}
  • @endif
@lang('View Invoice')
@lang('Billing Details')
  • @lang('Name') {{ $order->customer_name }}
  • @lang('Email') {{ $order->customer_email }}
  • @lang('Phone') {{ $order->customer_phone }}
  • @lang('Address') {{ $order->customer_address }}
  • @lang('Country') {{ $order->customer_country }}
  • @lang('City') {{ $order->customer_city }}
  • @lang('Postal Code') {{ $order->customer_zip }}
@if ($order->dp == 0)
@lang('Shipping Address')
    @if ($order->shipping == 'pickup')
  • @lang('Pickup Location') {{ $order->pickup_location }}
  • @else
  • @lang('Name') {{ $order->shipping_name == null ? $order->customer_name : $order->shipping_name }}
  • @lang('Email') {{ $order->shipping_email == null ? $order->customer_email : $order->shipping_email }}
  • @lang('Phone') {{ $order->shipping_phone == null ? $order->customer_phone : $order->shipping_phone }}
  • @lang('Address') {{ $order->shipping_address == null ? $order->customer_address : $order->shipping_address }}
  • @lang('Country') {{ $order->shipping_country == null ? $order->customer_country : $order->shipping_country }}
  • @lang('City') {{ $order->shipping_city == null ? $order->customer_city : $order->shipping_city }}
  • @lang('Postal Code') {{ $order->shipping_zip == null ? $order->customer_zip : $order->shipping_zip }}
  • @endif
@endif

@lang('Products Ordered')

@foreach ($cart['items'] as $key => $product) @if ($product['item']['user_id'] != 0) @if ($product['item']['user_id'] == $user->id) @endif @endif @endforeach
@lang('Product ID#') @lang('Shop Name') @lang('Status') @lang('Product Title') @lang('Details') @lang('Total Price')
{{ $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 @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 @endif @if ($product['license'] != '') {{ __('View License') }} @endif
@if ($product['size'])
@lang('Size :') {{ str_replace('-','',$product['size'],) }}
@endif @if ($product['color'])
{{ __('Color') }} :
@endif
@lang('Price :') {{ \PriceHelper::showOrderCurrencyPrice($product['item_price'] * $order->currency_value, $order->currency_sign) }}
@lang('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::showOrderCurrencyPrice($product['price'] * $order->currency_value, $order->currency_sign) }} {{ $product['discount'] == 0 ? '' : '(' . $product['discount'] . '% ' . __('Off') . ')' }}
@endsection