@php $file_name = route('product_table'); @endphp @if (count($products) == 0)

No Products Found

We couldn’t find any matching products. Try adjusting your filters or check back later.

Back to Home
@else
@foreach ($products as $product) @php $productName = Str::limit($product['product_name'] ?? 'No Name', 60, '...'); $brand = $product['brand']['name'] ?? 'Unknown'; $category = $product['category']['name'] ?? 'N/A'; $subCategory = $product['sub_category']['name'] ?? 'N/A'; $productCode = $product['product_code'] ?? 'N/A'; $unit = $product['unit']; $purchasePrice = $product['purchase_price'] ?? 0; $mrp = $product['mrp'] ?? 0; $salesPrice = $product['sales_price'] ?? $mrp; $discount = $product['discount'] ?? ($mrp > $salesPrice ? round((($mrp - $salesPrice) / $mrp) * 100) : null); $quantity = $product['quantity'] ?? 0; $weight = $product['weight'] ?? 'N/A'; $material = $product['material'] ?? 'N/A'; $size = $product['size']['name'] ?? 'N/A'; $brandingCost = $product['branding_cost'] ?? 0; $shippingCost = $product['shipping_cost'] ?? 0; $hsn = $product['hsn_code'] ?? 'N/A'; $gst = $product['gst'] ?? '0'; $cgst = $product['cgst'] ?? '0'; $sgst = $product['sgst'] ?? '0'; $inStock = $product['instock'] ?? 0; $description = Str::limit(strip_tags($product['description'] ?? 'No Description'), 150, '...'); $image = $product['product_image_1'] ?? 'no-image.png'; @endphp
{{-- Product Image --}}
@if (isset($microsite_subdomain) && $microsite_subdomain != '') @if (isset($product['image_mapping']) && !empty($product['image_mapping'])) @foreach ($product['image_mapping'] as $i => $map_img)
@php $map_img['x'] = json_decode($map_img['x'], true); $map_img['y'] = json_decode($map_img['y'], true); $map_img['height'] = json_decode($map_img['height'], true); $map_img['width'] = json_decode($map_img['width'], true); $map_img['angle'] = json_decode($map_img['angle'], true); @endphp @foreach ($map_img['x'] as $j => $x)
@endforeach
@endforeach @else {{ $product['product_name'] }} @endif @else {{ $product['product_name'] }} @endif {{-- --}}
{{-- Product Details & Price --}}
{{-- Left Info --}}
{{ $productName }}

Brand: {{ $brand }}

Category: {{ $category }} > {{ $subCategory }}

@php $avgRating = $product['reviews_avg_rating'] ?? 0; $fullStars = floor($avgRating); $hasHalfStar = $avgRating - $fullStars >= 0.5; @endphp
{{ round($avgRating, 1) }} ★ {{ $product['reviews_count'] ?? 0 }} Reviews

Material: {{ $material }} | Size: {{ $size }} | Weight: {{ $weight }}

In Stock: {{ $inStock }} | Unit: {{ $unit }}

{{ $description }}

{{-- Pricing Info --}}

₹{{ number_format($salesPrice, 2) }}

@if ($mrp > $salesPrice)

₹{{ number_format($mrp, 2) }} {{ $discount }}% off

@endif

Inclusive of all taxes

@endforeach

Showing {{ $page }}–{{ $totalpages }} of {{ $totalrecord }} results

@endif