changed shop blade files according to show price after login
This commit is contained in:
parent
e327ee2b05
commit
3aa0135aec
|
|
@ -1,22 +1,22 @@
|
|||
|
||||
@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>
|
||||
@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->product_id) }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="product" value="{{ $product->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>
|
||||
@else
|
||||
<div class="cart-wish-wrap">
|
||||
<form action="{{ route('cart.add', $product->product_id) }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="product" value="{{ $product->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
|
||||
@include('shop::products.wishlist')
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -1,7 +1,14 @@
|
|||
{!! view_render_event('bagisto.shop.products.add_to_cart.before', ['product' => $product]) !!}
|
||||
@php
|
||||
$status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable');
|
||||
|
||||
<button type="submit" class="btn btn-lg btn-primary addtocart" {{ $product->type != 'configurable' && ! $product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
|
||||
{{ __('shop::app.products.add-to-cart') }}
|
||||
</button>
|
||||
$function = $status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.selectfunction');
|
||||
@endphp
|
||||
|
||||
@if ($status && ($function == 'hide-buy-cart-guest' || $function == 'hide-price-buy-cart-guest'))
|
||||
@else
|
||||
<button type="submit" class="btn btn-lg btn-primary addtocart" {{ $product->type != 'configurable' && ! $product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
|
||||
{{ __('shop::app.products.add-to-cart') }}
|
||||
</button>
|
||||
@endif
|
||||
{!! view_render_event('bagisto.shop.products.add_to_cart.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,7 +1,15 @@
|
|||
{!! view_render_event('bagisto.shop.products.buy_now.before', ['product' => $product]) !!}
|
||||
|
||||
<button type="submit" data-href="{{ route('shop.product.buynow', $product->product_id)}}" class="btn btn-lg btn-primary buynow" {{ $product->type != 'configurable' && ! $product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
|
||||
{{ __('shop::app.products.buy-now') }}
|
||||
</button>
|
||||
@php
|
||||
$status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable');
|
||||
|
||||
$function = $status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.selectfunction');
|
||||
@endphp
|
||||
|
||||
@if ($status && ($function == 'hide-buy-cart-guest' || $function == 'hide-price-buy-cart-guest'))
|
||||
@else
|
||||
<button type="submit" data-href="{{ route('shop.product.buynow', $product->product_id)}}" class="btn btn-lg btn-primary buynow" {{ $product->type != 'configurable' && ! $product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
|
||||
{{ __('shop::app.products.buy-now') }}
|
||||
</button>
|
||||
@endif
|
||||
{!! view_render_event('bagisto.shop.products.buy_now.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,7 +1,12 @@
|
|||
{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="product-card">
|
||||
@php
|
||||
$status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable');
|
||||
|
||||
$function = $status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.selectfunction');
|
||||
@endphp
|
||||
|
||||
<div class="product-card">
|
||||
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
|
||||
|
||||
<?php $productBaseImage = $productImageHelper->getProductBaseImage($product); ?>
|
||||
|
|
@ -30,7 +35,10 @@
|
|||
|
||||
@include ('shop::products.price', ['product' => $product])
|
||||
|
||||
@include('shop::products.add-buttons', ['product' => $product])
|
||||
@if ($status && ($function == 'hide-buy-cart-guest' || $function == 'hide-price-buy-cart-guest'))
|
||||
@else
|
||||
@include('shop::products.add-buttons', ['product' => $product])
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,23 +1,32 @@
|
|||
{!! view_render_event('bagisto.shop.products.price.before', ['product' => $product]) !!}
|
||||
|
||||
@php
|
||||
$status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.enableordisable');
|
||||
|
||||
$function = $status = core()->getConfigData('ShowPriceAfterLogin.settings.settings.selectfunction');
|
||||
@endphp
|
||||
|
||||
<div class="product-price">
|
||||
@inject ('priceHelper', 'Webkul\Product\Helpers\Price')
|
||||
@if ($status && $function == "hide-price-buy-cart-guest")
|
||||
|
||||
@if ($product->type == 'configurable')
|
||||
<span class="price-label">{{ __('shop::app.products.price-label') }}</span>
|
||||
|
||||
<span class="final-price">{{ core()->currency($priceHelper->getMinimalPrice($product)) }}</span>
|
||||
@else
|
||||
@if ($priceHelper->haveSpecialPrice($product))
|
||||
<div class="sticker sale">
|
||||
{{ __('shop::app.products.sale') }}
|
||||
</div>
|
||||
@if ($product->type == 'configurable')
|
||||
<span class="price-label">{{ __('shop::app.products.price-label') }}</span>
|
||||
|
||||
<span class="regular-price">{{ core()->currency($product->price) }}</span>
|
||||
|
||||
<span class="special-price">{{ core()->currency($priceHelper->getSpecialPrice($product)) }}</span>
|
||||
<span class="final-price">{{ core()->currency($priceHelper->getMinimalPrice($product)) }}</span>
|
||||
@else
|
||||
<span>{{ core()->currency($product->price) }}</span>
|
||||
@if ($priceHelper->haveSpecialPrice($product))
|
||||
<div class="sticker sale">
|
||||
{{ __('shop::app.products.sale') }}
|
||||
</div>
|
||||
|
||||
<span class="regular-price">{{ core()->currency($product->price) }}</span>
|
||||
|
||||
<span class="special-price">{{ core()->currency($priceHelper->getSpecialPrice($product)) }}</span>
|
||||
@else
|
||||
<span>{{ core()->currency($product->price) }}</span>
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue