481 lines
25 KiB
PHP
481 lines
25 KiB
PHP
@if (Yard::instance('shopping')->content()->count())
|
|
@if (Yard::instance('shopping')->compCount() > 0)
|
|
<style>
|
|
.yard-items-head {
|
|
border-bottom: 1px solid #ddd;
|
|
padding-bottom: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.yard-item {
|
|
position: relative;
|
|
padding-top: 8px;
|
|
border-bottom: 1px solid #ddd;
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.yard-item a.shop-item-hl {
|
|
color: #9aa983;
|
|
font-size: 1.1em;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.yard-item .options {
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.yard-item a.auto-delete-product {
|
|
font-size: 0.7em;
|
|
font-weight: bold;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.yard-item .quantity {
|
|
position: relative;
|
|
}
|
|
|
|
.quantity-select {
|
|
text-align: right;
|
|
}
|
|
|
|
.quantity-select select.form-control:not([size]):not([multiple]) {
|
|
width: auto;
|
|
min-width: 5em;
|
|
display: inline-block;
|
|
}
|
|
|
|
.yard-item .price-total {
|
|
margin-top: 6px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.yard-item .font-semi-bold {
|
|
color: #393939;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.yard-item .font-semi-bold .small {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.yard-item .font-bold {
|
|
color: #393939;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.price-single {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.price-total {
|
|
font-weight: 600;
|
|
font-size: 0.95rem;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.quantity-select {
|
|
text-align: right;
|
|
}
|
|
|
|
.quantity-select input.form-control {
|
|
width: auto;
|
|
min-width: 4em;
|
|
display: inline-block;
|
|
}
|
|
|
|
.xsmall {
|
|
font-size: 85%;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.md-btn-extra {
|
|
width: calc(1.7rem + 2px);
|
|
line-height: 1.5rem;
|
|
}
|
|
|
|
/* Nicht umbrechen, sonst stapeln sich -/+/Input untereinander (Bootstrap input-group: flex-wrap: wrap). */
|
|
.quantity-select .input-group {
|
|
flex-wrap: nowrap;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.quantity-select .input-group .md-btn-extra {
|
|
flex: 0 0 auto;
|
|
width: calc(1.7rem + 2px);
|
|
}
|
|
|
|
/* Spezifischer als ".quantity-select input.form-control" (min-width: 4em / inline-block) weiter oben. */
|
|
.quantity-select .input-group .form-control.input-extra {
|
|
flex: 0 0 44px;
|
|
width: 44px;
|
|
min-width: 44px;
|
|
display: block;
|
|
padding: 0.28rem 0.6rem;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
min-height: calc(1.8rem + 2px);
|
|
height: calc(1.8rem + 2px);
|
|
}
|
|
|
|
.input-group-min-w {
|
|
min-width: 102px;
|
|
}
|
|
</style>
|
|
<div id="cartContent">
|
|
@if (isset($error_message) && $error_message)
|
|
<div class="alert alert-danger mt-2" id="insert_show_error_message">{{ $error_message }}</div>
|
|
@endif
|
|
|
|
<div class="yard-items-head d-none d-sm-block">
|
|
<div class="row">
|
|
<div class="col-3 col-sm-2">
|
|
<div class="row"> </div>
|
|
</div>
|
|
<div class="col-9 col-sm-10">
|
|
<div class="row">
|
|
<div class="col-12 col-sm-6 col-md-7">
|
|
{{ __('order.article') }}
|
|
</div>
|
|
<div class="col-6 col-sm-3 col-md-2 text-left">
|
|
{{ __('order.unit_price') }}
|
|
</div>
|
|
<div class="col-6 col-sm-3 col-md-3 text-right">
|
|
{{ __('order.quantity') }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@foreach (Yard::instance('shopping')->getContentByOrder() as $row)
|
|
@php($product = \App\Models\Product::find($row->id))
|
|
<div class="row yard-item">
|
|
|
|
<div class="col-3 col-sm-2">
|
|
@if ($row->options->has('image'))
|
|
<img src="{{ route('product_image', [$row->options->image]) }}"
|
|
class="d-block ui-w-80 ui-bordered mr-4" alt="">
|
|
@else
|
|
<img src="{{ asset('/assets/images/1x1.png') }}" class="d-block ui-w-80 ui-bordered mr-4"
|
|
alt="">
|
|
@endif
|
|
</div>
|
|
|
|
<div class="col-9 col-sm-10">
|
|
<div class="row">
|
|
<div class="col-12 col-sm-6 col-md-7 description">
|
|
<div class="media-body">
|
|
<div class="d-block text-body" style="font-size: 15px; font-weight: 500;">
|
|
{{ $row->name }} @if (isset($is_abo) && $is_abo)
|
|
{!! get_abo_type_badge_by_product($product) !!}
|
|
@endif
|
|
</div>
|
|
<div class="text-body">
|
|
<div>{{ __('order.content') }}: {{ $product->contents }}</div>
|
|
<div>{{ __('order.art_no') }}: {{ $product->number }}</div>
|
|
<div>{{ __('order.points') }}: @if ($row->options->comp)
|
|
0
|
|
@else
|
|
{{ $product->getFormattedPoints() }}
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="options">
|
|
@if (!$row->options->comp)
|
|
<a href="#"
|
|
class="auto-delete-product remove_item_form_cart product-tooltip"
|
|
data-row-id="{{ $row->rowId }}" data-product-id="{{ $product->id }}"><i
|
|
class="fa fa-times"></i> {{ __('order.article_remove') }}</a>
|
|
@else
|
|
@if (Yard::instance('shopping')->getNumComp() > 1)
|
|
{{ $row->options->comp }}. {{ __('order.compensation_product') }}
|
|
@else
|
|
{{ __('order.compensation_product') }}
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-6 col-sm-3 col-md-2 text-left font-semi-bold price-single">
|
|
<div class="no-line-break">{{ Yard::instance('shopping')->rowPriceNet($row, 3) }}
|
|
€</div>
|
|
@if (Yard::instance('shopping')->isPriceCurrency())
|
|
<span
|
|
class="xsmall">~{{ Yard::instance('shopping')->getCurrencyByKey('rowPriceNetCurrency', $row, 3) }}
|
|
{{ Yard::instance('shopping')->getPriceCurrencyUnit() }} </span>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="col-6 col-sm-3 col-md-3 quantity">
|
|
<div class="quantity-select">
|
|
@if ($row->options->comp)
|
|
<span class="text-right product-tooltip" data-toggle="tooltip"
|
|
title="{{ __('order.compensation_product') }}">1 x</span>
|
|
@else
|
|
<div class="no-line-break input-group-min-w d-inline-block">
|
|
<div class="input-group d-inline-flex w-auto">
|
|
<span class="input-group-prepend">
|
|
<button type="button"
|
|
class="btn btn-secondary icon-btn md-btn-extra cart-remove-event"
|
|
data-row-id="{{ $row->rowId }}"
|
|
data-product-id="{{ $product->id }}">-</button>
|
|
</span>
|
|
<input type="text"
|
|
class="form-control text-center input-extra cart-input-event-onchange"
|
|
data-row-id="{{ $row->rowId }}"
|
|
data-product-id="{{ $product->id }}" value="{{ $row->qty }}"
|
|
name="quantity[{{ $row->rowId }}]">
|
|
<span class="input-group-append">
|
|
<button type="button"
|
|
class="btn btn-secondary icon-btn md-btn-extra cart-add-event"
|
|
data-row-id="{{ $row->rowId }}"
|
|
data-product-id="{{ $product->id }}">+</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
<div class="price-total text-right">
|
|
<div class="no-line-break">{{ Yard::instance('shopping')->rowSubtotalNet($row) }}
|
|
€</div>
|
|
@if (Yard::instance('shopping')->isPriceCurrency())
|
|
<span
|
|
class="small">~{{ Yard::instance('shopping')->getCurrencyByKey('rowSubtotalCurrency', $row, 3) }}
|
|
{{ Yard::instance('shopping')->getPriceCurrencyUnit() }} </span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
@endforeach
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
|
|
<!-- / Shopping cart table -->
|
|
<div class="d-flex flex-wrap justify-content-between pb-4">
|
|
<div class="mt-2">
|
|
<p class="small mb-2"> {!! __('order.you_has_article_in_shopping_cart', ['num' => Yard::instance('shopping')->compCount()]) !!}</p>
|
|
<p>{{ __('order.points_total') }}: {{ formatNumber(Yard::instance('shopping')->points()) }}</p>
|
|
<button type="button" class="btn btn-default btn-sm" id="clear-products-basket"><i
|
|
class="ion ion-ios-trash"></i> {{ __('order.shopping_cart_delete') }}</button>
|
|
</div>
|
|
<div class="d-flex">
|
|
<div class="text-right mt-2">
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<td class="text-left" style="border-top:none;">{{ __('order.subtotal') }}:</td>
|
|
<td style="border-top:none;">
|
|
<div class="no-line-break">{{ Yard::instance('shopping')->subtotal() }} €</div>
|
|
@if (Yard::instance('shopping')->isPriceCurrency())
|
|
<span
|
|
class="small">~{{ Yard::instance('shopping')->getCurrencyByKey('subtotal') }}
|
|
{{ Yard::instance('shopping')->getPriceCurrencyUnit() }} </span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-left">{{ __('Delivery country') }}:</td>
|
|
<td>{{ Yard::instance('shopping')->getShippingCountryName() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-left">{{ __('order.shipping_costs') }}:</td>
|
|
<td>
|
|
|
|
@php($shippingFree = Yard::instance('shopping')->getShippingFree())
|
|
@php($missingValue = Yard::instance('shopping')->getShippingFreeMissingValue())
|
|
@php($currentShipping = Yard::instance('shopping')->shippingNet())
|
|
@if ($shippingFree && intval($currentShipping) == 0)
|
|
{{-- Versandkostenfrei erreicht --}}
|
|
<div class="badge badge-success font-weight-bold"
|
|
style="font-size: 0.80rem; padding: 0.3rem 0.4rem;">
|
|
<i class="fa fa-check-circle"></i> {{ __('order.free_shipping') }}
|
|
</div>
|
|
<div class="mt-1">
|
|
<small class="text-success font-weight-bold">
|
|
<i class="fa fa-gift"></i>
|
|
{{ __('order.free_shipping_reached', ['amount' => number_format($shippingFree, 2, ',', '.')]) }}
|
|
</small>
|
|
</div>
|
|
@else
|
|
{{-- Normale Versandkosten --}}
|
|
<div class="no-line-break">{{ $currentShipping }} €</div>
|
|
@if (Yard::instance('shopping')->isPriceCurrency())
|
|
<span
|
|
class="small">~{{ Yard::instance('shopping')->getCurrencyByKey('shippingNet') }}
|
|
{{ Yard::instance('shopping')->getPriceCurrencyUnit() }} </span>
|
|
@endif
|
|
|
|
@if ($shippingFree && $missingValue > 0)
|
|
{{-- Zeige wie viel noch fehlt --}}
|
|
<div class="mt-1">
|
|
<small class="text-info">
|
|
<i class="fa fa-info-circle"></i>
|
|
{{ __('order.free_shipping_info', [
|
|
'amount' => number_format($shippingFree, 2, ',', '.'),
|
|
'missing' => number_format($missingValue, 2, ',', '.'),
|
|
]) }}
|
|
</small>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-left">{{ __('order.total_without_VAT') }}:</td>
|
|
<td>
|
|
<div class="no-line-break">
|
|
{{ Yard::instance('shopping')->subtotalWithShipping() }} €</div>
|
|
@if (Yard::instance('shopping')->isPriceCurrency())
|
|
<span
|
|
class="small">~{{ Yard::instance('shopping')->getCurrencyByKey('subtotalWithShipping') }}
|
|
{{ Yard::instance('shopping')->getPriceCurrencyUnit() }} </span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="text-left">{{ __('order.plus_VAT') }}:</td>
|
|
<td>
|
|
<div class="no-line-break">{{ Yard::instance('shopping')->taxWithShipping() }} €
|
|
</div>
|
|
@if (Yard::instance('shopping')->isPriceCurrency())
|
|
<span
|
|
class="small">~{{ Yard::instance('shopping')->getCurrencyByKey('taxWithShipping') }}
|
|
{{ Yard::instance('shopping')->getPriceCurrencyUnit() }} </span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@if (Yard::instance('shopping')->getUserTaxFree())
|
|
<tr>
|
|
<td class="text-left"><strong>{{ __('order.total_net') }}:</strong></td>
|
|
<td>
|
|
<strong>
|
|
<div class="no-line-break">
|
|
{{ Yard::instance('shopping')->totalWithShipping() }} €</div>
|
|
</strong>
|
|
@if (Yard::instance('shopping')->isPriceCurrency())
|
|
<span
|
|
class="small">~{{ Yard::instance('shopping')->getCurrencyByKey('totalWithShipping') }}
|
|
{{ Yard::instance('shopping')->getPriceCurrencyUnit() }} </span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@else
|
|
<tr>
|
|
<td class="text-left"><strong>{{ __('order.total_gross') }}:</strong></td>
|
|
<td>
|
|
<strong>
|
|
<div class="no-line-break">
|
|
{{ Yard::instance('shopping')->totalWithShipping() }} €</div>
|
|
</strong>
|
|
@if (Yard::instance('shopping')->isPriceCurrency())
|
|
<span
|
|
class="small">~{{ Yard::instance('shopping')->getCurrencyByKey('totalWithShipping') }}
|
|
{{ Yard::instance('shopping')->getPriceCurrencyUnit() }} </span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
|
|
@if (isset($is_abo) && $is_abo)
|
|
<div class="text-right">
|
|
<div class="alert alert-info">
|
|
<h4>{{ __('abo.abo_settings') }}</h4>
|
|
|
|
<div class="form-row">
|
|
<div class="col-6 col-sm-8 col-md-9 col-lg-9 mb-1">
|
|
</div>
|
|
<div class="col-12 col-sm-4 col-md-3 col-lg-3 mb-1 text-right">
|
|
<label class="form-label">{{ __('abo.delivery_day') }}*</label>
|
|
<select class="custom-select" name="abo_interval" id="abo_interval_select">
|
|
{!! HTMLHelper::getAboDeliveryOptions() !!}
|
|
</select>
|
|
<div id="abo_interval_info" class="alert alert-info mt-2 small"></div>
|
|
<div id="abo_interval_warning" class="alert alert-warning mt-2 small d-none"></div>
|
|
</div>
|
|
|
|
<div class="col-12 col-sm-12 col-md-4 col-lg-6 mb-1">
|
|
</div>
|
|
<div class="col-12 col-sm-12 col-md-8 col-lg-6 mb-1">
|
|
<div class="text-right">
|
|
<em class="small"> <i> {!! __('abo.abo_order_info_check') !!}</em>
|
|
<hr
|
|
style="margin-top: 10px; margin-bottom: 10px; border-color: #b4b4b4; border-width: 1px;">
|
|
<em class="font-weight-bold"> <i> {!! __('abo.abo_order_info_check_2') !!}</em>
|
|
<hr
|
|
style="margin-top: 10px; margin-bottom: 10px; border-color: #b4b4b4; border-width: 1px;">
|
|
<em class="small"> <i> {!! __('abo.abo_order_info_check_3', [
|
|
'abo-min-duration' => \App\Models\Setting::getContentBySlug('abo-min-duration'),
|
|
]) !!}</em>
|
|
<hr
|
|
style="margin-top: 10px; margin-bottom: 10px; border-color: #b4b4b4; border-width: 1px;">
|
|
|
|
<label class="switcher switcher-success">
|
|
<input type="checkbox" class="switcher-input" name="abo_order_info_checkbox"
|
|
value="true" required>
|
|
<span class="switcher-indicator">
|
|
<span class="switcher-yes">
|
|
<span class="ion ion-md-checkmark"></span>
|
|
</span>
|
|
<span class="switcher-no">
|
|
<span class="ion ion-md-close"></span>
|
|
</span>
|
|
</span>
|
|
<span
|
|
class="switcher-label"><strong>{{ __('abo.abo_order_info_checkbox') }}</strong></span>
|
|
</label>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
|
|
</div>
|
|
@endif
|
|
@php($is_disabled = false)
|
|
@if (isset($is_abo) &&
|
|
$is_abo &&
|
|
!\App\Services\AboHelper::aboHasBaseProduct(Yard::instance('shopping')->getContentByOrder()))
|
|
@php($is_disabled = true)
|
|
<div class="float-right">
|
|
<div class="alert alert-danger text-right">
|
|
<strong>{!! __('abo.abo_type_info_base', ['base' => get_abo_type_badge('base')]) !!}</strong>
|
|
</div>
|
|
</div>
|
|
<br clear="all">
|
|
@endif
|
|
@if ((isset($data['for']) && $data['for'] === 'ot-customer') || (isset($for) && $for === 'abo-ot-customer'))
|
|
<div class="float-right">
|
|
<button type="submit" class="btn btn-secondary" @if ($is_disabled) disabled @endif><i
|
|
class="ion ion-ios-redo"></i> {{ __('order.confirm_and_send_order') }}</button>
|
|
</div>
|
|
<br><br>
|
|
<div class="text-right">
|
|
<em class="small"> <i class="fa fa-info-circle"></i> {!! __('order.confirm_send_order_info') !!}</em>
|
|
</div>
|
|
@else
|
|
<div class="float-right">
|
|
<button type="submit" class="btn btn-secondary" @if ($is_disabled) disabled @endif><i
|
|
class="ion ion-ios-redo"></i> {{ __('order.confirm_and_proceed_to_checkout') }}</button>
|
|
</div>
|
|
<br><br>
|
|
<div class="text-right">
|
|
<em class="small"> <i class="fa fa-lock"></i> {!! __('payment.checkout_ssl_server') !!}</em>
|
|
</div>
|
|
@endif
|
|
|
|
@endif
|
|
@endif
|