155 lines
6.6 KiB
PHP
155 lines
6.6 KiB
PHP
{{-- unserialize --}}
|
|
@php
|
|
$menu = App\Menu::all()->toArray();
|
|
$sum = 0;
|
|
@endphp
|
|
|
|
|
|
@extends('master')
|
|
@section('main_content')
|
|
<section class="hero hero-page gray-bg padding-small">
|
|
<div class="container">
|
|
<div class="row d-flex">
|
|
<div class="col-lg-9 order-2 order-lg-1">
|
|
<h1>Order #{{$oid}}</h1><p class="lead">Order #{{$oid}} was placed on <strong>{{$order[0]->created_at}}</strong> and is currently <strong>Being prepared</strong>.</p><p class="text-muted">If you have any questions, please feel free to <a href="contact.html">contact us</a>, our customer service center is working for you 24/7.</p>
|
|
</div>
|
|
<div class="col-lg-3 text-right order-1 order-lg-2">
|
|
<ul class="breadcrumb justify-content-lg-end">
|
|
<li class="breadcrumb-item"><a href="{{url('')}}">Home</a></li>
|
|
<li class="breadcrumb-item"><a href="{{url('user/customer-orders')}}">Orders</a></li>
|
|
<li class="breadcrumb-item active">Order #{{$oid}}</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
|
|
|
|
<section class="hero hero-page gray-bg padding-small">
|
|
<div class="container">
|
|
<div class="row d-flex">
|
|
<div class="col-lg-9 order-2 order-lg-1">
|
|
<h1>Your profile</h1>
|
|
</div>
|
|
<div class="col-lg-3 text-right order-1 order-lg-2">
|
|
<ul class="breadcrumb justify-content-lg-end">
|
|
<li class="breadcrumb-item"><a href="{{url('')}}">Home</a></li>
|
|
<li class="breadcrumb-item active">Your profile</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@if ($errors -> any() )
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
<section class="padding-small">
|
|
<div class="container">
|
|
<div class="row">
|
|
<!-- Customer Sidebar-->
|
|
|
|
<div class="customer-sidebar col-xl-3 col-lg-4 mb-md-5">
|
|
<div class="customer-profile"><a href="#" class="d-inline-block">
|
|
<img src="{{asset('images/profilePics').'/'.$user[0]->{'profilepic'} }}" class="img-fluid rounded-circle customer-image"></a>
|
|
<h5>{{Session::get('user_name')}}</h5>
|
|
<p class="text-muted text-small">{{ $user[0]->{'street'} . ','. $user[0]->{'streetNum'} }}
|
|
<br>
|
|
{{$user[0]->{'city'} }}
|
|
<br>
|
|
{{$user[0]->{'country'} }} <br>ZIP : {{$user[0]->{'ZIP'} }} </p>
|
|
</div>
|
|
<nav class="list-group customer-nav">
|
|
<a href="{{url('user/customer-orders')}}" class="list-group-item d-flex justify-content-between align-items-center">
|
|
<span>
|
|
<span class="icon icon-bag">
|
|
</span>Orders</span>
|
|
<small class="badge badge-pill badge-primary">{{$user_orders}}
|
|
</small></a>
|
|
<a href="customer-account.html" class="active list-group-item d-flex justify-content-between align-items-center">
|
|
<span>
|
|
<span class="icon icon-profile">
|
|
|
|
</span>Profile</span>
|
|
</a>
|
|
|
|
<a href="{{ url('user/logout') }}" class="list-group-item d-flex justify-content-between align-items-center"><span>
|
|
<span class="fa fa-sign-out"></span>Log out</span></a>
|
|
</nav>
|
|
</div>
|
|
|
|
<div class="col-lg-8 col-xl-9 pl-lg-3">
|
|
<div class="basket basket-customer-order">
|
|
<div class="basket-holder">
|
|
<div class="basket-header">
|
|
<div class="row">
|
|
<div class="col-6">Product</div>
|
|
<div class="col-2">Price</div>
|
|
<div class="col-2">Quantity</div>
|
|
<div class="col-2 text-right">Total</div>
|
|
</div>
|
|
</div>
|
|
<div class="basket-body">
|
|
<!-- Product-->
|
|
@foreach (unserialize($order[0]->data) as $value)
|
|
<div class="item">
|
|
<div class="row d-flex align-items-center">
|
|
<div class="col-6">
|
|
<div class="d-flex align-items-center">
|
|
<img src="{{asset('images') . '/'. $value['attributes']['img']}}" alt="..." class="img-fluid">
|
|
<div class="title"><a href="detail.html">
|
|
<h6>{{$value['name']}}</h6>
|
|
<span class="text-muted">Size: Large</span></a></div>
|
|
</div>
|
|
</div>
|
|
<div class="col-2"><span>${{$value['price']}}</span></div>
|
|
<div class="col-2">{{$value['quantity']}}</div>
|
|
<div class="col-2 text-right"><span>${{$totle = $value['price'] * $value['quantity'] }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@php
|
|
|
|
$sum = $sum +$totle;
|
|
@endphp
|
|
@endforeach
|
|
</div>
|
|
<div class="basket-footer">
|
|
<div class="item">
|
|
<div class="row">
|
|
<div class="offset-md-6 col-4"> <strong>Order subtotal</strong></div>
|
|
<div class="col-2 text-right"><strong>${{$sum}}</strong></div>
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="row">
|
|
<div class="offset-md-6 col-4"> <strong>Shipping and handling</strong></div>
|
|
<div class="col-2 text-right"><strong>$10.00</strong></div>
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="row">
|
|
<div class="offset-md-6 col-4"> <strong>Tax</strong></div>
|
|
<div class="col-2 text-right"><strong>$0.00</strong></div>
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="row">
|
|
<div class="offset-md-6 col-4"> <strong>Total</strong></div>
|
|
<div class="col-2 text-right"><strong>${{$sum + 10}}</strong></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|