]> _ Git - pmi.git/commitdiff
wait #6037 @0:35
authorsoufiane <soufiane@cubedesigners.com>
Thu, 15 Jun 2023 14:52:04 +0000 (16:52 +0200)
committersoufiane <soufiane@cubedesigners.com>
Thu, 15 Jun 2023 14:52:04 +0000 (16:52 +0200)
resources/views/components/cart-add.blade.php
resources/views/pages/product-detail.blade.php
resources/views/partials/product-link.blade.php

index c42bce5bc4adf62e7aca4686483cdc0361dd372d..4dd29f28981f7ca3639748cf57ad3125c70c6b4b 100644 (file)
@@ -8,33 +8,33 @@
     }
 @endphp
 
-@if(\App\Models\Client::getClientConnected())
-    @if(isset($template) && $template === "product-detail")
-    <button data-ref="{{ $reference }}" data-product-id="{{ $id }}" class="btn cart-add" :class="{ 'pointer-events-none bg-grey-disabled' : (!isNaN(price) && !statusConfig) }">
-    @elseif(isset($template) && $template === "miniature" && $options)
-    <a href="{{ $link }}" class="btn text-center">
-    @else
-    <button data-ref="{{ $reference }}" data-price="{{ $price }}" data-product-id="{{ $id }}" class="btn cart-add">
-    @endif
+@if(!\App\Models\Client::getClientConnected() && $hasprice)
+    <button class="btn pointer-events-none bg-grey-disabled">
         <span class="btn-text relative">
             <span class="add">
                 {{ $btnText }}
             </span>
-            <span class="added top-0 left-0 w-full h-full inline-flex items-center justify-center hidden" style="top:-2px;">
-                @svg('tick', 'w-4 mr-3 inline left-0') <span>{{ __('Produit ajouté') }}</span>
-            </span>
         </span>
-    @if(isset($template) && $template === "miniature" && $options)
-    </a>
-    @else
     </button>
-    @endif
 @else
-    <button class="btn pointer-events-none bg-grey-disabled">
-        <span class="btn-text relative">
+    @if(isset($template) && $template === "product-detail")
+        <button data-ref="{{ $reference }}" data-product-id="{{ $id }}" class="btn cart-add" :class="{ 'pointer-events-none bg-grey-disabled' : (!isNaN(price) && !statusConfig) }">
+            @elseif(isset($template) && $template === "miniature" && $options)
+                <a href="{{ $link }}" class="btn text-center">
+                    @else
+                        <button data-ref="{{ $reference }}" data-price="{{ $price }}" data-product-id="{{ $id }}" class="btn cart-add">
+                            @endif
+                            <span class="btn-text relative">
             <span class="add">
                 {{ $btnText }}
             </span>
+            <span class="added top-0 left-0 w-full h-full inline-flex items-center justify-center hidden" style="top:-2px;">
+                @svg('tick', 'w-4 mr-3 inline left-0') <span>{{ __('Produit ajouté') }}</span>
+            </span>
         </span>
-    </button>
+                        @if(isset($template) && $template === "miniature" && $options)
+                </a>
+            @else
+        </button>
+    @endif
 @endif
index 5aa24245f8e0a2f0061cb5e04bdb591b0263cb01..5eda7096350dd231e8185262e467f7fafaf26732 100644 (file)
                 @endauth
 
                 @if(config('features.quote'))
-                    <cart-add :id="$product->id" reference="" price="" template="product-detail"></cart-add>
+                    <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>
index d9b48cb3495c7f1b1f5fe56748bbc1167704dc5a..d18074beadbdfb4bb924cd7811d464569ba599f0 100644 (file)
@@ -40,7 +40,7 @@
             @endif
         </div>
         @if(config('features.quote'))
-            <cart-add :id="$product->id" :reference="$product->reference" :link="$product->getEntity()->URL" :price="$price" :options="$options" template="miniature"></cart-add>
+            <cart-add :id="$product->id" :reference="$product->reference" :link="$product->getEntity()->URL" :price="$price" :options="$options" :hasprice="$product->basic_selling_price" template="miniature"></cart-add>
         @endif
         <div class="links mt-4">
             <div class="link">