Merge branch 'feature-product' into development
WMS API/ECOMMERCE/pipeline/head This commit looks good Details

This commit is contained in:
Bayu Lukman Yusuf 2026-03-04 14:02:48 +07:00
commit d011e92257
5 changed files with 9 additions and 9 deletions

View File

@ -57,7 +57,7 @@ class SearchController extends Controller
'number' => $product->number,
'slug' => $product->slug ?? $product->id,
'type' => 'product',
'route' => route('product.detail', $product->slug)
'route' => $product->slug != null ? route('product.detail', $product->slug) : '',
];
});
}

View File

@ -56,7 +56,7 @@
aria-label="Add to Wishlist">
<i class="ci-heart animate-target"></i>
</button> --}}
<a class="d-block" href="{{ route('product.detail', [$value->slug]) }}">
<a class="d-block" href="{{ $value->slug != null ? route('product.detail', [$value->slug]) : '#' }}">
<div class="ratio" style="--cz-aspect-ratio: calc(191 / 191 * 100%)">
<img src="{{ $value->image_url }}" alt="Image" loading="lazy">
</div>
@ -86,7 +86,7 @@
<div class="h6 mb-2">{{ $value->display_price_currency }}</div>
<h3 class="fs-sm lh-base mb-0">
<a class="hover-effect-underline fw-normal"
href="{{ route('product.detail', [$value->slug]) }}">{{ $value->name }}</a>
href="{{ $value->slug != null ? route('product.detail', [$value->slug]) : '#' }}">{{ $value->name }}</a>
</h3>
</div>
@if ($value->variants->count() > 1)

View File

@ -69,7 +69,7 @@
aria-label="Add to Wishlist">
<i class="ci-heart animate-target"></i>
</button> --}}
<a class="d-block" href="{{ route('product.detail', $value->slug) }}">
<a class="d-block" href="{{ $value->slug != null ? route('product.detail', $value->slug) : '#' }}">
<div class="ratio" style="--cz-aspect-ratio: calc(191 / 191 * 100%)">
<img src="{{ $value->image_url }}" alt="Image">
</div>
@ -99,7 +99,7 @@
<div class="h6 mb-2">{{ $value->display_price_currency }}</div>
<h3 class="fs-sm lh-base mb-0">
<a class="hover-effect-underline fw-normal"
href="{{ route('product.detail', $value->slug) }}">{{ $value->name }}</a>
href="{{ $value->slug != null ? route('product.detail', $value->slug) : '#' }}">{{ $value->name }}</a>
</h3>
</div>
@if ($value->variants->count() > 1)

View File

@ -11,7 +11,7 @@
aria-label="Add to Wishlist">
<i class="ci-heart animate-target"></i>
</button>
<a class="d-flex bg-body-tertiary rounded" href="{{ route('product.detail', $product->slug ?? $product->id ?? '0') }}">
<a class="d-flex bg-body-tertiary rounded" href="{{ $product->slug != null ? route('product.detail', $product->slug) : '#' }}">
<div class="ratio" style="--cz-aspect-ratio: calc(308 / 274 * 100%)">
<img src="{{ $product->image_url }}" loading="lazy" class="w-100 h-100 object-cover">
</div>
@ -19,7 +19,7 @@
</div>
<div class="nav mb-2">
<a class="nav-link animate-target min-w-0 text-dark-emphasis p-0"
href="{{ route('product.detail', $product->slug ?? $product->id ?? '0') }}">
href="{{ $product->slug != null ? route('product.detail', $product->slug) : '#' }}">
<span class="text-truncate">{{ $product->name ?? '' }}</span>
</a>
</div>

View File

@ -25,14 +25,14 @@
@if($order && $order->details)
@foreach ($order->details as $detail)
<div class="d-flex align-items-center">
<a class="flex-shrink-0" href="{{ route('product.detail', $detail->reference->item->slug ?? '#') }}">
<a class="flex-shrink-0" href="{{ $detail->reference->item->slug != null ? route('product.detail', $detail->reference->item->slug) : '#' }}">
<img src="{{ $detail->reference->item->image_url ?? '/img/shop/electronics/thumbs/01.png' }}"
width="110" alt="{{ $detail->reference->item->name ?? 'Product' }}">
</a>
<div class="w-100 min-w-0 ps-2 ps-sm-3">
<h5 class="d-flex animate-underline mb-2">
<a class="d-block fs-sm fw-medium text-truncate animate-target"
href="{{ route('product.detail', $detail->reference->item->slug ?? '#') }}">
href="{{ $detail->reference->item->slug != null ? route('product.detail', $detail->reference->item->slug) : '#' }}">
{{ $detail->reference->item->name ?? 'Product Name' }}
</a>
</h5>