User Order step1

This commit is contained in:
Kevin Adametz 2020-08-07 16:02:03 +02:00
parent eb55b01b0d
commit a5db985ae8
90 changed files with 6439 additions and 421 deletions

View file

@ -25,6 +25,7 @@
<th>{{__('Käufe')}}</th>
<th>{{__('Newsletter')}}</th>
<th>{{__('erstellt')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('ID Kunden')}}</th>
<th>WP</th>
@ -66,6 +67,7 @@
{ data: 'orders', name: 'orders' },
{ data: 'subscribed', name: 'subscribed' },
{ data: 'first_created_at', name: 'first_created_at' },
{data: 'status', name: 'status', searchable: false, orderable: false },
{ data: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
],

View file

@ -0,0 +1,94 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_orders') }} / {{ __('navigation.do_order') }}
</h4>
<div class="card">
<div class="card-body p-2 p-md-4">
{!! Form::open(['url' => route('user_order_my_list', [$for, $delivery_id]), 'class' => 'form-horizontal']) !!}
<h4>Lieferdaten</h4>
<div class="switchers-stacked">
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="is-for-member" @if(!$shopping_user) checked="checked" @endif >
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">Ware ist für mich und wird an meine Adresse versandt</span>
</label>
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="is-for-customer" @if($shopping_user) checked="checked" @endif>
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">Ware ist für einen Kunden und wird an den Kunden versandt</span>
</label>
</div>
<hr>
<div id="show-is-for-customer" @if(!$shopping_user) style="display: none" @endif >
<div class="form-row">
<div class="form-group col-sm-6">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
data-id="show"
data-action="user-order-my-delivery-show"
data-back="{{route('user_order_my_delivery', [$for])}}"
data-modal="modal-xl"
data-route="{{route('modal_load')}}"><span class="fa fa-shopping-cart"></span> An bestehenden Kunden versenden (Kunden auswählen)</button>
</div>
<div class="form-group col-sm-6">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
data-id="add"
data-action="user-order-my-delivery-add"
data-back="{{route('user_order_my_delivery', [$for])}}"
data-modal="modal-xl"
data-route="{{route('modal_load')}}"><span class="fa fa-plus-circle"></span> An neuen Kunden versenden (Kunden hinzufügen)</button>
</div>
</div>
<hr>
@if($shopping_user)
<div class="show-is-for-customer">
<h4>An diesen Kunde versenden</h4>
@include('admin.customer._customer_detail')
</div>
@endif
</div>
<div class="float-right">
<button type="submit" class="btn btn-secondary">bestätigen und weiter zur Bestellung</button>
</div>
</div>
{!! Form::close() !!}
</div>
<script>
$( document ).ready(function() {
$('input[name="switchers-radio-is-for"]').on('change', function (){
if($(this).val() === 'is-for-customer'){
$('#show-is-for-customer').show('slow');
}else{
$('#show-is-for-customer').hide('slow');
}
});
/*
* showCreditCardPayment(jQuery('input[name="payment_method"]:checked').val());
jQuery('input[name="payment_method"]').on('change', function () {
showCreditCardPayment($(this).val());
});*/
});
</script>
@endsection

View file

@ -0,0 +1,89 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_orders') }} / {{ __('navigation.overview') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<div class="ml-4">
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
</div>
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
<thead>
<tr>
<th>#</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Anrede')}}</th>
<th>{{__('Firma')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('PLZ')}}</th>
<th>{{__('Stadt')}}</th>
<th>{{__('Land')}}</th>
<th>{{__('Käufe')}}</th>
<th>{{__('Newsletter')}}</th>
<th>{{__('erstellt')}}</th>
<th>{{__('ID Kunden')}}</th>
<th>WP</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="mt-4 ml-4">
<!-- <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
</div>
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatables-customers').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'user_customer_datatable') !!}',
data: function(d) {
// d.filter_member_id = $('select[name=filter_member_id]').val();
// d.filter_customer_member = $('select[name=filter_customer_member]').val();
}
},
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false},
{ data: 'billing_email', name: 'billing_email' },
{ data: 'billing_salutation', name: 'billing_salutation' },
{ data: 'billing_company', name: 'billing_company' },
{ data: 'billing_firstname', name: 'billing_firstname' },
{ data: 'billing_lastname', name: 'billing_lastname' },
{ data: 'billing_zipcode', name: 'billing_zipcode' },
{ data: 'billing_city', name: 'billing_city' },
{ data: 'billing_country_id', name: 'billing_country_id' },
{ data: 'orders', name: 'orders' },
{ data: 'subscribed', name: 'subscribed' },
{ data: 'first_created_at', name: 'first_created_at' },
{ data: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
/* $('#filter_member_id').on('change', function(){
oTable.draw();
});
$('#filter_customer_member').on('change', function(){
oTable.draw();
});
*/
});
</script>
@endsection

