changed the add to buttons in bagisto
This commit is contained in:
parent
b59c25bfb8
commit
8b85452097
|
|
@ -0,0 +1,25 @@
|
|||
@if (Route::currentRouteName() == "shop.products.index")
|
||||
@include ('shop::products.add-to', ['product' => $product])
|
||||
@else
|
||||
@if ($product->type == "configurable")
|
||||
<div class="cart-wish-wrap">
|
||||
<a href="{{ route('cart.add.configurable', $product->url_key) }}" class="btn btn-lg btn-primary addtocart">
|
||||
{{ __('shop::app.products.add-to-cart') }}
|
||||
</a>
|
||||
|
||||
@include('shop::products.wishlist')
|
||||
</div>
|
||||
@else
|
||||
<div class="cart-wish-wrap">
|
||||
<form action="{{ route('cart.add', $product->id) }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="product" value="{{ $product->id }}">
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
<input type="hidden" value="false" name="is_configurable">
|
||||
<button class="btn btn-lg btn-primary addtocart" {{ $product->haveSufficientQuantity(1) ? '' : 'disabled' }}>{{ __('shop::app.products.add-to-cart') }}</button>
|
||||
</form>
|
||||
|
||||
@include('shop::products.wishlist')
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
|
@ -30,31 +30,7 @@
|
|||
|
||||
@include ('shop::products.price', ['product' => $product])
|
||||
|
||||
@if (Route::currentRouteName() == "shop.products.index")
|
||||
@include ('shop::products.add-to', ['product' => $product])
|
||||
@else
|
||||
@if ($product->type == "configurable")
|
||||
<div class="cart-wish-wrap">
|
||||
<a href="{{ route('cart.add.configurable', $product->url_key) }}" class="btn btn-lg btn-primary addtocart">
|
||||
{{ __('shop::app.products.add-to-cart') }}
|
||||
</a>
|
||||
|
||||
@include('shop::products.wishlist')
|
||||
</div>
|
||||
@else
|
||||
<div class="cart-wish-wrap">
|
||||
<form action="{{route('cart.add', $product->id)}}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="product" value="{{ $product->id }}">
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
<input type="hidden" value="false" name="is_configurable">
|
||||
<button class="btn btn-lg btn-primary addtocart" {{ $product->haveSufficientQuantity(1) ? '' : 'disabled' }}>{{ __('shop::app.products.add-to-cart') }}</button>
|
||||
</form>
|
||||
|
||||
@include('shop::products.wishlist')
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@include('shop::products.add-buttons')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,4 @@
|
|||
} else {
|
||||
return null;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue