@extends('Website.Includes.header', ['meta_Details' => $meta_details]) @section('content')
Background Image

Shop

Sydney Quality Meats: Shop

@if (request('category_id')) @endif @if (request('search')) @endif @if (request('min_price')) @endif @if (request('max_price')) @endif
@if (request('category_id')) @endif @if (request('search')) @endif @if (request('min_price')) @endif @if (request('max_price')) @endif
@if ($featuredproducts->isEmpty())
No products found
@else @foreach ($featuredproducts as $product) @php // Grab price from productMeta $priceMeta = $product->productMeta->firstWhere('option', '_price'); $stockMeta = $product->productMeta->firstWhere('option', '_stock_status'); $price = $priceMeta ? $priceMeta->value : '0'; $stock = $stockMeta ? $stockMeta->value : ''; @endphp
{{ $product->title }} @php $stock = $product->productMeta->firstWhere('option', '_stock_status')->value ?? 'in_stock'; @endphp @if ($stock != 'in_stock') Out of Stock @endif
@php $priceMeta = $product->productMeta->firstWhere('option', '_price'); $weightMeta = $product->productMeta->firstWhere('option', '_weight'); $price = $priceMeta ? $priceMeta->value : 0; $weight = $weightMeta ? $weightMeta->value : 0; $discountData = $product->discount_data ?? null; @endphp @if ($discountData)

${{ $price }} ${{ $discountData['discounted_price'] }}

{{ $weight }} KG

@else

${{ $price }}

{{ $weight }} KG

@endif @if ($stock == 'in_stock')
@csrf
@else @endif
@endforeach @endif
@if (request('sort')) @endif @if (request('category_id')) @endif @if (request('min_price')) @endif @if (request('max_price')) @endif

Price

@if (request('search')) @endif @if (request('sort')) @endif @if (request('category_id')) @endif

Categories

    @foreach($categories as $category) {{-- Assign "active-category" class to the
    if this category is selected --}} @endforeach
@if ($featuredproducts->total() > 0)

Showing {{ $featuredproducts->firstItem() }} - {{ $featuredproducts->lastItem() }} of {{ $featuredproducts->total() }} Results

@else

Showing 0 - 0 of 0 results

@endif
@push('scripts') @endpush @endsection