@extends('layouts.public.app') @section('title', 'Cart | Chemical Wholesale') @section('content')

Shopping Cart

Home > Cart

@csrf
{{--
Filter
Add Filter
--}}
Products added in your cart
@if (count($cart) > 0) @php $groupedCart = $cart->groupBy( fn($cartItem) => $cartItem->getProduct->getBusiness['id'], ); @endphp @foreach ($groupedCart as $businessName => $cartItems) @php $firstCartItem = $cartItems->first(); $business = $firstCartItem->getProduct->getBusiness; $businessId = $business['id']; $businessName = $business['company']; @endphp
Showing products from {{ $businessName }}
@foreach ($cartItems as $cartitem) @php $images = @$cartitem->getproduct->getimages ? @$cartitem->getproduct->getimages->groupby('section') : ''; @endphp
@if ($cartitem->getpackage) @else @endif
@if ($cartitem->getproduct->getpackage)
Product SKU: {{ @$cartitem->getProduct->product_sku }}
Supplier: {{ @$cartitem->getProduct->getBusiness->company }}
Packaging: {{ ucfirst(@$cartitem->getpackage->packaging_type) }}
MOQ: {{ @$cartitem->quantity ?: 'N.A' }}
Price: ${{ number_format(@$cartitem->getpackage->price, 2) }}
Quantity:
@else
This product is not available for checkout!
@endif
@endforeach @endforeach @else
No products in your cart
Search products
@endif
@if (count($cart) != 0)
Order Summary

items selected.

Selected items in your cart will generate different orders.

Subtotal:
${{ number_format(@$subtotal, 2) ?: '0.0' }}
Discount:
$0.00
Tax (20%):
$0.00
Shipping:
${{ number_format(@$shipping_price, 2) ?: '0.0' }}
Total:
${{ number_format(@$subtotal + @$shipping_price, 2) ?: '0.0' }}
@if (count($cart) > 1) @php $groupedCart = $cart->groupBy( fn($cartItem) => $cartItem->getProduct->getBusiness['id'], ); @endphp
@endif
@endif
@endsection @push('css') @endpush @push('js') @if ($cart_message) @endif @endpush