View file

@ -0,0 +1,131 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_orders') }} / {{ __('navigation.do_order') }}
</h4>
<style>
.btn-md-extra {
padding: 0.3rem 0.6rem;
font-size: 0.8rem;
line-height: 1.5;
border-radius: 0.25rem;
}
.md-btn-extra {
width: calc(1.7rem + 2px) !important;
line-height: 1.5rem;
}
.form-control.input-extra {
padding: 0.28rem 0.6rem;
font-size: 0.8rem;
font-weight: 500;
min-height: calc(1.8rem + 2px);
height: calc(1.8rem + 2px);
width: 44px;
}
.input-group-min-w {
min-width: 102px;
}
.img-extra {
min-width:55px;
max-height: 160px;
}
</style>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-order-list table table-striped table-bordered" id="datatables-order-list">
<thead>
<tr>
<th>{{__('Bild')}}</th>
<th>#</th>
<th>{{__('Anzahl')}}</th>
<th>{{__('Produkt')}}</th>
<th>{{__('Artikelnummer')}}</th>
<th>{{__('Netto-Preis')}}</th>
<th>{{__('Points')}}</th>
<th><span class="no-line-break">{{__('Inhalt (ml)')}}</span></th>
<th><span class="no-line-break">{{__('Gewicht (g)')}}</span></th>
<th>#</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<hr>
{!! Form::open(['url' => route('wizard_store_payment', [20]), 'class' => 'form-horizontal']) !!}
<div class="card-body">
@if($for === 'ot')
<h4>Lieferadresse (Kunde)</h4>
@include('user.order.shipping_ot')
@endif
@if($for === 'me')
<h4>Lieferadresse (meine)</h4>
@include('user.order.shipping_me')
@endif
</div>
@include('user.order.list_form')
{!! Form::close() !!}
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatables-order-list').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'user_order_my_datatable') !!}',
data: function(d) {
// d.filter_member_id = $('select[name=filter_member_id]').val();
// d.filter_customer_member = $('select[name=filter_customer_member]').val();
}
},
"order": [[4, "asc" ]],
"columns": [
{ data: 'picture', name: 'picture', searchable: false, orderable: false },
{ data: 'add_card', name: 'add_card', searchable: false, orderable: false},
{ data: 'quantity', name: 'quantity', searchable: false, orderable: false},
{ data: 'name', name: 'name' },
{ data: 'number', name: 'number' },
{ data: 'price', name: 'price', searchable: false },
{ data: 'points', name: 'points', searchable: false },
{ data: 'contents_total', name: 'contents_total', searchable: false },
{ data: 'weight', name: 'weight', searchable: false },
{ data: 'action', name: 'action', searchable: false, orderable: false },
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
/* $('#filter_member_id').on('change', function(){
oTable.draw();
});
$('#filter_customer_member').on('change', function(){
oTable.draw();
});
*/
$('body').tooltip({
selector: '.product-tooltip'
});
});
</script>
@endsection

View file

