Promotion Frontend dynamic

This commit is contained in:
Kevin Adametz 2021-11-26 18:23:10 +01:00
parent c9e1545693
commit 1cc8e025a1
29 changed files with 551 additions and 163 deletions

View file

@ -37,4 +37,7 @@
{!! Form::close() !!}
@include('admin.product.images')
@endsection

View file

@ -74,6 +74,7 @@
<th>{{__('Tax')}}</th>
<th>{{__('Preis von - bis')}}</th>
<th>{{__('Gewicht von - bis')}}</th>
<th>{{__('Preis für') }}</th>
<th></th>
</tr>
@ -92,7 +93,8 @@
data-total_from="{{ $price->getFormatTotalFrom() }}"
data-total_to="{{ $price->getFormattedTotalTo() }}"
data-weight_from="{{ $price->weight_from }}"
data-weight_to="{{ $price->weight_to }}">
data-weight_to="{{ $price->weight_to }}"
data-shipping_for="{{ $price->shipping_for }}">
<span class="far fa-edit"></span>
</button>
</td>
@ -102,6 +104,7 @@
<td>{{ $price->getFormattedTaxRate() }}</td>
<td>{{ $price->getFormatTotalFrom() }} - {{ $price->getFormattedTotalTo() }}</td>
<td>{{ $price->weight_from }} - {{ $price->weight_to }}</td>
<td>{{ $price->getShippingForType() }}</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>
@ -120,6 +123,7 @@
data-total_to=""
data-weight_from=""
data-weight_to=""
data-shipping_for="1"
>{{__('Neuen Preis erstellen')}}</button>
@ -147,8 +151,8 @@
<input type="text" class="form-control" name="price" placeholder="{{__('Preis in Euro')}}" required>
</div>
<div class="form-group col-6">
<label for="price_comp" class="form-label">{{__('Kompensation Preis (brutto)')}}*</label>
<input type="text" class="form-control" name="price_comp" placeholder="{{__('Preis in Euro')}}" required>
<label for="price_comp" class="form-label">{{__('Kompensation Preis (brutto)')}}</label>
<input type="text" class="form-control" name="price_comp" placeholder="{{__('Preis in Euro')}}">
</div>
</div>
<div class="form-row">
@ -157,8 +161,8 @@
<input type="text" class="form-control" name="tax_rate" placeholder="{{__('Tax in %')}}">
</div>
<div class="form-group col-6">
<label for="num_comp" class="form-label">{{__('Anzahl Kompensationsprodukte')}}*</label>
<input type="text" class="form-control" name="num_comp" placeholder="{{__('Anzahl Kompensationsprodukte')}}" required>
<label for="num_comp" class="form-label">{{__('Anzahl Kompensationsprodukte')}}</label>
<input type="text" class="form-control" name="num_comp" placeholder="{{__('Anzahl Kompensationsprodukte')}}">
</div>
</div>
@ -183,6 +187,16 @@
<input type="text" class="form-control" name="weight_to" placeholder="{{__('in g')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col-12">
<label for="shipping_for" class="form-label">Versandkosten für</label>
<select class="custom-select" name="shipping_for" id="shipping_for">
@foreach(\App\Models\ShippingPrice::$shippingForTypes as $id=>$name)
<option value="{{$id}}" >{{$name}}</option>
@endforeach
</select>
</div>
</div>
</div>
<div class="modal-footer">
@ -277,6 +291,7 @@
$(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'));
$(this).find(".modal-body select[name='shipping_for']").val(button.data('shipping_for'));
});
$('#modals-country').on('show.bs.modal', function (event) {