{{-- Breadcrumb --}}

Alışveriş Sepetim

@if($items->count() > 0)
{{-- Sol Bölüm: Ürün Listesi --}}
{{-- Masaüstü Görünüm (Table) --}}
@php $groupedItems = $items->groupBy(function($item) { return $item->bundle_group_key ?? 'individual_' . $item->id; }); @endphp @foreach($groupedItems as $groupKey => $group) @if(str_starts_with($groupKey, 'individual_')) @php $item = $group->first(); @endphp @else @php $leadItem = $group->first(); $bundleData = $leadItem->bundle_data; $bundleQty = $bundleData['bundle_qty'] ?? 1; $bundleTotalPrice = $group->sum('total_price'); $bundleUnitPrice = $bundleTotalPrice / $bundleQty; @endphp @endif @endforeach
Ürün Birim Fiyat Miktar Toplam Aksiyon
@if($item->product->main_image_url) {{ $item->product->name }} @else
@endif
@if($item->variant_label)
{{ $item->variant_label }}
@endif
SKU: {{ $item->variant?->sku ?? $item->product->sku }}
{{ number_format($item->unit_price, 2, ',', '.') }} TL
{{ number_format($item->total_price, 2, ',', '.') }} TL
{{ $bundleData['bundle_name'] ?? 'Ürün Paketi' }}
@foreach($group as $subItem)
{{ $subItem->quantity / $bundleQty }}x {{ $subItem->product->name }} @if($subItem->variant_label) ({{ $subItem->variant_label }}) @endif
@endforeach
{{ number_format($bundleUnitPrice, 2, ',', '.') }} TL
{{ number_format($bundleTotalPrice, 2, ',', '.') }} TL
{{-- Mobil Görünüm (Cards) --}}
@foreach($groupedItems as $groupKey => $group) @if(str_starts_with($groupKey, 'individual_')) @php $item = $group->first(); @endphp
@if($item->product->main_image_url) {{ $item->product->name }} @else
@endif
@if($item->variant_label)
{{ $item->variant_label }}
@endif
SKU: {{ $item->variant?->sku ?? $item->product->sku }}
Fiyat: {{ number_format($item->unit_price, 2, ',', '.') }} TL
Satır Toplamı: {{ number_format($item->total_price, 2, ',', '.') }} TL
@else @php $leadItem = $group->first(); $bundleData = $leadItem->bundle_data; $bundleQty = $bundleData['bundle_qty'] ?? 1; $bundleTotalPrice = $group->sum('total_price'); $bundleUnitPrice = $bundleTotalPrice / $bundleQty; @endphp
{{ $bundleData['bundle_name'] ?? 'Ürün Paketi' }}
@foreach($group as $subItem)
{{ $subItem->quantity / $bundleQty }}x {{ $subItem->product->name }} @if($subItem->variant_label) ({{ $subItem->variant_label }}) @endif
@endforeach
Paket Fiyatı: {{ number_format($bundleUnitPrice, 2, ',', '.') }} TL
Paket Toplamı: {{ number_format($bundleTotalPrice, 2, ',', '.') }} TL
@endif @endforeach
{{-- Sepet Temizleme ve Alışverişe Devam Et Butonları --}}
{{-- Sağ Bölüm: Özet Kartı --}}

Sipariş Özeti

{{-- Kupon Kodu Inputu --}}
{{-- Uygulanan Kupon --}} @if($appliedCoupon)
{{ $appliedCoupon->code }} uygulandı
@endif
{{-- Ara Toplam --}}
Ara Toplam {{ number_format($subtotal, 2, ',', '.') }} TL
{{-- Kargo --}}
{{ $shippingTitle }} @if($isFreeShipping || (float)$shippingTotal === 0.00) Ücretsiz @else {{ number_format($shippingTotal, 2, ',', '.') }} TL @endif
{{-- Ücretsiz kargoya kalan --}} @if(!$isFreeShipping && $freeShippingRemainingAmount > 0)
{{ number_format($freeShippingRemainingAmount, 2, ',', '.') }} TL daha ekleyin, kargo ücretsiz!
@endif {{-- Kupon İndirimi --}} @if($appliedCoupon && $discountAmount > 0)
Kupon İndirimi -{{ number_format($discountAmount, 2, ',', '.') }} TL
@endif
{{-- Genel Toplam --}}
Genel Toplam {{ number_format($grandTotal, 2, ',', '.') }} TL
@else

Sepetiniz Boş

Sepetinizde henüz eklenmiş herhangi bir ürün bulunmamaktadır.

Alışverişe Başla
@endif {{-- Fırsat Paketleri Önerileri --}} @if(!empty($cartBundles))

Sizin İçin Seçtiğimiz Fırsat Paketleri

@foreach($cartBundles as $b) @php $priceDetails = app(App\Services\ProductBundleService::class)->calculateBundlePrice($b); @endphp

{{ $b->name }}

@if($priceDetails['discount_amount'] > 0 && $priceDetails['items_subtotal'] > 0) %{{ round(($priceDetails['discount_amount'] / $priceDetails['items_subtotal']) * 100) }} Kazanç @endif
@if($b->description)

{{ $b->description }}

@endif
@foreach($b->items as $item)
{{ $item->quantity }}x
@if($item->product->main_image_url) {{ $item->product->name }} @else
@endif
{{ $item->product->name }}
@if($item->product_variant_id && $item->variant) ({{ app(\App\Services\ProductService::class)->generateVariantLabel($item->variant) }}) @endif
@endforeach
@endforeach
@endif {{-- Sepet Önerileri --}}