Fixed issue with preorder not showing button

This commit is contained in:
Prashant Singh 2019-06-24 12:09:47 +05:30
parent 714d9deed1
commit e130e79121
4 changed files with 25 additions and 7 deletions

View File

@ -15,6 +15,12 @@
@include ('shop::products.add-to-cart', ['product' => $product])
@include ('shop::products.buy-now')
@if ($product->totalQuantity() < 1 && $product->allow_preorder)
<button type="submit" class="btn btn-lg btn-primary pre-order-btn" style="width: 100%; display: none;">
{{ __('preorder::app.shop.products.preorder') }}
</button>
@endif
@endif
</div>

View File

@ -219,7 +219,6 @@
$('#checkout-payment-continue-button').on('click', function() {
//Submit the form
frm = $('#stripe-payment-form');
console.log(frm);
if(savedCardSelected) {
data._token = '{{ csrf_token() }}';
data.useSavedCard = savedCardSelected;

View File

@ -4,4 +4,4 @@
{{ __('stripe::app.add-card') }}
</a>
</span>
</div>
</div>

View File

@ -24,11 +24,24 @@
</div>
@endif --}}
<button class="btn btn-primary btn-lg" id="stripe-pay-button" style="border-radius: 3px !important;">Pay Now
<label style="">
( {{ core()->currency(\Cart::getCart()->base_grand_total) }} )
</label>
</button>
@php
$enableStripe = 0;
$stripeConnect = app('Webkul\StripeConnect\Repositories\StripeConnectRepository')->findWhere([
'company_id' => \Company::getCurrent()->id
]);
if ($stripeConnect->count() == 1) {
$enableStripe = 1;
}
@endphp
@if ($enableStripe ==0)
<span class="badge badge-md badge-danger">This seller ain't Stripe ready</span>
@else
<button class="btn btn-primary btn-lg" id="stripe-pay-button" style="border-radius: 3px !important;">Pay Now ( {{ core()->currency(\Cart::getCart()->base_grand_total) }} )
</button>
@endif
</div>
</form>
<div class="horizontal-rule mt-15"></div>