增加hook
product.detail.quantity.input product.detail.add_to_cart product.detail.wishlist
This commit is contained in:
parent
b86cee3b3e
commit
e71a98e915
|
|
@ -134,6 +134,7 @@
|
||||||
@if ($product['active'])
|
@if ($product['active'])
|
||||||
<div class="quantity-btns">
|
<div class="quantity-btns">
|
||||||
@hook('product.detail.buy.before')
|
@hook('product.detail.buy.before')
|
||||||
|
@hookwrapper('product.detail.quantity.input')
|
||||||
<div class="quantity-wrap">
|
<div class="quantity-wrap">
|
||||||
<input type="text" class="form-control" :disabled="!product.quantity" onkeyup="this.value=this.value.replace(/\D/g,'')" v-model="quantity" name="quantity">
|
<input type="text" class="form-control" :disabled="!product.quantity" onkeyup="this.value=this.value.replace(/\D/g,'')" v-model="quantity" name="quantity">
|
||||||
<div class="right">
|
<div class="right">
|
||||||
|
|
@ -141,6 +142,8 @@
|
||||||
<i class="bi bi-chevron-down"></i>
|
<i class="bi bi-chevron-down"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@endhookwrapper
|
||||||
|
@hookwrapper('product.detail.add_to_cart')
|
||||||
<button
|
<button
|
||||||
class="btn btn-outline-dark ms-md-3 add-cart fw-bold"
|
class="btn btn-outline-dark ms-md-3 add-cart fw-bold"
|
||||||
:product-id="product.id"
|
:product-id="product.id"
|
||||||
|
|
@ -149,6 +152,8 @@
|
||||||
@click="addCart(false, this)"
|
@click="addCart(false, this)"
|
||||||
><i class="bi bi-cart-fill me-1"></i>{{ __('shop/products.add_to_cart') }}
|
><i class="bi bi-cart-fill me-1"></i>{{ __('shop/products.add_to_cart') }}
|
||||||
</button>
|
</button>
|
||||||
|
@endhookwrapper
|
||||||
|
@hookwrapper('product.detail.buy_now')
|
||||||
<button
|
<button
|
||||||
class="btn btn-dark ms-3 fw-bold"
|
class="btn btn-dark ms-3 fw-bold"
|
||||||
:disabled="!product.quantity"
|
:disabled="!product.quantity"
|
||||||
|
|
@ -157,20 +162,24 @@
|
||||||
@click="addCart(true, this)"
|
@click="addCart(true, this)"
|
||||||
><i class="bi bi-bag-fill me-1"></i>{{ __('shop/products.buy_now') }}
|
><i class="bi bi-bag-fill me-1"></i>{{ __('shop/products.buy_now') }}
|
||||||
</button>
|
</button>
|
||||||
|
@endhookwrapper
|
||||||
@hook('product.detail.buy.after')
|
@hook('product.detail.buy.after')
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (current_customer() || !request('iframe'))
|
@if (current_customer() || !request('iframe'))
|
||||||
<div class="add-wishlist">
|
@hookwrapper('product.detail.wishlist')
|
||||||
<button class="btn btn-link ps-0 text-secondary" data-in-wishlist="{{ $product['in_wishlist'] }}" onclick="bk.addWishlist('{{ $product['id'] }}', this)">
|
<div class="add-wishlist">
|
||||||
<i class="bi bi-heart{{ $product['in_wishlist'] ? '-fill' : '' }} me-1"></i> {{ __('shop/products.add_to_favorites') }}
|
<button class="btn btn-link ps-0 text-secondary" data-in-wishlist="{{ $product['in_wishlist'] }}" onclick="bk.addWishlist('{{ $product['id'] }}', this)">
|
||||||
</button>
|
<i class="bi bi-heart{{ $product['in_wishlist'] ? '-fill' : '' }} me-1"></i> {{ __('shop/products.add_to_favorites') }}
|
||||||
</div>
|
</button>
|
||||||
|
</div>
|
||||||
|
@endhookwrapper
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
<div class="text-danger"><i class="bi bi-exclamation-circle-fill"></i> {{ __('product.has_been_inactive') }}</div>
|
<div class="text-danger"><i class="bi bi-exclamation-circle-fill"></i> {{ __('product.has_been_inactive') }}</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
@hook('product.detail.after')
|
@hook('product.detail.after')
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue