Promotion Frontend dynamic
This commit is contained in:
parent
c9e1545693
commit
1cc8e025a1
29 changed files with 551 additions and 163 deletions
|
|
@ -134,7 +134,7 @@
|
|||
</span>
|
||||
</span>
|
||||
<span class="switcher-label">Mit Klick auf "Jetzt kaufen" akzeptiere ich die
|
||||
<a href="https://www.gruene-seele.bio/vp-agb/" target="_blank" class="text-secondary">Allgemeinen
|
||||
<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
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<span class="switcher-no">
|
||||
</span>
|
||||
</span>
|
||||
<span class="switcher-label">Ich verstehe und ....</span>
|
||||
<span class="switcher-label">Ich verstehe und akzeptiere, dass ich als Kunde nur einmal an einer Tester-Promotion einer bestimmten Produktgruppe teilnehmen kann, damit auch andere Kunden von dieser Aktion profitieren können.</span>
|
||||
</label>
|
||||
<div id="error-switch_fairplay" class="text-left"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,23 @@
|
|||
<section>
|
||||
<h2 class="text-center">1 Tester gratis für Dich</h2>
|
||||
<p class="text-center">Wähle nun ...</p>
|
||||
<p class="text-center">Wähle nun eines der aufgeführten Produkte.</p>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
@php($free_product_id = Yard::instance('shopping')->getFreeProductId())
|
||||
|
||||
@foreach ($promotion_user->promotion_user_products_active as $promotion_user_product)
|
||||
@if ($promotion_user_product->isShow())
|
||||
<div class="col-md-6 col-lg-4 text-center p-4">
|
||||
<div class="col-md-6 col-lg-4 text-center">
|
||||
@if ($promotion_user_product->product->images)
|
||||
@if ($image = $promotion_user_product->product->images->first())
|
||||
<img src="{{ route('product_image', [$image->slug]) }}" class="mb-2 img-fluid"
|
||||
alt="" style="max-height: 350px">
|
||||
<img src="{{ route('product_image', [$image->slug]) }}" class="mb-2 img-fluid" alt="">
|
||||
@endif
|
||||
@endif
|
||||
<h4 class="product-title">
|
||||
{{ $promotion_user_product->product->name }}
|
||||
</h4>
|
||||
<div class="mb-2 product-description">
|
||||
{{ substr_ellipsis($promotion_user_product->product->description, 110, true) }}
|
||||
{{ $promotion_user_product->product->getShortCopy(true, 110) }}
|
||||
</div>
|
||||
<div class="more_details">
|
||||
<a href="" class="" data-modal="modal-lg" data-toggle="modal"
|
||||
|
|
@ -27,9 +28,12 @@
|
|||
<i class="fa fa-search"></i> Mehr Details</a>
|
||||
</div>
|
||||
<div class="mt-4 mb-3">
|
||||
<div class="switcher-holder">
|
||||
<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" required>
|
||||
<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
|
||||
required>
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes">
|
||||
<span class="ion ion-md-checkmark"></span>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,21 @@
|
|||
<div class="container flex-grow-1 container-p-y pb-0">
|
||||
<div class="media align-items-center py-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">{{ $promotion_user->name }}</h1>
|
||||
<p class="text-center">{!! nl2br($promotion_user->description) !!}</p>
|
||||
<h1 class="text-left">{{ $promotion_user->name }}</h1>
|
||||
<p class="text-left">{!! nl2br($promotion_user->description) !!}</p>
|
||||
<h6 class="card-header bg-light py-2">
|
||||
<a href="#" class="" style="text-decoration: none" data-toggle="collapse" data-target="#collapsePaymentForm" aria-expanded="false" aria-controls="collapsePaymentForm">
|
||||
<i class="fa fa-caret-down"></i> mehr über mich
|
||||
</a>
|
||||
</h6>
|
||||
<div class="collapse" id="collapsePaymentForm">
|
||||
<p class="text-left">{!! nl2br($promotion_user->about_you) !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
<section>
|
||||
<div class="row">
|
||||
<div class="col-12 text-left">
|
||||
<h2 class="mt-3">Warenkorb</h2>
|
||||
|
|
@ -23,15 +22,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@foreach ([2, 4, 5] as $id)
|
||||
@php($product = \App\Models\Product::find($id))
|
||||
@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 ($product->images)
|
||||
@if($image = $product->images->first())
|
||||
<img src="{{ route('product_image', [$image->slug]) }}" class="d-block ui-w-80 ui-bordered mr-4" alt="">
|
||||
@endif
|
||||
@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
|
||||
|
|
@ -42,7 +38,7 @@
|
|||
<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;">{{ $product->name }}
|
||||
style="font-size: 15px; font-weight: 500;">{{ $row->name }}
|
||||
</div>
|
||||
<div class="text-body">
|
||||
<div>Inhalt: {{ $product->contents }}</div>
|
||||
|
|
@ -50,54 +46,54 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="options">
|
||||
@if(!$row->options->free_product)
|
||||
<a href="#"
|
||||
class="auto-delete-product remove_item_form_cart product-tooltip"
|
||||
data-row-id="{{ $product->id }}"
|
||||
data-row-id="{{$row->rowId}}"
|
||||
data-product-id="{{ $product->id }}"><i
|
||||
class="fa fa-times"></i> Artikel entfernen</a>
|
||||
@else
|
||||
gratis Produkt
|
||||
@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">
|
||||
{{ $product->getFormattedPrice() }} €*</div>
|
||||
{{ Yard::instance('shopping')->rowPrice($row, 2) }} €*</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-sm-3 col-md-3 quantity">
|
||||
@if(!$row->options->free_product)
|
||||
<div class="quantity-select">
|
||||
<input type="number"
|
||||
class="form-control text-center cart-input-event-onchange"
|
||||
data-row-id="{{ $product->id }}"
|
||||
data-product-id="{{ $product->id }}" value="1"
|
||||
name="quantity[{{ $product->id }}]" maxlength="3" max="999"
|
||||
data-row-id="{{$row->rowId}}"
|
||||
data-product_id="{{ $product->id }}" value="{{ $row->qty }}"
|
||||
name="quantity[{{ $row->qty }}]" maxlength="3" max="999"
|
||||
min="1">
|
||||
|
||||
</div>
|
||||
<div class="price-total text-right">
|
||||
<div class="no-line-break">
|
||||
0 €*
|
||||
</div>
|
||||
<div class="no-line-break">{{ Yard::instance('shopping')->rowSubtotal($row, 2) }} €*</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="price-total text-right mt-0">
|
||||
<div class="no-line-break">1 / 0,00 €*</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<hr class="mt-2 mb-2 light">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="mt-2 col-12">
|
||||
<p class="small mb-2">Du hast xx Artikel in Deinem Warenkorb</p>
|
||||
<p class="small mb-2">Du hast {{ Yard::instance('shopping')->count() }} Artikel in Deinem Warenkorb</p>
|
||||
<button type="button" class="btn btn-default btn-sm" id="clear-products-basket"><i
|
||||
class="ion ion-ios-trash"></i> Warenkorb löschen</button>
|
||||
<hr class="">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<section>
|
||||
<h2 class="mt-0 text-center">OH Nein ... alle Tester sind bereits vergriffen!</h2>
|
||||
<p class="text-center">ERINNERUNGS-SERVICE:<br>
|
||||
text ...</p>
|
||||
<p class="text-center mb-4">ERINNERUNGS-SERVICE:<br>
|
||||
Lass Deine Kontaktdaten da, damit wir Dich informieren können, wenn es Nachschub gibt ...</p>
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-lg-8">
|
||||
<div class="row">
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
</span>
|
||||
</span>
|
||||
<span class="switcher-label">Mit Klick auf "Absenden" akzeptiere ich die
|
||||
<a href="https://www.gruene-seele.bio/vp-agb/" target="_blank"
|
||||
<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"
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
<div class="text-center">
|
||||
{!! Form::hidden("action", "submit-reminder-service") !!}
|
||||
<button type="submit" class="btn btn-primary btn-lg mt-4 mb-4 button-prevent-multiple-submits">
|
||||
<i class="ion ion-ios-share-alt"></i> Absenden <i class="spinner fa fa-spinner fa-spin"></i>
|
||||
<i class="ion ion-ios-paper-plane"></i> Absenden <i class="spinner fa fa-spinner fa-spin"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,10 +11,9 @@
|
|||
</span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">0,00 € - Ich hole die Ware bei
|
||||
{{ $promotion_user->user->getFullName() }} persönlich ab</span>
|
||||
<span class="switcher-label">0,00 € - Ich hole die Ware bei {{ $promotion_user->user->getFullName() }} persönlich ab</span>
|
||||
</label>
|
||||
<label class="switcher switcher-success">
|
||||
{{-- <label class="switcher switcher-success">
|
||||
<input type="radio" class="switcher-input" name="switchers_shipping" data-error="#error-switchers_shipping" value="dhl_slow">
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes">
|
||||
|
|
@ -25,15 +24,16 @@
|
|||
<span class="switcher-label">3,50 € - Bücher-/Warensendung mit Deutsche Post (4-6
|
||||
Werktage)</span>
|
||||
</label>
|
||||
--}}
|
||||
<label class="switcher switcher-success">
|
||||
<input type="radio" class="switcher-input" name="switchers_shipping" data-error="#error-switchers_shipping" value="dhl_fast">
|
||||
<input type="radio" class="switcher-input" name="switchers_shipping" data-error="#error-switchers_shipping" value="dhl_shipping">
|
||||
<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">4,90 € - DHL Warenpost (1-3 Werktage)</span>
|
||||
<span class="switcher-label">ab {{ \App\Services\PromotionCart::getLowestShippingPrice() }} € - Versand mit DHL (1-3 Werktage)</span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="error-switchers_shipping" class="text-left"></div>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,25 @@
|
|||
<section>
|
||||
<h2 class="text-center mt-3">zusätzlich Einkaufen</h2>
|
||||
<p class="text-center">Vielleicht sagt...<br>
|
||||
* Preis inkl. gesetzl. MwSt. | zzgl. Versandkosten
|
||||
</p>
|
||||
<p class="text-center">Vielleicht sagt Dir ja jetzt schon ein Produkt zu und Du nimmst es gleich mit ...</p>
|
||||
<div class="swiper mySwiper">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($shop_products as $product)
|
||||
@php($cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id, false, false))
|
||||
@php($qty = isset($cartItem->qty) ? "x".$cartItem->qty : 0)
|
||||
@php($rowId = isset($cartItem->rowId) ? $cartItem->rowId : '')
|
||||
|
||||
<div class="swiper-slide">
|
||||
<div class="text-center p-4">
|
||||
<div class="text-center">
|
||||
@if ($product->images)
|
||||
@if ($image = $product->images->first())
|
||||
<img src="{{ route('product_image', [$image->slug]) }}" class="mb-2 img-fluid"
|
||||
alt="" style="max-height: 350px">
|
||||
<img src="{{ route('product_image', [$image->slug]) }}" class="mb-2 img-fluid" alt="">
|
||||
@endif
|
||||
@endif
|
||||
<h4 class="product-title">
|
||||
<h4 class="product-title px-4">
|
||||
{{ $product->name }}
|
||||
</h4>
|
||||
<div class="mb-2 product-description">
|
||||
{{ substr_ellipsis($product->description, 110, true) }}
|
||||
<div class="mb-2 product-description px-4">
|
||||
{{ $product->getShortCopy(true, 110) }}
|
||||
</div>
|
||||
<div class="more_details">
|
||||
<a href="" class="" data-modal="modal-lg" data-toggle="modal"
|
||||
|
|
@ -27,22 +28,18 @@
|
|||
data-action="web-show-product" data-view="with-price">
|
||||
<i class="fa fa-search"></i> Mehr Details</a>
|
||||
</div>
|
||||
<div class="product-item-price mt-2 mb-2">
|
||||
<div class="product-item-price mt-2 mt-2">
|
||||
{{ $product->getFormattedPrice() }} €*
|
||||
<br><span class="small text-muted">{{ $product->getBasePriceFormattedFull() }} €</span>
|
||||
|
||||
</div>
|
||||
<div class="mt-2 mb-3">
|
||||
<button type="button" class="btn btn-primary">
|
||||
<div class="mt-2 pb-3">
|
||||
<button type="button" class="btn btn-primary btn-add-product-shop" data-product_id="{{ $product->id }}" data-row-id="{{ $cartItem->rowId }}">
|
||||
In den Warenkorb <i class="ion ion-md-basket navbar-icon align-middle"></i>
|
||||
<span class="badge badge-cart indicator">3</span>
|
||||
<span class="badge badge-cart indicator" id="badge_cart_indicator_{{ $product->id }}">{{ $qty }}</span>
|
||||
</button>
|
||||
<div class="p-4"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle hide-arrow text-nowrap ml-lg-2" href="#" data-toggle="dropdown">
|
||||
|
||||
<span class="d-lg-none align-middle"> Cart</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
|
@ -51,7 +48,8 @@
|
|||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-pagination"></div>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<div class="m2-4 text-center small">
|
||||
* Preis inkl. gesetzl. MwSt. | zzgl. Versandkosten
|
||||
<hr class="">
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
Bio Deocremes
|
||||
</h3>
|
||||
<div class="mb-1 product-description-samll">
|
||||
Nachhaltigkeit ohne …
|
||||
Nachhaltig ohne Plastik und in Bio-Qualität
|
||||
</div>
|
||||
<div class="mt-4 mb-3">
|
||||
<a href="" class="btn btn-primary btn-lg">
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
Bio Aloe Vera
|
||||
</h3>
|
||||
<div class="mb-2 product-description-samll">
|
||||
Nachhaltigkeit ohne …
|
||||
Aus Direktsaft höchster Güte aus Mallorca
|
||||
</div>
|
||||
<div class="mt-4 mb-3">
|
||||
<a href="" class="btn btn-primary btn-lg">
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
Verantwortung
|
||||
</h3>
|
||||
<div class="mb-2 product-description-samll">
|
||||
Nachhaltigkeit ohne …
|
||||
Refill-System, CO2 und Mithelfen
|
||||
</div>
|
||||
<div class="mt-4 mb-3">
|
||||
<a href="" class="btn btn-primary btn-lg">
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
|
||||
{!! 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">
|
||||
@include('web.promotion._intro')
|
||||
|
||||
|
|
@ -29,8 +30,9 @@
|
|||
@include('web.promotion._shipping')
|
||||
|
||||
@include('web.promotion._fairplay')
|
||||
|
||||
<section id="promotion_cart_holder">
|
||||
@include('web.promotion._promotion_cart')
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
|
|
@ -52,6 +54,8 @@
|
|||
<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);
|
||||
|
|
@ -102,10 +106,6 @@
|
|||
validator.element($(this));
|
||||
});
|
||||
|
||||
$('.switcher-holder').on('click', function() {
|
||||
$(this).find('.switcher-input').prop('checked', true);
|
||||
});
|
||||
|
||||
var swiper = new Swiper(".mySwiper", {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
|
|
@ -146,7 +146,6 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
if ($('#shipping_address_switch').is(':checked')) {
|
||||
$('#shipping_address').show();
|
||||
} else {
|
||||
|
|
@ -156,3 +155,7 @@
|
|||
</script>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script src="{{ asset('/js/iq-promotion-shop-cart.js') }}?v=2{{ get_file_last_time('/js/iq-promotion-shop-cart.js') }}"></script>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -49,9 +49,6 @@
|
|||
<tr>
|
||||
<td colspan="2" class="border-0 text-muted">* inkl. gesetzl. MwSt. | zzgl. Versandkosten</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue