Updates to 03-2025

This commit is contained in:
Kevin Adametz 2025-04-01 10:39:21 +02:00
parent 6167273a48
commit 9b54eb0512
348 changed files with 34535 additions and 5774 deletions

View file

@ -0,0 +1,167 @@
@if (isset($shopping_mode) && $shopping_mode === 'test')
<strong>#### TEST MODE #### TEST MODE ####</strong>
@endif
<div class="checkout-order mt-4">
@if(Yard::instance('shopping')->isWithPayments())
<h3 class="">Zahlungsart auswählen</h3>
<div id="error-payment_method"></div>
<div class="table-responsive mb-4">
<table class="table table-payment m-0" id="">
<tbody class="switchers-stacked">
@if (true || \App\Models\PaymentMethod::isShowPaymentMethod('PP', $user_payment_methods, 0))
<tr>
<td class="align-middle px-0 pl-1p">
<label class="switcher switcher-success">
{!! Form::radio('payment_method', 'pp', '', ['class' => 'switcher-input', 'data-error'=>'#error-payment_method', 'required' => true]) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label font-weight-bold text-left">PayPal</span>
</label>
</td>
<td class="text-right align-middle px-0 py-3 ui-w-100">
<img class="float-right" width="90"
src="{{ asset('images/payments-assets/paypal.png') }}" alt="PayPal">
</td>
</tr>
@endif
{{--
@if (true || \App\Models\PaymentMethod::isShowPaymentMethod('SB', $user_payment_methods, 0))
<tr>
<td class="align-middle px-0 pl-1p">
<label class="switcher switcher-success">
{!! Form::radio('payment_method', 'sb', '', ['class' => 'switcher-input', 'data-error'=>'#error-payment_method', 'required' => true]) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label font-weight-bold text-left">Sofort
Überweisung</span>
</label>
</td>
<td class="text-right align-middle px-0 py-3 ui-w-100">
<img class="float-right" width="90"
src="{{ asset('images/payments-assets/sofort.png') }}" alt="Sofort">
</td>
</tr>
@endif
@if (true || \App\Models\PaymentMethod::isShowPaymentMethod('CC', $user_payment_methods, 0))
<tr>
<td class="align-middle px-0 pl-1p">
<label class="switcher switcher-success">
{!! Form::radio('payment_method', 'cc', '', ['class' => 'switcher-input', 'data-error'=>'#error-payment_method', 'required' => true]) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label font-weight-bold text-left">Kreditkarte</span>
</label>
</td>
<td class="text-right align-middle px-0 py-3 ui-w-100">
<img class="float-right" width="90"
src="{{ asset('images/payments-assets/creditcard.png') }}" alt="Mastercard + Visa">
</td>
</tr>
@endif
--}}
@if (true || \App\Models\PaymentMethod::isShowPaymentMethod('VOR', $user_payment_methods, 0))
<tr>
<td class="align-middle px-0 pl-1p">
<label class="switcher switcher-success">
{!! Form::radio('payment_method', 'vor', '', ['class' => 'switcher-input', 'data-error'=>'#error-payment_method', 'required' => true]) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label font-weight-bold text-left">Vorkasse</span>
</label>
</td>
<td class="text-right align-middle px-0 py-3 ui-w-100">
<img class="float-right" width="90" src="{{ asset('images/payments-assets/vor.png') }}"
alt="Vorkasse">
</td>
</tr>
@endif
</tbody>
</table>
</div>
@endif
<h3 class="">Warenkorb</h3>
<div class="checkout-cart">
<div class="mb-2">
<span class="float-right">{{ Yard::instance('shopping')->total() }} </span>
<strong class="">Zwischensumme:</strong>
</div>
<hr class="light">
<div class="mb-2">
<span class="float-right">{{ Yard::instance('shopping')->shipping() }} </span>
<span class="">Versandkosten:</span>
</div>
<div class="mb-2">
<span class="float-right">{{ Yard::instance('shopping')->getShippingCountryName() }}</span>
<span class="">Lieferland:</span>
</div>
<hr class="light">
<div class="mb-2" style="font-size: 90%">
<span class="float-right">{{ Yard::instance('shopping')->subtotalWithShipping() }} </span>
<span class="">Summe ohne MwSt:</span>
</div>
<div class="mb-2" style="font-size: 90%">
<span class="float-right">{{ Yard::instance('shopping')->taxWithShipping() }} </span>
<span class=""> zzgl. {{-- Yard::getTaxRate() --}} MwSt:</span>
</div>
<hr class="light">
<div class="">
<span class="float-right"><strong>{{ Yard::instance('shopping')->totalWithShipping() }} </strong></span>
<strong class="">Gesamtsumme:</strong>
</div>
<hr class="light">
<div class="form-group">
<label class="switcher switcher-success">
{!! Form::checkbox('accepted_data', 1, '', ['id' => 'accepted_data', 'class' => 'switcher-input', 'data-error'=>'#error-accepted_data', 'required' => true]) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no">
</span>
</span>
<span class="switcher-label">Mit Klick auf "Jetzt kaufen" akzeptiere ich die
<a href="https://www.gruene-seele.bio/agb/" target="_blank" class="text-secondary">Allgemeinen
Geschäftsbedingungen</a> und die
<a href="https://www.gruene-seele.bio/datenschutzerklaerung/" target="_bank"
class="text-secondary">Datenschutzbelehrung</a>, damit für die Bestellung
meine Daten verarbeitet werden können. <span class="required">*</span>
</label>
<div id="error-accepted_data"></div>
</div>
{!! Form::hidden("action", "submit-order") !!}
<button type="submit" class="btn btn-primary btn-lg btn-block mt-4 button-prevent-multiple-submits">
<i class="ion ion-ios-share-alt"></i> Jetzt kaufen <i class="spinner fa fa-spinner fa-spin"></i>
</button>
<hr class="light">
@if(Yard::instance('shopping')->isWithPayments())
<p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i
class="fa fa-lock"></i> Sind alle Deine Angaben vollständig ausgefüllt,
klicke auf "Jetzt kaufen" und Du wirst zu unserer Zahlung/Zahlungsabieter weitergeleitet,
die Verbindungen sind SSL verschlüsselt.</em></p>
@else
<p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i
class="fa fa-lock"></i> Sind alle Deine Angaben vollständig ausgefüllt,
klicke auf "Jetzt kaufen" und die Bestellung wird abgeschlossen,
die Verbindungen sind SSL verschlüsselt.</em></p>
@endif
</div>
</div>

View file

@ -0,0 +1,334 @@
<h2 class="mt-3">Rechnungsdetails</h2>
<div class="row">
<div class="col-12">
<div class="form-group">
<label class="switcher switcher-success">
{!! Form::checkbox('is_invoice_details_private', 1, true, ['id' => 'switch_invoice_details_private', 'class' => 'switcher-input']) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no">
</span>
</span>
<span class="switcher-label">Privat (keine Firma)</span>
</label>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label class="switcher switcher-success">
{!! Form::checkbox('is_invoice_details_germany', 1, (Yard::instance('shopping')->getShippingCountryId() == 1 ? true : false), ['id' => 'switch_invoice_details_germany', 'class' => 'switcher-input']) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no">
</span>
</span>
<span class="switcher-label">aus Deutschland</span>
</label>
</div>
</div>
<div class="col-12">
<div class="form-group {{ $errors->has('billing_salutation') ? 'error' : '' }}">
<label for="billing_salutation">Anrede <span class="required">*</span></label>
<select id="billing_salutation" name="billing_salutation"
class="form-control selectpicker revalidat" data-style="btn-default" data-error="#error-billing_salutation" required>
{!! HTMLHelper::getSalutation(old('billing_salutation')) !!}
</select>
<div id="error-billing_salutation" class="text-left"></div>
@if ($errors->has('billing_salutation'))
<label for="billing_salutation" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_salutation') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="billing_firstname">Vorname <span class="required">*</span></label>
{!! Form::text('billing_firstname', '', ['class' => 'form-control ' . ($errors->has('billing_firstname') ? 'error' : ''), 'id' => 'billing_firstname', 'required' => true]) !!}
@if ($errors->has('billing_firstname'))
<label for="billing_firstname" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_firstname') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="billing_lastname">Nachname <span class="required">*</span></label>
{!! Form::text('billing_lastname', '', ['class' => 'form-control ' . ($errors->has('billing_lastname') ? 'error' : ''), 'id' => 'billing_lastname', 'required' => true]) !!}
@if ($errors->has('billing_lastname'))
<label for="billing_lastname" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_lastname') }}</label>
@endif
</div>
</div>
<div class="col-12 not-show show_invoice_details_private">
<div class="form-group">
<label for="billing_company">Firmenname (optional)</label>
{!! Form::text('billing_company', '', ['class' => 'form-control', 'id' => 'billing_company']) !!}
</div>
</div>
<div class="col-12 not-show show_invoice_details_germany">
<div class="form-group">
<label for="billing_state">Land / Region <span class="required">*</span></label>
<select id="billing_state" name="billing_state" class="form-control selectpicker"
data-style="btn-default">
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId(), false, 2) !!}
</select>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="billing_address">Straße + Hausnummer <span
class="required">*</span></label>
{!! Form::text('billing_address', '', ['class' => 'form-control ' . ($errors->has('billing_address') ? 'error' : ''), 'id' => 'billing_address', 'required' => true]) !!}
@if ($errors->has('billing_address'))
<label for="billing_address" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_address') }}</label>
@endif
</div>
</div>
<div class="col-12">
<div class="form-group">
{!! Form::text('billing_address_2', '', ['placeholder' => 'Zusätzliche Angaben / Hinweise (optional)', 'class' => 'form-control ' . ($errors->has('billing_address_2') ? 'error' : ''), 'id' => 'billing_address_2']) !!}
@if ($errors->has('billing_address_2'))
<label for="billing_address_2" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_address_2') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="billing_zipcode">PLZ <span class="required">*</span></label>
{!! Form::text('billing_zipcode', '', ['class' => 'form-control ' . ($errors->has('billing_zipcode') ? 'error' : ''), 'id' => 'billing_zipcode', 'required' => true]) !!}
@if ($errors->has('billing_zipcode'))
<label for="billing_zipcode" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_zipcode') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="billing_city">Stadt <span class="required">*</span></label>
{!! Form::text('billing_city', '', ['class' => 'form-control ' . ($errors->has('billing_city') ? 'error' : ''), 'id' => 'billing_city', 'required' => true]) !!}
@if ($errors->has('billing_city'))
<label for="billing_city" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_city') }}</label>
@endif
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="billing_email">E-Mail <span class="required">*</span></label>
{!! Form::email('billing_email', '', ['class' => 'form-control ' . ($errors->has('billing_email') ? 'error' : ''), 'id' => 'billing_email', 'required' => true]) !!}
@if ($errors->has('billing_email'))
<label for="billing_email" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_email') }}</label>
@endif
</div>
</div>
<div class="col-12">
<div class="form-group">
<label class="switcher switcher-success">
{!! Form::checkbox('same_as_billing', 1, '', ['id' => 'shipping_address_switch', 'class' => 'switcher-input']) !!}
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
</span>
<span class="switcher-no">
</span>
</span>
<span class="switcher-label">Lieferung an eine andere Adresse senden?</span>
</label>
</div>
</div>
</div>
<div class="row" id="shipping_address">
<div class="col-12">
<hr class="">
</div>
<div class="col-12">
<h2 class="mt-3">Lieferadresse</h2>
</div>
<div class="col-12">
<div class="form-group {{ $errors->has('shipping_salutation') ? 'error' : '' }}">
<label for="shipping_salutation">Anrede <span class="required">*</span></label>
<select id="shipping_salutation" name="shipping_salutation"
class="form-control selectpicker revalidat" data-style="btn-default" data-error="#error-shipping_salutation" required>
{!! HTMLHelper::getSalutation(old('shipping_salutation')) !!}
</select>
<div id="error-shipping_salutation" class="text-left"></div>
@if ($errors->has('shipping_salutation'))
<label for="shipping_salutation" class="error text-danger small"
style="display: block;">{{ $errors->first('shipping_salutation') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="shipping_firstname">Vorname <span class="required">*</span></label>
{!! Form::text('shipping_firstname', '', ['class' => 'form-control ' . ($errors->has('shipping_firstname') ? 'error' : ''), 'id' => 'shipping_firstname', 'required' => true]) !!}
@if ($errors->has('shipping_firstname'))
<label for="shipping_firstname" class="error text-danger small"
style="display: block;">{{ $errors->first('shipping_firstname') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="shipping_lastname">Nachname <span class="required">*</span></label>
{!! Form::text('shipping_lastname', '', ['class' => 'form-control ' . ($errors->has('shipping_lastname') ? 'error' : ''), 'id' => 'shipping_lastname', 'required' => true]) !!}
@if ($errors->has('shipping_lastname'))
<label for="shipping_lastname" class="error text-danger small"
style="display: block;">{{ $errors->first('shipping_lastname') }}</label>
@endif
</div>
</div>
<div class="col-12 not-show show_invoice_details_private">
<div class="form-group">
<label for="shipping_company">Firmenname (optional)</label>
{!! Form::text('shipping_company', '', ['class' => 'form-control', 'id' => 'shipping_company']) !!}
</div>
</div>
<div class="col-12 not-show show_invoice_details_germany">
<div class="form-group">
<label for="shipping_state">Land / Region <span class="required">*</span></label>
<select id="shipping_state" name="shipping_state" class="form-control selectpicker"
data-style="btn-default">
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId(), false, 2) !!}
</select>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="shipping_address">Straße + Hausnummer <span
class="required">*</span></label>
{!! Form::text('shipping_address', '', ['class' => 'form-control ' . ($errors->has('shipping_address') ? 'error' : ''), 'id' => 'shipping_address', 'required' => true]) !!}
@if ($errors->has('shipping_address'))
<label for="shipping_address" class="error text-danger small"
style="display: block;">{{ $errors->first('shipping_address') }}</label>
@endif
</div>
</div>
<div class="col-12">
<div class="form-group">
{!! Form::text('shipping_address_2', '', ['placeholder' => 'Zusätzliche Angaben / Hinweise (optional)', 'class' => 'form-control ' . ($errors->has('shipping_address_2') ? 'error' : ''), 'id' => 'shipping_address_2']) !!}
@if ($errors->has('shipping_address_2'))
<label for="shipping_address_2" class="error text-danger small"
style="display: block;">{{ $errors->first('shipping_address_2') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="shipping_zipcode">PLZ <span class="required">*</span></label>
{!! Form::text('shipping_zipcode', '', ['class' => 'form-control ' . ($errors->has('shipping_zipcode') ? 'error' : ''), 'id' => 'shipping_zipcode', 'required' => true]) !!}
@if ($errors->has('shipping_zipcode'))
<label for="shipping_zipcode" class="error text-danger small"
style="display: block;">{{ $errors->first('shipping_zipcode') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="shipping_city">Stadt <span class="required">*</span></label>
{!! Form::text('shipping_city', '', ['class' => 'form-control ' . ($errors->has('shipping_city') ? 'error' : ''), 'id' => 'shipping_city', 'required' => true]) !!}
@if ($errors->has('shipping_city'))
<label for="shipping_city" class="error text-danger small"
style="display: block;">{{ $errors->first('shipping_city') }}</label>
@endif
</div>
</div>
</div>
<script>
$(document).ready(function() {
$('#invoice_details_holder select').selectpicker();
var validator = $("#shop-form-validations").validate({
submitHandler: function(form) {
$('.button-prevent-multiple-submits').attr('disabled', true);
$('.button-prevent-multiple-submits').find('.spinner').show();
form.submit();
},
errorPlacement: function errorPlacement(error, element) {
var placement = $(element).data('error');
if (placement) {
$(placement).append(error.addClass('invalid-feedback d-block'));
} else {
error.insertAfter(element).addClass('invalid-feedback small d-block');
}
},
highlight: function( element, errorClass, validClass ) {
if($(element).hasClass('selectpicker')){
$(element).parent('.form-control').find('.dropdown-toggle').addClass( errorClass ).removeClass( validClass );
}else if ( element.type === "radio" ) {
this.findByName( element.name ).addClass( errorClass ).removeClass( validClass );
} else {
$( element ).addClass( errorClass ).removeClass( validClass );
}
},
unhighlight: function( element, errorClass, validClass ) {
if($(element).hasClass('selectpicker')){
$(element).parent('.form-control').find('.dropdown-toggle').removeClass( errorClass ).addClass( validClass );
} else if ( element.type === "radio" ) {
this.findByName( element.name ).removeClass( errorClass ).addClass( validClass );
} else {
$( element ).removeClass( errorClass ).addClass( validClass );
}
},
messages: {
user_free_product_id: {
required: "Bitte ein Produkt auswählen.",
},
switchers_shipping: {
required: "Bitte eine Auswahl treffen.",
},
payment_method: {
required: "Bitte eine Zahlungsart auswählen.",
}
}
});
$('select.revalidat').on('change', function () {
validator.element($(this));
});
function switch_invoice_details_germany(){
if($('input#switch_invoice_details_germany').is(':checked')){
$('.show_invoice_details_germany').hide('slow');
}else{
$('.show_invoice_details_germany').show('slow');
}
}
switch_invoice_details_germany();
$('input#switch_invoice_details_private').on('change', function () {
if($(this).is(':checked')){
$('.show_invoice_details_private').hide('slow');
}else{
$('.show_invoice_details_private').show('slow');
}
});
$('input#switch_invoice_details_germany').on('change', function () {
switch_invoice_details_germany();
});
// Shipping Address show|hide
$("#shipping_address_switch").bind("change", function() {
$('#shipping_address').slideToggle(200, function() {
if ($('#shipping_address').is(":visible")) {
_scrollTo('#shipping_address', 60);
}
});
});
if ($('#shipping_address_switch').is(':checked')) {
$('#shipping_address').show();
} else {
$('#shipping_address').hide();
}
});
</script>

View file

@ -0,0 +1,132 @@
<h2 class="mt-3">Rechnungsdetails</h2>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="billing_firstname">Vorname <span class="required">*</span></label>
{!! Form::text('billing_firstname', '', ['class' => 'form-control ' . ($errors->has('billing_firstname') ? 'error' : ''), 'id' => 'billing_firstname', 'required' => true]) !!}
@if ($errors->has('billing_firstname'))
<label for="billing_firstname" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_firstname') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="billing_lastname">Nachname <span class="required">*</span></label>
{!! Form::text('billing_lastname', '', ['class' => 'form-control ' . ($errors->has('billing_lastname') ? 'error' : ''), 'id' => 'billing_lastname', 'required' => true]) !!}
@if ($errors->has('billing_lastname'))
<label for="billing_lastname" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_lastname') }}</label>
@endif
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="billing_state">Land / Region <span class="required">*</span></label>
<select id="billing_state" name="billing_state" class="form-control selectpicker"
data-style="btn-default" required>
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId(), false, 2) !!}
</select>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="billing_address">Straße + Hausnummer <span
class="required">*</span></label>
{!! Form::text('billing_address', '', ['class' => 'form-control ' . ($errors->has('billing_address') ? 'error' : ''), 'id' => 'billing_address', 'required' => true]) !!}
@if ($errors->has('billing_address'))
<label for="billing_address" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_address') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="billing_zipcode">PLZ <span class="required">*</span></label>
{!! Form::text('billing_zipcode', '', ['class' => 'form-control ' . ($errors->has('billing_zipcode') ? 'error' : ''), 'id' => 'billing_zipcode', 'required' => true]) !!}
@if ($errors->has('billing_zipcode'))
<label for="billing_zipcode" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_zipcode') }}</label>
@endif
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="billing_city">Stadt <span class="required">*</span></label>
{!! Form::text('billing_city', '', ['class' => 'form-control ' . ($errors->has('billing_city') ? 'error' : ''), 'id' => 'billing_city', 'required' => true]) !!}
@if ($errors->has('billing_city'))
<label for="billing_city" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_city') }}</label>
@endif
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="billing_email">E-Mail <span class="required">*</span></label>
{!! Form::email('billing_email', '', ['class' => 'form-control ' . ($errors->has('billing_email') ? 'error' : ''), 'id' => 'billing_email', 'required' => true]) !!}
@if ($errors->has('billing_email'))
<label for="billing_email" class="error text-danger small"
style="display: block;">{{ $errors->first('billing_email') }}</label>
@endif
</div>
</div>
</div>
<script>
$(document).ready(function() {
$('#invoice_details_holder select').selectpicker();
var validator = $("#shop-form-validations").validate({
submitHandler: function(form) {
$('.button-prevent-multiple-submits').attr('disabled', true);
$('.button-prevent-multiple-submits').find('.spinner').show();
form.submit();
},
errorPlacement: function errorPlacement(error, element) {
var placement = $(element).data('error');
if (placement) {
$(placement).append(error.addClass('invalid-feedback d-block'));
} else {
error.insertAfter(element).addClass('invalid-feedback small d-block');
}
},
highlight: function( element, errorClass, validClass ) {
if($(element).hasClass('selectpicker')){
$(element).parent('.form-control').find('.dropdown-toggle').addClass( errorClass ).removeClass( validClass );
}else if ( element.type === "radio" ) {
this.findByName( element.name ).addClass( errorClass ).removeClass( validClass );
} else {
$( element ).addClass( errorClass ).removeClass( validClass );
}
},
unhighlight: function( element, errorClass, validClass ) {
if($(element).hasClass('selectpicker')){
$(element).parent('.form-control').find('.dropdown-toggle').removeClass( errorClass ).addClass( validClass );
} else if ( element.type === "radio" ) {
this.findByName( element.name ).removeClass( errorClass ).addClass( validClass );
} else {
$( element ).removeClass( errorClass ).addClass( validClass );
}
},
messages: {
user_free_product_id: {
required: "Bitte ein Produkt auswählen.",
},
switchers_shipping: {
required: "Bitte eine Auswahl treffen.",
},
payment_method: {
required: "Bitte eine Zahlungsart auswählen.",
}
}
});
$('select.revalidat').on('change', function () {
validator.element($(this));
});
});
</script>

View file

@ -0,0 +1,62 @@
@if(config('app.debug'))
@if(isset($userMargin))
<div class="row">
<div class="col-12 text-left">
<h2 class="mt-3">Provision / DEBUG</h2>
<div class="text-left mt-2">
<table class="table">
<tbody>
<tr>
<td class="text-left no-border-top">Summe netto:</td>
<td class="no-border-top">
{{ Yard::instance('shopping')->subtotal(null, null, null, false) }} *
</td>
</tr>
@dump($userMargin)
@if($userMargin->yard_margin && $userMargin->yard_margin->isMargin())
@foreach($userMargin->yard_margin->items as $item)
<tr>
<td class="text-left">Staffelrabatt
<br>ab {{ $item->getFormatted('price_from') }} / {{ $item->getFormatted('trading_margin') }}% :</td>
<td>
- {{ $item->getFormatted('value_margin') }} *
</td>
</tr>
@endforeach
@endif
@if($userMargin->yard_commission && $userMargin->yard_commission->isCommission())
<tr>
<td class="text-left">Einzelrabatt:</td>
<td>
- {{ $userMargin->yard_commission->getFormatted('single_value_commission') }} *
</td>
</tr>
@endif
<tr>
<td class="text-left"><strong>Summe (Netto):</strong></td>
<td>
<strong>{{ Yard::instance('shopping')->subtotal() }} *</strong>
</td>
</tr>
@if($userMargin->yard_margin && $userMargin->yard_margin->net_partner_commission > 0)
<tr>
<td class="text-left"><em>Provision Vertriebspartern:</em></td>
<td>
<em>{{ $userMargin->yard_margin->getFormatted('net_partner_commission') }} *</em>
</td>
</tr>
@endif
</table>
</div>
</div>
</div>
<hr>
@endif
@endif