promotion 1.0
This commit is contained in:
parent
1cc8e025a1
commit
570d428b1c
60 changed files with 1596 additions and 272 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue