shipping costs
This commit is contained in:
parent
d4f6a774d0
commit
22a2b4710a
20 changed files with 797 additions and 457 deletions
|
|
@ -75,9 +75,10 @@
|
|||
{{ Form::text('amount', $product->amount, array('placeholder'=>__('amount'), 'class'=>'form-control', 'id'=>'amount')) }}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="weight">{{ __('Gewicht in g') }}</label>
|
||||
{{ Form::text('weight', $product->weight, array('placeholder'=>__('Gewicht in g'), 'class'=>'form-control', 'id'=>'weight')) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,51 +20,254 @@
|
|||
{{ __('Create/Edit Versandkosten') }}
|
||||
</h4>
|
||||
|
||||
{!! Form::open(['url' => route('admin_shipping_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
<input type="hidden" name="id" id="id" value="@if($value->id>0){{$value->id}}@else new @endif">
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>
|
||||
<a href="{{ route('admin_shippings') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-2">
|
||||
|
||||
{!! Form::open(['url' => route('admin_shipping_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
<input type="hidden" name="id" value="@if($value->id>0){{$value->id}}@else new @endif">
|
||||
<h5 class="card-header">
|
||||
{{ __('Versandkosten') }}
|
||||
|
||||
</h5>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox float-right">
|
||||
{!! Form::checkbox('active', 1, $value->active, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('aktiv')}}</span>
|
||||
</label>
|
||||
<label class="form-label" for="name">{{ __('Name') }}*</label>
|
||||
{{ Form::text('name', $value->name, array('placeholder'=>__('Name'), 'class'=>'form-control'.($errors->has('name') ? ' is-invalid' : ''), 'id'=>'name', 'required')) }}
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
|
||||
<label class="form-label" for="name">{{ __('Name') }}*</label>
|
||||
{{ Form::text('name', $value->name, array('placeholder'=>__('Name'), 'class'=>'form-control'.($errors->has('name') ? ' is-invalid' : ''), 'required')) }}
|
||||
@if ($errors->has('name'))
|
||||
<span class="invalid-feedback" style="display: inline-block;">
|
||||
<strong>{{ $errors->first('name') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="custom-control custom-checkbox float-right">
|
||||
{!! Form::checkbox('active', 1, $value->active, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('aktiv')}}</span>
|
||||
</label>
|
||||
<label class="form-label" for="title">{{ __('Versandkosten frei ab') }}</label>
|
||||
{{ Form::text('free', $value->getFormattedFree(), array('placeholder'=>__('in Euro, leer lassen ohne Freigrenze'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
</div>
|
||||
@if ($errors->has('name'))
|
||||
<span class="invalid-feedback" style="display: inline-block;">
|
||||
<strong>{{ $errors->first('name') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="title">{{ __('Free') }}</label>
|
||||
{{ Form::text('free', $value->getFormattedFree(), array('placeholder'=>__('Free'), 'class'=>'form-control', 'id'=>'free')) }}
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-secondary" name="action" value="shipping">{{ __('save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
@if($value->id>0)
|
||||
<div class="card mb-2">
|
||||
<h6 class="card-header">
|
||||
{{__('Preise')}}
|
||||
</h6>
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Preis')}}</th>
|
||||
<th>{{__('Tax')}}</th>
|
||||
<th>{{__('Preis von - bis')}}</th>
|
||||
<th>{{__('Gewicht von - bis')}}</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($value->prices as $price)
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-price"
|
||||
data-id="{{ $price->id }}"
|
||||
data-price="{{ $price->getFormattedPrice() }}"
|
||||
data-tax="{{ $price->getFormattedTax() }}"
|
||||
data-factor="{{ $price->getFormattedFactor() }}"
|
||||
data-total_from="{{ $price->getFormatTotalFrom() }}"
|
||||
data-total_to="{{ $price->getFormattedTotalTo() }}"
|
||||
data-weight_from="{{ $price->weight_from }}"
|
||||
data-weight_to="{{ $price->weight_to }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $price->getFormattedPrice() }}</td>
|
||||
<td>{{ $price->getFormattedTax() }}</td>
|
||||
<td>{{ $price->getFormatTotalFrom() }} - {{ $price->getFormattedTotalTo() }}</td>
|
||||
<td>{{ $price->weight_from }} - {{ $price->weight_to }}</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_shipping_price_delete', [$price->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-4">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-price"
|
||||
data-id="new"
|
||||
data-price=""
|
||||
data-tax=""
|
||||
data-factor="1"
|
||||
data-total_from=""
|
||||
data-total_to=""
|
||||
data-weight_from=""
|
||||
data-weight_to=""
|
||||
>{{__('Neuen Preis erstellen')}}</button>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>
|
||||
<a href="{{ route('admin_shippings') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
|
||||
<!-- Modal template price -->
|
||||
<div class="modal fade" id="modals-price">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_shipping_store') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="id">
|
||||
<input type="hidden" name="shipping_id" value="@if($value->id>0){{$value->id}}@else new @endif">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> {{__('Preis')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
<label for="price" class="form-label">{{__('Preis (brutto)')}}*</label>
|
||||
<input type="text" class="form-control" name="price" placeholder="{{__('Preis in Euro')}}" required>
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<label for="tax" class="form-label">{{__('enthaltene Tax (%)')}}</label>
|
||||
<input type="text" class="form-control" name="tax" placeholder="{{__('Tax in %')}}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
<label for="total_from" class="form-label">{{__('von Preis')}}</label>
|
||||
<input type="text" class="form-control" name="total_from" placeholder="{{__('Preis in Euro')}}">
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<label for="total_to" class="form-label">{{__('bis Preis')}}</label>
|
||||
<input type="text" class="form-control" name="total_to" placeholder="{{__('Preis in Euro')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
<label for="weight_from" class="form-label">{{__('von Gewicht (g)')}}</label>
|
||||
<input type="text" class="form-control" name="weight_from" placeholder="{{__('in g')}}">
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<label for="weight_to" class="form-label">{{__('bis Gewicht (g)')}}</label>
|
||||
<input type="text" class="form-control" name="weight_to" placeholder="{{__('in g')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="price">{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
<div class="card mb-2">
|
||||
<h6 class="card-header">
|
||||
{{__('Länder')}}
|
||||
</h6>
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{__('Land')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($value->countries as $country)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $country->country->de }}
|
||||
</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_shipping_country_delete', [$country->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-4">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-country"
|
||||
data-id="new"
|
||||
>{{__('Land hinzufügen')}}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-country">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_shipping_store') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="id">
|
||||
<input type="hidden" name="shipping_id" value="@if($value->id>0){{$value->id}}@else new @endif">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> {{__('Preis')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="country_ids" class="form-label">{{__('Versandkosten gelten für diese Länder')}}</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="country_ids[]" multiple>
|
||||
{!! HTMLHelper::getCountriesWithoutUsedShippings() !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="country">{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#modals-price').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
$(this).find(".modal-body input[name='price']").val(button.data('price'));
|
||||
$(this).find(".modal-body input[name='tax']").val(button.data('tax'));
|
||||
$(this).find(".modal-body input[name='factor']").val(button.data('factor'));
|
||||
$(this).find(".modal-body input[name='total_from']").val(button.data('total_from'));
|
||||
$(this).find(".modal-body input[name='total_to']").val(button.data('total_to'));
|
||||
$(this).find(".modal-body input[name='weight_from']").val(button.data('weight_from'));
|
||||
$(this).find(".modal-body input[name='weight_to']").val(button.data('weight_to'));
|
||||
});
|
||||
|
||||
$('#modals-country').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
<div class="text-left mt-2 mb-2">
|
||||
<a href="{{ route('admin_shippings') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@
|
|||
"iDisplayLength": 50,
|
||||
"aoColumns": [
|
||||
{ "sWidth": "10%" },
|
||||
{ "sWidth": "80%" },
|
||||
{ "sWidth": "70%" },
|
||||
{ "sWidth": "10%" },
|
||||
{ "sWidth": "10%" },
|
||||
],
|
||||
"language": {
|
||||
|
|
|
|||
|
|
@ -15,11 +15,13 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th>{{__('edit')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('First name')}}</th>
|
||||
<th>{{__('Last name')}}</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
<th>{{__('Zugang')}}</th>
|
||||
<th>{{__('verified')}}</th>
|
||||
<th>{{__('active')}}</th>
|
||||
<th>{{__('shop')}}</th>
|
||||
<th>{{__('delete')}}</th>
|
||||
|
||||
</tr>
|
||||
|
|
@ -104,11 +106,13 @@
|
|||
"ajax": '{!! route('data_table_users') !!}',
|
||||
"columns": [
|
||||
{ data: 'action_edit', orderable: false, searchable: false},
|
||||
{ data: 'name', name: 'name' },
|
||||
{ data: 'first_name', name: 'first_name' },
|
||||
{ data: 'last_name', name: 'last_name' },
|
||||
{ data: 'email', name: 'email' },
|
||||
{ data: 'admin', name: 'admin' },
|
||||
{ data: 'confirmed', name: 'confirmed' },
|
||||
{ data: 'active', name: 'active' },
|
||||
{ data: 'shop', name: 'shop' },
|
||||
{ data: 'action_delete', orderable: false, searchable: false},
|
||||
],
|
||||
"bLengthChange": false,
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@
|
|||
|
||||
</style>
|
||||
<!-- -->
|
||||
{{ Yard::instance('shopping')->setShipping(5.9) }}
|
||||
<section>
|
||||
<div class="container">
|
||||
|
||||
|
|
@ -158,7 +157,7 @@
|
|||
|
||||
@endforeach
|
||||
</div>
|
||||
<a href="{{route(Util::getPostRoute().'card_delete', Util::addRoute())}}" class="btn btn-default margin-top-20 margin-right-10 pull-left"><i class="glyphicon glyphicon-remove"></i> Warenkorb löschen</a>
|
||||
<a href="{{route(Util::getPostRoute().'card_delete', Util::addRoute())}}" class="btn btn-default btn-sm margin-top-20 margin-right-10 pull-left"><i class="glyphicon glyphicon-remove"></i> Warenkorb löschen</a>
|
||||
<button type="submit" class="btn btn-primary margin-top-20 pull-right"><i class="glyphicon glyphicon-refresh"></i> Warenkorb aktualisieren</button>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
|
@ -171,7 +170,16 @@
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<style>
|
||||
.select2-container{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.select2-container .select2-selection--single .select2-selection__rendered
|
||||
{
|
||||
padding: 8px 20px;
|
||||
height: 36px;
|
||||
}
|
||||
</style>
|
||||
<!-- RIGHT -->
|
||||
<div class="col-lg-3 col-sm-5">
|
||||
|
||||
|
|
@ -187,6 +195,18 @@
|
|||
<span class="pull-right">{{ Yard::instance('shopping')->total() }} €</span>
|
||||
<strong class="pull-left">Zwischensumme:</strong>
|
||||
</div>
|
||||
<hr class="mt-4 mb-4">
|
||||
|
||||
<div class="clearfix mb-2">
|
||||
<div class=" small">Versandland:</div>
|
||||
<div class="small">
|
||||
<form action="{{ route(Util::getPostRoute().'card_show', Util::addRoute()) }}" method="GET" style="margin-bottom: 0;">
|
||||
<select name="selected_country" class="select2" onchange="this.form.submit()">
|
||||
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountry()) !!}
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix mb-2">
|
||||
<span class="pull-right small">{{ Yard::instance('shopping')->shipping() }} € </span>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
|
||||
</style>
|
||||
<!-- -->
|
||||
{{ Yard::instance('shopping')->setShipping(5.9) }}
|
||||
<!-- CART -->
|
||||
<!-- CHECKOUT -->
|
||||
<section>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,14 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<section class="page-header page-header-xlg parallax parallax-3"
|
||||
style="background-image:url('assets/images/vision-min.jpg')">
|
||||
<div class="overlay dark-1"><!-- dark overlay [1 to 9 opacity] --></div>
|
||||
|
||||
<div class="container">
|
||||
<h1>{{ $user_shop->name }} mivita online Shop</h1>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue