promotion 1.0

This commit is contained in:
Kevin Adametz 2021-12-25 02:51:22 +01:00
parent 1cc8e025a1
commit 570d428b1c
60 changed files with 1596 additions and 272 deletions

View file

@ -15,6 +15,7 @@
'your_request_from' => 'Deine Anfrage von',
'checkout_subject' => 'Deine Bestellung',
'checkout_subject_paid' => 'Zahlungsbestätigung - Deine Bestellung',
'checkout_subject_non_paid' => 'Bestätigung - Deine Bestellung',
'checkout_subject_extern' => 'Neue Bestellung',
'change_e_mail' => 'E-Mail Adresse ändern',
'salutation' => 'Hallo',
@ -66,6 +67,7 @@
'checkout_mail_your_mail' => 'Deine E-Mai:',
'checkout_mail_invoice_addess' => 'Deine Rechnungsadresse:',
'checkout_mail_deliver_addess' => 'Deine Lieferadresse:',
'checkout_mail_pickup_addess' => 'Ich hole die Ware persönlich ab:',
'checkout_mail_deliver_customer' => 'Lieferadresse des Kunden:',
'checkout_mail_order_for_me' => 'Beraterbestellung für Dich:',
'checkout_mail_order_for_ot' => 'Beraterbestellung für Deinen Kunden:',
@ -86,5 +88,6 @@
'checkout_mail_bank_code' => 'Verwendungszweck',
'checkout_mail_pay_approved' => 'Deine Zahlung wurde genehmigt, eine Bestätigung der Zahlung wird automatisch erstellt.',
'checkout_mail_pay_invoice_open' => 'Deine Zahlung per Rechnung wurde genehmigt.',
'checkout_mail_pay_non' => 'Deine Bestellung wurde ausgeführt.',
'checkout_mail_system_status' => 'SystemStatus:',
);

View file

@ -23,4 +23,7 @@ return [
'payment_for_account' => 'Aufladung durch Mitgliedschaft',
'user_order_deduction' => 'Abzug durch Bestellung',
'user_order_return' => 'Rückführung durch Storno',
'promotion_order_deduction' => 'Abzug durch Promotion Produkt',
'promotion_order_return' => 'Rückführung durch Promotion Produkt',
];

View file

@ -75,6 +75,8 @@
<p>
<span class="text-muted">#{{$current->member->number}}</span><br>
{{$current->member->getFullName()}}<br>
@if(isset($current->member->account->zipcode)){{$current->member->account->zipcode}} @endif
@if(isset($current->member->account->city)){{$current->member->account->city}} @endif <br>
{{$current->member->account->zipcode}} {{$current->member->account->city}}<br>
@if($current->member->shop)
@if($current->member->isActive() && $current->member->isActiveShop())

View file