@ -0,0 +1,104 @@
<div class="card-body p-2 p-md-4">
<h4>Warenkorb</h4>
<!-- Shopping cart table -->
<div class="table-responsive">
<table class="table table-bordered m-0">
<thead>
<tr>
<!-- Set columns width -->
<th class="text-center py-3 px-4" style="min-width: 400px;">Produkt</th>
<th class="text-right py-3 px-4" style="width: 100px;">Preis</th>
<th class="text-center py-3 px-4" style="width: 120px;">Anzahl</th>
<th class="text-right py-3 px-4" style="width: 100px;">Summe</th>
<th class="py-3 px-4" style="width: 40px;"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="p-4">
<div class="media align-items-center">
<img src="/products/appwork/v152/assets_/img/uikit/nike-1.jpg" class="d-block ui-w-40 ui-bordered mr-4" alt>
<div class="media-body">
<a href="#" class="d-block text-body">Nike Men Black Liteforce III Sneakers</a>
<small>
<span class="text-muted">Color:</span>
<span class="ui-product-color ui-product-color-sm align-text-bottom" style="background:#e81e2c;"></span> &nbsp;
<span class="text-muted">Size: </span> EU 37 &nbsp;
<span class="text-muted">Ships from: </span> China
</small>
</div>
</div>
</td>
<td class="text-right font-weight-semibold align-middle p-4">
$57.55
</td>
<td class="align-middle p-4">
<input type="text" class="form-control text-center" value="2">
</td>
<td class="text-right font-weight-semibold align-middle p-4">
<span class="price">115.1</span> &euro;
</td>
<td class="text-center align-middle px-0">
<a href="#" class="close float-none" data-toggle="tooltip" title data-original-title="Remove">×</a>
</td>
</tr>
<tr>
<td class="p-4">
<div class="media align-items-center">
<img src="/products/appwork/v152/assets_/img/uikit/sunglasses.jpg" class="d-block ui-w-40 ui-bordered mr-4" alt>
<div class="media-body">
<a href="#" class="d-block text-body">WALKING 400 BLUE CAT3</a>
<small>
<span class="text-muted">Ships from: </span> Germany
</small>
</div>
</div>
</td>
<td class="text-right font-weight-semibold align-middle p-4">
$20.55
</td>
<td class="align-middle p-4">
<input type="text" class="form-control text-center" value="1">
</td>
<td class="text-right font-weight-semibold align-middle p-4">
$20.55
</td>
<td class="text-center align-middle px-0">
<a href="#" class="close float-none" data-toggle="tooltip" title data-original-title="Remove">×</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- / Shopping cart table -->
<div class="d-flex flex-wrap justify-content-between align-items-center pb-4">
<div class="mt-4">
{{-- <label class="text-muted font-weight-normal">Promocode</label>
<input type="text" placeholder="ABC" class="form-control">
--}}
</div>
<div class="d-flex">
<div class="text-right mt-4 mr-5">
<label class="text-muted font-weight-normal m-0">Points</label>
<div class="text-large"><strong>$20</strong></div>
</div>
<div class="text-right mt-4">
<label class="text-muted font-weight-normal m-0">Gesamtsumme</label>
<div class="text-large"><strong>$1164.65</strong></div>
</div>
</div>
</div>
<hr>
<div class="float-right">
<button type="submit" class="btn btn-secondary">bestätigen und weiter zur Kasse</button>
</div>
</div>

View file

@ -0,0 +1,102 @@
@if($user->account)
@if($user->account->same_as_billing)
<!-- Billing -->
<div class="row">
@if($user->account->company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $user->account->company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($user->account->salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $user->account->first_name }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $user->account->last_name }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $user->account->address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $user->account->address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $user->account->zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $user->account->city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
@if($user->account->country){{ $user->account->country->getLocated() }}@endif
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $user->account->phone }}
</div>
</div>
<!-- / Billing -->
@else
<div class="row">
@if($user->account->shipping_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $user->account->shipping_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($user->account->shipping_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $user->account->shipping_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $user->account->shipping_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $user->account->shipping_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $user->account->shipping_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $user->account->shipping_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $user->account->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
@if($user->account->shipping_country){{ $user->account->shipping_country->getLocated() }}@endif
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $user->account->shipping_phone }}
</div>
</div>
@endif
@else
<h4>Fehler: Keine Adressdaten gefunden!</h4>
@endif

View file

@ -0,0 +1,99 @@
@if($shopping_user->same_as_billing)
<!-- Billing -->
<div class="row">
@if($shopping_user->billing_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->billing_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->billing_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->billing_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->billing_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->billing_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->billing_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->billing_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
@if($shopping_user->billing_country){{ $shopping_user->billing_country->getLocated() }}@endif
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->billing_phone }}
</div>
</div>
<!-- / Billing -->
@else
<div class="row">
@if($shopping_user->shipping_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->shipping_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->shipping_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->shipping_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->shipping_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->shipping_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->shipping_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->shipping_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
@if($shopping_user->shipping_country){{ $shopping_user->shipping_country->getLocated() }}@endif
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->shipping_phone }}
</div>
</div>
@endif
</div>