$technical_sheet = $product->getMediaUrl('technical_sheet', false);
$specs = $product->json;
$categoryProduct = $product->category;
- $template = $view_name;
$options = false;
if($product->basic_selling_price && $product->json) {
$options = true;
}
$discount = \App\Models\Client::getDiscount($categoryProduct);
+ $auth = Auth::guard('web-clients')->check();
+ $template = $auth && $options ? $view_name : '';
@endphp
@extends('layouts/app')
</div>
@endif
</div>
- @if(config('features.quote'))
- <div id="features-quotes" class="{{ $options ? 'hidden' : '' }}">
- <cart-add :id="$product->id" price="" reference="" :hasprice="$product->basic_selling_price" template="product-detail"></cart-add>
- <span
- data-tooltip="{{__('Ajoutez un ou plusieurs produits à votre sélection, ajustez les quantités et obtenez un devis.')}}"
- class="font-display text-lg inline-block align-middle rounded-full border-grey-dark border-2 h-8 w-8 text-center ml-6">?</span>
- </div>
- @endif
@endauth
- @guest('web-clients')
- <div id="features-quotes">
- <cart-add :id="$product->id" price="" reference="" :hasprice="$product->basic_selling_price" template=""></cart-add>
+ @if(config('features.quote'))
+ <div id="features-quotes" class="{{ $options && $auth ? 'hidden' : '' }}">
+ <cart-add :id="$product->id" price="" reference="" :hasprice="$product->basic_selling_price" :template="$template"></cart-add>
<span
data-tooltip="{{__('Ajoutez un ou plusieurs produits à votre sélection, ajustez les quantités et obtenez un devis.')}}"
class="font-display text-lg inline-block align-middle rounded-full border-grey-dark border-2 h-8 w-8 text-center ml-6">?</span>
</div>
- @endguest
+ @endif
@isset($product->time_limit)
<div class="mt-3 text-navy text-lg">