@php use Modules\Core\Helpers\Helper; @endphp
@php $total_prod=0; $total_amount=0; @endphp @if(session('wishlist')) @foreach(session('wishlist') as $wishlist_items) @php $total_prod+=$wishlist_items['quantity']; $total_amount+=$wishlist_items['amount']; @endphp @endforeach @endif {{-- {{Modules\Core\Helpers\Helper::wishlistCount()}} --}} @auth
    @foreach(Helper::getAllProductFromWishlist() as $data) @php // Check what field actually exists in the product model // Common field names: 'photo', 'image', 'images', 'thumbnail' $productImage = $data->product['image'] ?? $data->product['images'] ?? $data->product['photo'] ?? $data->product['thumbnail'] ?? 'default.jpg'; // If it's a comma-separated string, explode it $photos = is_string($productImage) ? explode(',', $productImage) : [$productImage]; $firstPhoto = $photos[0] ?? 'default.jpg'; @endphp
  • {{$data->product['title']}}

    {{$data->product['title']}}

    {{$data->quantity}} x - ${{number_format($data->price,2)}}

  • @endforeach
Total ${{number_format(Helper::totalWishlistPrice(),2)}}
Cart
@endauth
Mycart {{Helper::cartCount()}} @auth
    @foreach(Helper::getAllProductFromCart() as $data) {{-- @php $photo=explode(',',$data->product['photo']); @endphp --}}
  • {{-- {{$photo[0]}} --}}

    {{$data->product['title']}}

    {{$data->quantity}} x - ${{number_format($data->price,2)}}

  • @endforeach
Total {{-- ${{number_format(Helper::totalCartPrice(),2)}} --}}
Checkout
@endauth
@if (Request::path() == '/') {{--

CATEGORIES

--}}
@else
@endif