@php use Illuminate\Support\Str; $quantities = collect($cartItems)->pluck('quantity', 'product_id'); $cdr_pdfs = collect($cartItems)->pluck('cdr_pdf', 'product_id'); $imagess = collect($cartItems)->pluck('images', 'product_id'); $user_texts = collect($cartItems)->pluck('user_text', 'product_id'); $previews = collect($cartItems)->pluck('preview', 'product_id'); @endphp @if (count($product) == 0 && count($woohoo_cart_items) == 0)

Your Cart is Empty

Looks like you haven't added anything to your cart yet. Let's explore some great products!

Browse Products
@endif
@foreach ($product as $i => $item) @php $img = $images[$item['id']][0]['image'] ?? 'default.jpg'; $quantity = $quantities[$item['id']] ?? 1; $price = $item['mrp']; $offerPrice = $item['sales_price']; $discount = $price - $offerPrice; $cdr_pdf = $cdr_pdfs[$item['id']]; $images = $imagess[$item['id']]; $user_text = $user_texts[$item['id']]; $preview = $previews[$item['id']]; @endphp
{{ Str::limit($item['product_name'], 40) }}
Brand: {{ $item['brand']['name'] ?? 'Unknown' }}
@if ($discount > 0) {{ round(($discount / $price) * 100) }}% OFF @endif
₹{{ $offerPrice }}
@if ($discount > 0)
₹{{ AmountFormat($price) }}
@endif
@if ($isDb)
Remove
@else
Remove
@endif
@if (!empty($cdr_pdf)) @php $cdr_pdf = json_decode($cdr_pdf, true); @endphp @foreach ($cdr_pdf as $item) @endforeach @endif @if (!empty($preview)) @php $preview = json_decode($preview, true); @endphp @foreach ($preview as $item) @endforeach @endif
@endforeach
@if (count($product) > 0)
@endif
@foreach ($woohoo_cart_items as $wi => $item)
@php $images = json_decode($item['product']['images'], true); $image = $images['small']; @endphp {{ $item->product->name ?? 'Product' }}
{{ Str::limit($item['product']['name'], 40) }}
@if ($item['theme'] != '')
@endif
Receiver Name : {{ emptyTo__($item['receiver_name']) }}
Receiver Mobile : {{ emptyTo__($item['mobile_number']) }}
Receiver Email : {{ emptyTo__($item['email_id']) }}
₹{{ AmountFormat($item['quantity'] * $item['price']) }}
Quantity {{ $item['quantity'] }} Price {{ AmountFormat($item['price']) }}
Remove
@endforeach
@if (count($woohoo_cart_items) > 0)
@endif @if (count($product) > 0 || count($woohoo_cart_items) > 0)
Still exploring?

Keep browsing and find something you love.

Continue Shopping
@endif