@php
// Flatten the wishlist array to check all product_ids
$allWishlistProducts = collect($wishlistItems)->flatten()->toArray();
@endphp
@if(in_array($product->id, $allWishlistProducts))
@else
@endif
@if ($product->sale_price > 0 && $product->price > $product->sale_price)
@php
$discount = (($product->price - $product->sale_price) / $product->price) * 100;
@endphp
{{ $product->product_title }}
{{ $product->title_addition }}
{{ substr(strip_tags($product->description), 0, 40) . '......' }}
@if(!empty($product->sale_price))
@if($product->sale_price)
₹{{ $product->sale_price }}
@endif
₹{{ $product->price }}
@else
₹{{ $product->price }}
@endif
@php
// Flatten the cartItems array to check all product_ids
$allCartProducts = collect($cartItems)->flatten()->toArray();
@endphp
@if(in_array($product->id, $allCartProducts))