@extends('layouts.master') @section('title') Items Order @endsection @section('css') @endsection @section('content') @component('components.breadcrumb') @slot('li_1') Items Order @endslot @slot('title') List @endslot @endcomponent @include('partials.session')
ID | Item(s) | {{--Quantity | --}}Status | Placed By | Price | Created At | Actions |
---|---|---|---|---|---|---|---|
{{$order->id}} |
@php
$quantity = 0;
$isPhysical = false;
@endphp
@foreach($order->order_items as $order_item)
{{-- @php
$quantity = $order_item->quantity;
@endphp --}}
@if($order_item->item->type==\App\Models\Item::PHYSICAL)
@php
$isPhysical = true;
@endphp
{{$order_item->item->title}} x {{$order_item->quantity}}@else{{$order_item->item->digital_item->name}} ({{$order_item->quantity}}) x {{$order_item->recieved_quantity}}@endif @endforeach |
{{-- {{$quantity}} | --}}@if($order->status==\App\Models\ItemOrder::PENDING) pending @elseif($order->status==\App\Models\ItemOrder::PROCESSING) processing @elseif($order->status==\App\Models\ItemOrder::COMPLETED) completed @else cancelled @endif | {{-- @dd($order->user) --}} {{$order->user->first_name .' '.$order->user->last_name}} | @foreach($order->order_items as $order_item) @if(count($order_item->prices)>0) @foreach($order_item->prices as $price) @php $bought_price = $order_item->recieved_quantity ?? $order_item->quantity; @endphp {{$price->digital_asset->name}} x {{$price->digital_item_quantity*$bought_price}} @endforeach @else @if(count($order_item->item->price)>0) @foreach($order_item->item->price as $price) @php $bought_price = $order_item->recieved_quantity ?? $order_item->quantity; @endphp {{$price->digital_asset->name}} x {{$price->digital_item_quantity*$bought_price}} @endforeach @endif @endif @endforeach | {{ $order->created_at }} |
|