Promotion Frontend dynamic

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

View file

@ -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>