Merge pull request #1027 from jitendra-webkul/jitendra

Fixed checkout issue
This commit is contained in:
Jitendra Singh 2019-06-14 15:14:24 +05:30 committed by GitHub
commit 2b9f40d7db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 25 deletions

View File

@ -83,17 +83,17 @@
</div>
<div class="col-right" v-if="resetSummary" v-show="currentStep != 4">
<summary-section></summary-section>
<summary-section hide-discount="1"></summary-section>
</div>
</div>
</script>
<script>
var shippingHtml = null;
var paymentHtml = null;
var reviewHtml = null;
var summaryHtml = null;
var customerAddress = null;
var shippingHtml = '';
var paymentHtml = '';
var reviewHtml = '';
var summaryHtml = '';
var customerAddress = '';
@auth('customer')
@if(auth('customer')->user()->addresses)
@ -349,8 +349,12 @@
data: function() {
return {
templateRender: null,
code: null,
coupon_used: false
coupon_used: false,
hide_discount: 0
}
},
@ -395,6 +399,7 @@
data: function() {
return {
templateRender: null,
selected_shipping_method: '',
}
},
@ -478,7 +483,9 @@
return {
templateRender: null,
code: ''
code: '',
hide_discount: 1
}
},

View File

@ -36,24 +36,26 @@
<label class="right">{{ core()->currency($cart->base_grand_total) }}</label>
</div>
@if (! request()->is('checkout/cart') && ! $cart->coupon_code)
<div class="discount">
<div class="discount-group">
<form class="coupon-form" method="post" @submit.prevent="onSubmit">
<div class="control-group mt-20" :class="[errors.has('code') ? 'has-error' : '']">
<input type="text" class="control" value="" v-model="code" name="code" placeholder="Enter Coupon Code" v-validate="'required'" style="width: 100%">
</div>
<div v-if="hide_discount">
@if (! request()->is('checkout/cart') && ! $cart->coupon_code)
<div class="discount">
<div class="discount-group">
<form class="coupon-form" method="post" @submit.prevent="onSubmit">
<div class="control-group mt-20" :class="[errors.has('code') ? 'has-error' : '']">
<input type="text" class="control" value="" v-model="code" name="code" placeholder="Enter Coupon Code" v-validate="'required'" style="width: 100%">
</div>
<button class="btn btn-lg btn-black">{{ __('shop::app.checkout.onepage.apply-coupon') }}</button>
</form>
<button class="btn btn-lg btn-black">{{ __('shop::app.checkout.onepage.apply-coupon') }}</button>
</form>
</div>
</div>
</div>
@else
<div class="discount-details-group">
<div class="item-detail">
<label>{{ __('shop::app.checkout.total.coupon-applied') }}</label>
<label class="right" style="display: inline-flex; align-items: center;">{{ $cart->coupon_code }} <span class="icon cross-icon" title="{{ __('shop::app.checkout.total.remove-coupon') }}"></span></label>
@else
<div class="discount-details-group">
<div class="item-detail">
<label>{{ __('shop::app.checkout.total.coupon-applied') }}</label>
<label class="right" style="display: inline-flex; align-items: center;">{{ $cart->coupon_code }} <span class="icon cross-icon" title="{{ __('shop::app.checkout.total.remove-coupon') }}"></span></label>
</div>
</div>
</div>
@endif
@endif
</div>
</div>