first upload all files
This commit is contained in:
46
Modules/Order/Resources/views/admin/orders/index.blade.php
Normal file
46
Modules/Order/Resources/views/admin/orders/index.blade.php
Normal file
@@ -0,0 +1,46 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('order::orders.orders'))
|
||||
|
||||
<li class="active">{{ trans('order::orders.orders') }}</li>
|
||||
@endcomponent
|
||||
|
||||
@section('content')
|
||||
<div class="box box-primary">
|
||||
<div class="box-body index-table" id="orders-table">
|
||||
@component('admin::components.table')
|
||||
@slot('thead')
|
||||
<tr>
|
||||
<th>{{ trans('admin::admin.table.id') }}</th>
|
||||
<th>{{ trans('order::orders.table.customer_name') }}</th>
|
||||
<th>{{ trans('order::orders.table.customer_email') }}</th>
|
||||
<th>{{ trans('admin::admin.table.status') }}</th>
|
||||
<th>{{ trans('order::orders.table.total') }}</th>
|
||||
<th data-sort>{{ trans('admin::admin.table.created') }}</th>
|
||||
</tr>
|
||||
@endslot
|
||||
@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
DataTable.setRoutes('#orders-table .table', {
|
||||
index: '{{ "admin.orders.index" }}',
|
||||
show: '{{ "admin.orders.show" }}',
|
||||
});
|
||||
|
||||
new DataTable('#orders-table .table', {
|
||||
columns: [
|
||||
{ data: 'id', width: '5%' },
|
||||
{ data: 'customer_name', orderable: false, searchable: false },
|
||||
{ data: 'customer_email' },
|
||||
{ data: 'status' },
|
||||
{ data: 'total' },
|
||||
{ data: 'created', name: 'created_at' },
|
||||
],
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,49 @@
|
||||
<div class="address-information-wrapper">
|
||||
<h3 class="section-title">{{ trans('order::orders.address_information') }}</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="billing-address">
|
||||
<h4 class="pull-left">{{ trans('order::orders.billing_address') }}</h4>
|
||||
|
||||
<span>
|
||||
{{ $order->billing_full_name }}
|
||||
<br>
|
||||
{{ $order->billing_address_1 }}
|
||||
<br>
|
||||
|
||||
@if ($order->billing_address_2)
|
||||
{{ $order->billing_address_2 }}
|
||||
<br>
|
||||
@endif
|
||||
|
||||
{{ $order->billing_city }}, {{ $order->billing_state_name }} {{ $order->billing_zip }}
|
||||
<br>
|
||||
{{ $order->billing_country_name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="shipping-address">
|
||||
<h4 class="pull-left">{{ trans('order::orders.shipping_address') }}</h4>
|
||||
|
||||
<span>
|
||||
{{ $order->shipping_full_name }}
|
||||
<br>
|
||||
{{ $order->shipping_address_1 }}
|
||||
<br>
|
||||
|
||||
@if ($order->shipping_address_2)
|
||||
{{ $order->shipping_address_2 }}
|
||||
<br>
|
||||
@endif
|
||||
|
||||
{{ $order->shipping_city }}, {{ $order->shipping_state_name }} {{ $order->shipping_zip }}
|
||||
<br>
|
||||
{{ $order->shipping_country_name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,63 @@
|
||||
<div class="items-ordered-wrapper">
|
||||
<h3 class="section-title">{{ trans('order::orders.items_ordered') }}</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="items-ordered">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('order::orders.product') }}</th>
|
||||
<th>{{ trans('order::orders.unit_price') }}</th>
|
||||
<th>{{ trans('order::orders.quantity') }}</th>
|
||||
<th>{{ trans('order::orders.line_total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($order->products as $product)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($product->trashed())
|
||||
{{ $product->name }}
|
||||
@else
|
||||
<a href="{{ route('admin.products.edit', $product->product->id) }}">{{ $product->name }}</a>
|
||||
@endif
|
||||
|
||||
@if ($product->hasAnyOption())
|
||||
<br>
|
||||
@foreach ($product->options as $option)
|
||||
<span>
|
||||
{{ $option->name }}:
|
||||
|
||||
<span>
|
||||
@if ($option->option->isFieldType())
|
||||
{{ $option->value }}
|
||||
@else
|
||||
{{ $option->values->implode('label', ', ') }}
|
||||
@endif
|
||||
</span>
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $product->unit_price->format() }}
|
||||
</td>
|
||||
|
||||
<td>{{ $product->qty }}</td>
|
||||
|
||||
<td>
|
||||
{{ $product->line_total->format() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,132 @@
|
||||
<div class="order-information-wrapper">
|
||||
<div class="order-information-buttons">
|
||||
<a href="{{ route('admin.orders.print.show', $order) }}" class="btn btn-default" target="_blank"
|
||||
data-toggle="tooltip" title="{{ trans('order::orders.print') }}">
|
||||
<i class="fa fa-print" aria-hidden="true"></i>
|
||||
</a>
|
||||
|
||||
<form method="POST" action="{{ route('admin.orders.email.store', $order) }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<button type="submit" class="btn btn-default" data-toggle="tooltip"
|
||||
title="{{ trans('order::orders.send_email') }}" data-loading>
|
||||
<i class="fa fa-envelope-o" aria-hidden="true"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h3 class="section-title">{{ trans('order::orders.order_and_account_information') }}</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="order clearfix">
|
||||
<h4>{{ trans('order::orders.order_information') }}</h4>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.order_id') }}</td>
|
||||
<td>{{ $order->id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.order_date') }}</td>
|
||||
<td>{{ $order->created_at->toFormattedDateString() }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.order_status') }}</td>
|
||||
<td>
|
||||
<div class="row">
|
||||
<div class="col-lg-9 col-md-10 col-sm-10">
|
||||
<select id="order-status" class="form-control custom-select-black"
|
||||
data-id="{{ $order->id }}">
|
||||
@foreach (trans('order::statuses') as $name => $label)
|
||||
<option value="{{ $name }}"
|
||||
{{ $order->status === $name ? 'selected' : '' }}>
|
||||
{{ $label }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if ($order->shipping_method)
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.shipping_method') }}</td>
|
||||
<td>{{ $order->shipping_method }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.payment_method') }}</td>
|
||||
<td>{{ $order->payment_method }}
|
||||
@if ($order->payment_method === 'Bank Transfer')
|
||||
</br>
|
||||
{{ setting('bank_transfer_instructions') }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if (is_multilingual())
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.currency') }}</td>
|
||||
<td>{{ $order->currency }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.currency_rate') }}</td>
|
||||
<td>{{ $order->currency_rate }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($order->note)
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.order_note') }}</td>
|
||||
<td>{{ $order->note }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="account-information">
|
||||
<h4>{{ trans('order::orders.account_information') }}</h4>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.customer_name') }}</td>
|
||||
<td>{{ $order->customer_full_name }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.customer_email') }}</td>
|
||||
<td>{{ $order->customer_email }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.customer_phone') }}</td>
|
||||
<td>{{ $order->customer_phone }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.customer_group') }}</td>
|
||||
|
||||
<td>
|
||||
{{ is_null($order->customer_id) ? trans('order::orders.guest') : trans('order::orders.registered') }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<div class="order-totals-wrapper">
|
||||
<div class="row">
|
||||
<div class="order-totals pull-right">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.subtotal') }}</td>
|
||||
<td class="text-right">{{ $order->sub_total->format() }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($order->hasShippingMethod())
|
||||
<tr>
|
||||
<td>{{ $order->shipping_method }}</td>
|
||||
<td class="text-right">{{ $order->shipping_cost->format() }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@foreach ($order->taxes as $tax)
|
||||
<tr>
|
||||
<td>{{ $tax->name }}</td>
|
||||
<td class="text-right">{{ $tax->order_tax->amount->format() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@if ($order->hasCoupon())
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.coupon') }} (<span class="coupon-code">{{ $order->coupon->code }}</span>)</td>
|
||||
<td class="text-right">–{{ $order->discount->format() }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.total') }}</td>
|
||||
<td class="text-right">{{ $order->total->format() }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
@push('shortcuts')
|
||||
<dl class="dl-horizontal">
|
||||
<dt><code>b</code></dt>
|
||||
<dd>{{ trans('admin::admin.shortcuts.back_to_index', ['name' => trans('order::orders.order')]) }}</dd>
|
||||
</dl>
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
keypressAction([
|
||||
{ key: 'b', route: "{{ route('admin.orders.index') }}" }
|
||||
]);
|
||||
</script>
|
||||
@endpush
|
||||
224
Modules/Order/Resources/views/admin/orders/print/show.blade.php
Normal file
224
Modules/Order/Resources/views/admin/orders/print/show.blade.php
Normal file
@@ -0,0 +1,224 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ locale() }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>{{ trans('order::print.invoice') }}</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
|
||||
<link href="{{ v(Module::asset('order:admin/css/print.css')) }}" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="{{ is_rtl() ? 'rtl' : 'ltr' }}">
|
||||
<!--[if lt IE 8]>
|
||||
<p>You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a>
|
||||
to improve your experience.</p>
|
||||
<![endif]-->
|
||||
|
||||
<div class="container">
|
||||
<div class="invoice-wrapper clearfix">
|
||||
<div class="row">
|
||||
<div class="invoice-header clearfix">
|
||||
<div class="col-md-3">
|
||||
<div class="store-name">
|
||||
<h1>{{ setting('store_name') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9 clearfix">
|
||||
<div class="invoice-header-right pull-right">
|
||||
<span class="title">{{ trans('order::print.invoice') }}</span>
|
||||
|
||||
<div class="invoice-info clearfix">
|
||||
<div class="invoice-id">
|
||||
<label for="invoice-id">{{ trans('order::print.invoice_id') }}:</label>
|
||||
<span>#{{ $order->id }}</span>
|
||||
</div>
|
||||
|
||||
<div class="invoice-date">
|
||||
<label for="invoice-date">{{ trans('order::print.date') }}:</label>
|
||||
<span>{{ $order->created_at->format('Y / m / d') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="invoice-body clearfix">
|
||||
<div class="invoice-details-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="invoice-details">
|
||||
<h5>{{ trans('order::print.order_details') }}</h5>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('order::print.email') }}:</td>
|
||||
<td>{{ $order->customer_email }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::print.phone') }}:</td>
|
||||
<td>{{ $order->customer_phone }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($order->shipping_method)
|
||||
<tr>
|
||||
<td>{{ trans('order::print.shipping_method') }}:</td>
|
||||
<td>{{ $order->shipping_method }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::print.payment_method') }}:</td>
|
||||
<td>{{ $order->payment_method }}
|
||||
@if($order->payment_method==='Bank Transfer')
|
||||
</br>
|
||||
{{setting('bank_transfer_instructions')}}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="invoice-address">
|
||||
<h5>{{ trans('order::print.shipping_address') }}</h5>
|
||||
|
||||
<span>{{ $order->shipping_full_name }}</span>
|
||||
<span>{{ $order->shipping_address_1 }}</span>
|
||||
<span>{{ $order->shipping_address_2 }}</span>
|
||||
<span>{{ $order->shipping_city }}, {{ $order->shipping_state_name }} {{ $order->shipping_zip }}</span>
|
||||
<span>{{ $order->shipping_country_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="invoice-address">
|
||||
<h5>{{ trans('order::print.billing_address') }}</h5>
|
||||
|
||||
<span>{{ $order->billing_full_name }}</span>
|
||||
<span>{{ $order->billing_address_1 }}</span>
|
||||
<span>{{ $order->billing_address_2 }}</span>
|
||||
<span>{{ $order->billing_city }}, {{ $order->billing_state_name }} {{ $order->billing_zip }}</span>
|
||||
<span>{{ $order->billing_country_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cart-list">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('order::print.product') }}</th>
|
||||
<th>{{ trans('order::print.unit_price') }}</th>
|
||||
<th>{{ trans('order::print.quantity') }}</th>
|
||||
<th>{{ trans('order::print.line_total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($order->products as $product)
|
||||
<tr>
|
||||
<td>
|
||||
<span>{{ $product->name }}</span>
|
||||
|
||||
@if ($product->hasAnyOption())
|
||||
<div class="option">
|
||||
@foreach ($product->options as $option)
|
||||
<span>
|
||||
{{ $option->name }}:
|
||||
|
||||
<span>
|
||||
@if ($option->option->isFieldType())
|
||||
{{ $option->value }}
|
||||
@else
|
||||
{{ $option->values->implode('label', ', ') }}
|
||||
@endif
|
||||
</span>
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<label class="visible-xs">{{ trans('order::print.unit_price') }}:</label>
|
||||
<span>{{ $product->unit_price->convert($order->currency, $order->currency_rate)->convert($order->currency, $order->currency_rate)->format($order->currency) }}</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<label class="visible-xs">{{ trans('order::print.quantity') }}:</label>
|
||||
<span>{{ $product->qty }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label class="visible-xs">{{ trans('order::print.line_total') }}:</label>
|
||||
<span>{{ $product->line_total->convert($order->currency, $order->currency_rate)->format($order->currency) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="total pull-right">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('order::print.subtotal') }}</td>
|
||||
<td>{{ $order->sub_total->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($order->hasShippingMethod())
|
||||
<tr>
|
||||
<td>{{ $order->shipping_method }}</td>
|
||||
<td>{{ $order->shipping_cost->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($order->hasCoupon())
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.coupon') }} (<span
|
||||
class="coupon-code">{{ $order->coupon->code }}</span>)
|
||||
</td>
|
||||
<td>
|
||||
–{{ $order->discount->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@foreach ($order->taxes as $tax)
|
||||
<tr>
|
||||
<td>{{ $tax->name }}</td>
|
||||
<td class="text-right">{{ $tax->order_tax->amount->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::print.total') }}</td>
|
||||
<td>{{ $order->total->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.print();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
17
Modules/Order/Resources/views/admin/orders/show.blade.php
Normal file
17
Modules/Order/Resources/views/admin/orders/show.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('admin::resource.show', ['resource' => trans('order::orders.order')]))
|
||||
|
||||
<li><a href="{{ route('admin.orders.index') }}">{{ trans('order::orders.orders') }}</a></li>
|
||||
<li class="active">{{ trans('admin::resource.show', ['resource' => trans('order::orders.order')]) }}</li>
|
||||
@endcomponent
|
||||
|
||||
@section('content')
|
||||
<div class="order-wrapper">
|
||||
@include('order::admin.orders.partials.order_and_account_information')
|
||||
@include('order::admin.orders.partials.address_information')
|
||||
@include('order::admin.orders.partials.items_ordered')
|
||||
@include('order::admin.orders.partials.order_totals')
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user