optional compare option in default theme
This commit is contained in:
parent
8cc42af537
commit
76a1034f49
|
|
@ -47,21 +47,27 @@
|
|||
|
||||
{!! view_render_event('bagisto.shop.layout.header.comppare-item.before') !!}
|
||||
|
||||
<li class="compare-dropdown-container">
|
||||
<a
|
||||
@auth('customer')
|
||||
href="{{ route('velocity.customer.product.compare') }}"
|
||||
@endauth
|
||||
@php
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false
|
||||
@endphp
|
||||
|
||||
@guest('customer')
|
||||
href="{{ route('velocity.product.compare') }}"
|
||||
@endguest
|
||||
style="color: #242424;"
|
||||
>
|
||||
<span class="name">{{ __('velocity::app.customer.compare.text') }}</span>
|
||||
@if ($showCompare)
|
||||
<li class="compare-dropdown-container">
|
||||
<a
|
||||
@auth('customer')
|
||||
href="{{ route('velocity.customer.product.compare') }}"
|
||||
@endauth
|
||||
|
||||
</a>
|
||||
</li>
|
||||
@guest('customer')
|
||||
href="{{ route('velocity.product.compare') }}"
|
||||
@endguest
|
||||
style="color: #242424;"
|
||||
>
|
||||
<span class="name">{{ __('velocity::app.customer.compare.text') }}</span>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.compare-item.after') !!}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
@php
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false
|
||||
@endphp
|
||||
|
||||
<div class="cart-wish-wrap">
|
||||
<form action="{{ route('cart.add', $product->product_id) }}" method="POST">
|
||||
@csrf
|
||||
|
|
@ -7,8 +11,10 @@
|
|||
</form>
|
||||
|
||||
@include('shop::products.wishlist')
|
||||
|
||||
@include('shop::products.compare', [
|
||||
'productId' => $product->id
|
||||
])
|
||||
|
||||
@if ($showCompare)
|
||||
@include('shop::products.compare', [
|
||||
'productId' => $product->id
|
||||
])
|
||||
@endif
|
||||
</div>
|
||||
Loading…
Reference in New Issue