@ -34,17 +34,28 @@
<div class="form-row">
<div class="form-group col-12">
<label class="form-label" for="description">{{ __('Promotioninfo') }}</label>
{{ Form::textarea('description', $promotion->description , array('placeholder'=>__('Interne Notiz'), 'class'=>'form-control', 'rows'=>2, 'id'=>'description')) }}
{{ Form::textarea('description', $promotion->description , array('placeholder'=>__('Interne Notiz'), 'class' => 'form-control text-autosize', 'rows' => 1, 'id'=>'description')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-12">
<label class="form-label" for="user_description">{{ __('Vertriebspartner - Kurzbeschreibung Deiner Promotion') }}</label>
{{ Form::textarea('user_description', $promotion->user_description , array('placeholder'=>__('Kurzbeschreibung'), 'class' => 'form-control bootstrap-maxlength text-autosize', 'maxlength'=>600, 'rows' => 1, 'id'=>'description')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-12">
<label class="form-label" for="user_about">{{ __('Vertriebspartner - Kurzer Text über Dich') }}</label>
{{ Form::textarea('user_about', $promotion->user_about , array('placeholder'=>__('Text über Dich'), 'class' => 'form-control bootstrap-maxlength text-autosize', 'maxlength'=>600, 'rows' => 1, 'id'=>'description')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-3">
<label class="form-label" for="max_bugdet">{{ __('Max. gesamtes Budget für diese Promotion') }}</label>
{{ Form::text('max_bugdet', $promotion->getFormattedMaxBugdet(), array('placeholder'=>__('Budget in Euro / Brutto'), 'class'=>'form-control', 'id'=>'max_bugdet')) }}
</div>
<div class="form-group col-sm-3">
<label class="form-label" for="max_items">{{ __('Max. gesamte Produkte für diese Promotion') }}</label>
{{ Form::text('max_items', $promotion->max_items, array('placeholder'=>__('Einheiten in Stück'), 'class'=>'form-control', 'id'=>'max_items')) }}

View file

@ -300,7 +300,14 @@
<strong>Vertriebspartnerbestellung für Mitgliedschaft</strong>
@endif
@if($shopping_order->shopping_user->is_from === 'shopping')
<strong>Kundenbestellung über Shop</strong>
@if($shopping_order->payment_for === 4)
<strong>Kundenbestellung über Promotion</strong>
@if($shopping_order->promotion_user)
<br>{{ $shopping_order->promotion_user->name }} || {{ $shopping_order->promotion_user->user->getFullName() }}
@endif
@else
<strong>Kundenbestellung über Shop</strong>
@endif
@endif
@if($shopping_order->shopping_user->is_from === 'homeparty')
<h5>Vertriebspartnerbestellung für eine Homeparty</h5>
@ -319,7 +326,6 @@
}
</style>
<div class="table-responsive">
<table class="table table-product m-0" style="">
<tbody>
@ -352,7 +358,10 @@
<small>
<span class="text-muted">Inhalt: </span> {{ $shopping_order_item->product->contents }}<br>
<span class="text-muted">Gewicht: </span> {{ $shopping_order_item->product->weight }} g<br>
{{-- <span class="text-muted">Points: </span> {{ $shopping_order_item->product->points }} --}}
@if($shopping_order_item->isFreeProduct())
<span class="">Promotionprodukt</span><br>
@endif
{{-- <span class="text-muted">Points: </span> {{ $shopping_order_item->product->points }} --}}
</small>
</div>
@endif
@ -379,7 +388,6 @@
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<style>
@ -475,7 +483,6 @@
</div>
</div>
<hr class="m-0">
@if($shopping_order->txaction === 'extern')
<div class="card-body">
@if($shopping_order->wp_invoice_path)
@ -502,8 +509,6 @@
</div>
<hr class="m-0">
@endif
<div class="card-body">
<h6 class="small font-weight-semibold">
Zahlung

View file

@ -48,6 +48,7 @@
<th>{{__('Zahlung')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Versand')}}</th>
<th>{{__('Art')}}</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
@ -79,6 +80,7 @@
{ data: 'payment', name: 'payment', orderable: false },
{ data: 'txaction', name: 'txaction' },
{ data: 'shipped', name: 'shipped' },
{ data: 'is_for', name: 'is_for' },
{ data: 'shopping_user.billing_firstname', name: 'shopping_user.billing_firstname' },
{ data: 'shopping_user.billing_lastname', name: 'shopping_user.billing_lastname' },
{ data: 'shopping_user.billing_email', name: 'shopping_user.billing_email' },

View file

@ -181,8 +181,10 @@
<table style="padding: 20px; border:1px solid #eee; background-color: #fff;line-height:1.6em;" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td style="line-height:1.6em;">
@if($shopping_payment->clearingtype !== "non")
<b>{{__('email.checkout_mail_pay_success')}} </b><br>
{{__('email.checkout_mail_pay_with')}} {{$shopping_payment->getPaymentType()}}<br>
@endif
{{__('email.checkout_mail_pay_ref')}} {{$shopping_payment->reference}}<br>
{{__('email.checkout_mail_your_mail')}} {{ $shopping_order->shopping_user->billing_email }}<br>
</td>
@ -285,6 +287,32 @@
<hr>
</td>
</tr>
@if($shopping_order->shipping_option === 'pick_up')
<tr>
<td class="sub_headline">
<b>{{__('email.checkout_mail_pickup_addess')}}</b>
</td>
</tr>
<tr>
<td style="color:#37302d;">
<table style="padding: 20px; border:1px solid #eee; background-color: #fff" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="color:#37302d;line-height:1.6em;">
@if($shopping_order->promotion_user)
{!! nl2br($shopping_order->promotion_user->user_address) !!}
@endif
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<hr>
</td>
</tr>
@endif
<tr>
<td style="color:#37302d;font-size: 14px;line-height:1.6em;">
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="100%">

View file

@ -146,7 +146,6 @@
<b>{{__('email.checkout_mail_pay_error')}}</b><br>
@elseif($txaction === 'open')
@if($shopping_payment->clearingtype === "vor")
<b>{{__('email.checkout_mail_pay_pre')}}</b><br>
{{__('email.checkout_mail_pay_pre_c1')}} {{ number_format( (float) ($shopping_payment->amount/100), 2, ",", ".") }} {{__('email.checkout_mail_pay_pre_c2')}}<br>
@ -161,16 +160,21 @@
</p>
<hr />
@else
<b>{{__('email.checkout_mail_pay_invoice_open')}}</b><br>
@if($shopping_payment->clearingtype === "non")
<b>{{__('email.checkout_mail_pay_non')}}</b><br>
@else
<b>{{__('email.checkout_mail_pay_invoice_open')}}</b><br>
@endif
@endif
@elseif($txaction === 'xxx')
<b>{{__('email.checkout_mail_pay_approved')}}</b><br>
@else
<b>{{__('email.checkout_mail_system_status')}} {{$txaction}}</b><br>
@endif
{{__('email.checkout_mail_pay_with')}} {{$shopping_payment->getPaymentType()}}<br>
@if($shopping_payment->clearingtype !== "non")
{{__('email.checkout_mail_pay_with')}} {{$shopping_payment->getPaymentType()}}<br>
@endif
{{__('email.checkout_mail_pay_ref')}} {{$shopping_payment->reference}}<br>
{{__('email.checkout_mail_your_mail')}} {{ $shopping_order->shopping_user->billing_email }}<br>
</td>
@ -274,6 +278,33 @@
<hr>
</td>
</tr>
@if($shopping_order->shipping_option === 'pick_up')
<tr>
<td class="sub_headline">
<b>{{__('email.checkout_mail_pickup_addess')}}</b>
</td>
</tr>
<tr>
<td style="color:#37302d;">
<table style="padding: 20px; border:1px solid #eee; background-color: #fff" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="color:#37302d;line-height:1.6em;">
@if($shopping_order->promotion_user)
{!! nl2br($shopping_order->promotion_user->user_address) !!}
@endif
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<hr>
</td>
</tr>
@endif
<tr>
<td style="color:#37302d;font-size: 14px;">
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="100%">

View file

@ -62,12 +62,15 @@
<div>{{ __('navigation.my_clients') }}</div>
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('user/customers', 'user/customer/detail/*') ? ' active' : '' }}">
<li class="sidenav-item{{ Request::is('user/customers', 'user/customer/detail/*', 'user/sales/orders') ? ' active' : '' }}">
<a href="{{ route('user_customers') }}" class="sidenav-link"><i class="sidenav-icon ion ion ion-md-contacts"></i><div>{{ __('navigation.overview') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('user/customer/add/*') ? ' active' : '' }}">
<a href="{{ route('user_customer_add', ['new']) }}" class="sidenav-link"><i class="sidenav-icon ion ion ion-md-person-add"></i><div>{{ __('navigation.add') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('user/sales/orders') ? ' active' : '' }}">
<a href="{{ route('user_sales_orders') }}" class="sidenav-link"><i class="sidenav-icon ion ion ion-ios-list"></i><div>{{ __('navigation.orders') }}</div></a>
</li>
</ul>
</li>
@endif

View file

@ -269,7 +269,9 @@
@if($shopping_order->shopping_user->billing_company)
{{ $shopping_order->shopping_user->billing_company }}<br>
@else
@if($shopping_order->payment_for !== 4)
Firma <br>
@endif
@endif
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_order->shopping_user->billing_salutation) }}
{{ $shopping_order->shopping_user->billing_firstname }} {{ $shopping_order->shopping_user->billing_lastname }}<br>

View file

@ -255,7 +255,7 @@
{{ $promotion_admin_product->getFormattedPriceWith(false) }} &euro;
</td>
<td class="align-middle px-3 py-2 nowrap text-right" style="">
<span class="calculate_product_qty_price_total" data-qty-id="product_qty_{{ $promotion_admin_product->id }}" data-price="{{ $promotion_admin_product->getPriceWith(false) }}"></span> &euro;
<span class="calculate_product_qty_price_total" data-admin_product_id="{{ $promotion_admin_product->id }}" data-price="{{ $promotion_admin_product->getPriceWith(false) }}"></span> &euro;
</td>
<td class="align-middle px-3 py-2 text-right" style="">
{{ $promotion_admin_product->getPromotionUserProducts($user_promotion, 'sell_items') }}

View file

@ -0,0 +1,10 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
<a href="{{route('user_sales_orders')}}" class="btn btn-sm btn-default float-right">zurück</a>
{{ __('Bestellung Kunde') }} <span class="text-muted">#{{$shopping_order->id}}</span>
</h4>
@include('admin.sales._detail')
<a href="{{route('user_sales_orders')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
@endsection

View file

@ -0,0 +1,58 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Bestellungen Kunden') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatable-customers table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Datum')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Art')}}</th>
<th>{{__('Betrag')}}</th>
<!--<th>{{__('Käufe')}}</th-->
</tr>
</thead>
</table>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatable-customers').dataTable({
"processing": true,
"serverSide": true,
"ajax": '{!! route('user_sales_orders_datatable') !!}',
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false },
{ data: 'shopping_user.billing_firstname', name: 'shopping_user.billing_firstname' },
{ data: 'shopping_user.billing_lastname', name: 'shopping_user.billing_lastname' },
{ data: 'shopping_user.billing_email', name: 'shopping_user.billing_email' },
{ data: 'created_at', name: 'created_at' },
{ data: 'txaction', name: 'txaction' },
{ data: 'is_for', name: 'is_for' },
{ data: 'total_shipping', name: 'total_shipping' },
// { data: 'shopping_user.orders', name: 'shopping_user.orders' },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -2,9 +2,10 @@
<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">
<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))
@ -28,6 +29,7 @@
</tr>
@endif
{{--
@if (true || \App\Models\PaymentMethod::isShowPaymentMethod('SB', $user_payment_methods, 0))
<tr>
<td class="align-middle px-0 pl-1p">
@ -40,7 +42,7 @@
<span class="switcher-no"></span>
</span>
<span class="switcher-label font-weight-bold text-left">Sofort
-Überweisung</span>
Überweisung</span>
</label>
</td>
<td class="text-right align-middle px-0 py-3 ui-w-100">
@ -69,6 +71,7 @@
</td>
</tr>
@endif
--}}
@if (true || \App\Models\PaymentMethod::isShowPaymentMethod('VOR', $user_payment_methods, 0))
<tr>
<td class="align-middle px-0 pl-1p">
@ -92,34 +95,34 @@
</tbody>
</table>
</div>
<h3 class="mt-4">Warenkorb</h3>
@endif
<h3 class="">Warenkorb</h3>
<div class="checkout-cart">
<div class="mb-2">
<span class="float-right">0,00 </span>
<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">0,00 </span>
<span class="float-right">{{ Yard::instance('shopping')->shipping() }} </span>
<span class="">Versandkosten:</span>
</div>
<div class="mb-2">
<span class="float-right">Deutschland</span>
<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">0,00 </span>
<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">0,00 </span>
<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>0,00 </strong></span>
<span class="float-right"><strong>{{ Yard::instance('shopping')->totalWithShipping() }} </strong></span>
<strong class="">Gesamtsumme:</strong>
</div>
<hr class="light">
@ -148,10 +151,17 @@
<i class="ion ion-ios-share-alt"></i> Jetzt kaufen <i class="spinner fa fa-spinner fa-spin"></i>
</button>
<hr class="light">
<p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i
class="fa fa-lock"></i> Sind alle Deine Angaben vollsätndig ausgefüllt,
klicke auf "Jetzt kaufen" und Du wist zu unserem Zahlungsanbieter weitergeleitet,
die Verbindung ist SSL verschlüsselt.</em></p>
@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 vollsätndig 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 vollsätndig ausgefüllt,
klicke auf "Jetzt kaufen" und die Bestellung wird abgeschlossen,
die Verbindungen sind SSL verschlüsselt.</em></p>
@endif
</div>
</div>

View file

@ -30,9 +30,9 @@
<div class="mt-4 mb-3">
<div class="switcher-holder btn-add-free-product">
<label class="switcher switcher-success">
<input type="radio" class="switcher-input" name="user_free_product"
value="{{ $promotion_user_product->product->id }}" data-error="#error-user_free_product"
@if($free_product_id === $promotion_user_product->product->id) checked @endif
<input type="radio" class="switcher-input" name="free_product_id"
value="{{ $promotion_user_product->id }}" data-product_id={{ $promotion_user_product->product->id }} data-error="#error-free_product_id"
@if($free_product_id === $promotion_user_product->id) checked @endif
required>
<span class="switcher-indicator">
<span class="switcher-yes">
@ -50,7 +50,7 @@
@endif
@endforeach
<div class="col-12">
<div id="error-user_free_product" class="text-center"></div>
<div id="error-free_product_id" class="text-center"></div>
<hr class="">
</div>
</div>

View file

@ -16,6 +16,5 @@
</div>
</div>
</div>
</div>

View file

@ -232,4 +232,78 @@
@endif
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$('#invoice_details_holder select').selectpicker();
var validator = $("#user-promotion-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) {
console.log(error);
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));
});
// 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,133 @@
<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(1) !!}
</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 = $("#user-promotion-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) {
console.log(error);
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

@ -46,7 +46,7 @@
</div>
</div>
<div class="options">
@if(!$row->options->free_product)
@if(!$row->options->free_product_id)
<a href="#"
class="auto-delete-product remove_item_form_cart product-tooltip"
data-row-id="{{$row->rowId}}"
@ -62,7 +62,7 @@
{{ Yard::instance('shopping')->rowPrice($row, 2) }} &euro;*</div>
</div>
<div class="col-6 col-sm-3 col-md-3 quantity">
@if(!$row->options->free_product)
@if(!$row->options->free_product_id)
<div class="quantity-select">
<input type="number"
class="form-control text-center cart-input-event-onchange"

View file

@ -3,8 +3,10 @@
<div class="col-md-6 text-left">
<h2 class="mt-3">Wähle Deine Versandart</h2>
<div class="switchers-stacked">
@php($shipping_option = Yard::instance('shopping')->getShippingOption())
<label class="switcher switcher-success">
<input type="radio" class="switcher-input" name="switchers_shipping" data-error="#error-switchers_shipping" value="pick_up" required>
<input type="radio" class="switcher-input" name="switchers_shipping" data-error="#error-switchers_shipping" value="pick_up" required
@if($shipping_option === 'pick_up') checked @endif>
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>
@ -26,7 +28,8 @@
</label>
--}}
<label class="switcher switcher-success">
<input type="radio" class="switcher-input" name="switchers_shipping" data-error="#error-switchers_shipping" value="dhl_shipping">
<input type="radio" class="switcher-input" name="switchers_shipping" data-error="#error-switchers_shipping" value="dhl_shipping"
@if($shipping_option === 'dhl_shipping') checked @endif>
<span class="switcher-indicator">
<span class="switcher-yes">
<span class="ion ion-md-checkmark"></span>

View file

@ -52,4 +52,39 @@
* Preis inkl. gesetzl. MwSt. | zzgl. Versandkosten
<hr class="">
</div>
</section>
</section>
<script>
$(document).ready(function() {
var swiper = new Swiper(".mySwiper", {
slidesPerView: 1,
spaceBetween: 10,
pagination: {
el: ".swiper-pagination",
clickable: true,
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
breakpoints: {
576: {
slidesPerView: 1,
spaceBetween: 10,
},
768: {
slidesPerView: 2,
spaceBetween: 20,
},
992: {
slidesPerView: 3,
spaceBetween: 20,
},
1200: {
slidesPerView: 3,
spaceBetween: 20,
},
},
});
});
</script>

View file

@ -16,7 +16,6 @@
</div>
@endif
{!! Form::open(['url' => route('web_promotion_store', $promotion_user->id), 'class' => 'form-horizontal form-prevent-multiple-submits', 'id' => 'user-promotion-form-validations']) !!}
<input type="hidden" name="load_url" value="{{ route('web_promotion_modal_load') }}">
<div class="layout-content">
@ -37,12 +36,18 @@
<section>
<div class="row">
<div class="col-lg-8 col-md-7">
@include('web.promotion._invoice_details')
<section id="invoice_details_holder">
@if(Yard::instance('shopping')->isQuickShipping())
@include('web.promotion._invoice_details_quick')
@else
@include('web.promotion._invoice_details')
@endif
</section>
</div>
<div class="col-lg-4 col-md-5">
@include('web.promotion._checkout')
<section id="promotion_checkout_holder">
@include('web.promotion._checkout')
</section>
</div>
</div>
</section>
@ -50,110 +55,11 @@
</div>
{!! Form::close() !!}
<script>
$(document).ready(function() {
var iqShoppingShopCart = IqPromotionShopCart.init();
var validator = $("#user-promotion-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) {
console.log(error);
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: {
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));
});
var swiper = new Swiper(".mySwiper", {
slidesPerView: 1,
spaceBetween: 10,
pagination: {
el: ".swiper-pagination",
clickable: true,
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
breakpoints: {
576: {
slidesPerView: 1,
spaceBetween: 10,
},
768: {
slidesPerView: 2,
spaceBetween: 20,
},
992: {
slidesPerView: 3,
spaceBetween: 20,
},
1200: {
slidesPerView: 3,
spaceBetween: 20,
},
},
});
// 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>
@endsection
@section('scripts')

View file

@ -15,22 +15,62 @@
</div>
</div>
@endif
{!! Form::open(['url' => route('web_promotion_store', $promotion_user->id), 'class' => 'form-horizontal form-prevent-multiple-submits', 'id' => 'user-promotion-form-validations']) !!}
<div class="layout-content">
<div class="container px-3">
<div class="container flex-grow-1 container-p-y pb-0">
<div class="media align-items-center pt-3 mb-3">
{{-- <img src="assets/img/avatars/5-small.png" alt="" class="d-block ui-w-100 rounded-circle"> --}}
<div class="media align-items-top py-3 mb-3">
@if($promotion_user->user->hasProfileImage())
<img src="{{ route('response_file', ['user', $promotion_user->user->getProfileImage()]) }}" alt="" class="d-block ui-w-100 rounded-circle mt-3">
@endif
<div class="media-body ml-4">
<h1 class="text-center">Super, geschafft!</h1>
<p class="text-center">
Ich danke Dir ..
</p>
<p class="text-center">Liebe Grüße,<br>{{ $promotion_user->user->getFullName() }}<br>Vertriebspartner:in der GRÜNEN SEELE Naturkosmetik</p>
<h1 class="text-left">Super, geschafft!</h1>
<p class="text-left">
Ich danke Dir, dass Du unseren Service nutzt, um die Produkte von GRÜNE SEELE zu testen. Dein:e Produkt:e werden in Kürze versendet und dann freuen wir uns schon auf ein Feedback von Dir.
In Kürze erhälst Du von uns eine Bestellbestätigungsmail.</p>
<h4 class="text-left">Deine Bestellnummer ist: {{ $order_reference }}</h4>
<hr />
@if($pay_trans && $pay_trans->shopping_payment)
@if($pay_trans->shopping_payment->clearingtype === "vor")
<h4 class="text-left">Bezahlung per Vorkasse:</h4>
<p class="text-left" style="line-height: 1.4em">Bitte überweise {{ number_format(($pay_trans->shopping_payment->amount/100), 2, ",", ".") }} EUR auf die folgende Kontoverbindung, um den Kauf abzuschließen.
<br>
<strong>{{__('email.checkout_mail_bank_holder')}}</strong> {!! \App\Models\Setting::getContentBySlug('prepayment-account-owner') !!}<br>
<strong>{{__('email.checkout_mail_bank_iban')}}</strong> {!! \App\Models\Setting::getContentBySlug('prepayment-iban') !!} <br>
<strong>{{__('email.checkout_mail_bank_bic')}}</strong> {!! \App\Models\Setting::getContentBySlug('prepayment-bic') !!} <br>
<strong>{{__('email.checkout_mail_bank_name')}}</strong> {!! \App\Models\Setting::getContentBySlug('prepayment-bank') !!} <br>
<strong>Gesamtbetrag:</strong> {{ number_format( ($pay_trans->shopping_payment->amount/100), 2, ",", ".") }} EUR<br>
<strong>Verwendungszweck:</strong> {{ $pay_trans->transmitted_data['reference'] }}
</p>
<hr />
@endif
@if($pay_trans->shopping_payment->clearingtype === "cc")
<h4>Bezahlung per Kreditkarte:</h4>
<p>Deine Zahlung wurde genehmigt, eine Bestätigung der Zahlung wird automatisch erstellt.</p>
<hr />
@endif
@if($pay_trans->shopping_payment->clearingtype === "elv")
<h4>Bezahlung per SEPA:</h4>
<p>Deine Zahlung wird bearbeitet, eine Bestätigung zur Zahlungsabwicklung wird automatisch erstellt.</p>
<hr />
@endif
@if($pay_trans->shopping_payment->clearingtype === "fnc")
<h4>Bezahlung per Rechnung:</h4>
<p>Deine Bestellung wird bearbeitet, eine Bestätigung zur Bestellungsabwicklung wird automatisch erstellt.</p>
@endif
@if(isset($pay_trans->shopping_payment->shopping_order->shipping_option))
@if($pay_trans->shopping_payment->shopping_order->shipping_option === 'dhl_shipping')
<p>Versand mit DHL (1-3 Werktage).</p>
@endif
@if($pay_trans->shopping_payment->shopping_order->shipping_option === 'pick_up')
<p>Ich hole die Ware bei {{ $promotion_user->user->getFullName() }} persönlich ab.</p>
<h4 class="mt-3">Kontakt &amp; Abholadresse</h4>
<p>{!! nl2br($promotion_user->user_address) !!}</p>
@endif
<hr />
@endif
@endif
<p class="text-left">Liebe Grüße,<br>{{ $promotion_user->user->getFullName() }}<br>Vertriebspartner:in der GRÜNEN SEELE Naturkosmetik</p>
</div>
</div>
</div>
@ -41,11 +81,8 @@
</div>
</div>
{!! Form::close() !!}
<script>
$(document).ready(function() {
});
</script>
@endsection