@extends('layouts.app') @section('title','Checkout | Shopora') @section('content')
@if(session('error'))
{{ session('error') }}
@endif @if(session('success'))
{{ session('success') }}
@endif
@csrf
{{-- Left Column: Shipping & Payment --}}
{{-- Shipping Info --}}

Shipping

{{-- Payment Method --}}

Payment

@foreach([ ['cash_on_delivery','fa-money-bill-wave','COD', 'Pay at door'], ['card','fa-credit-card','Card', 'Pay online'] ] as [$val,$icon,$label,$desc]) @endforeach
{{-- Right Column: Order Summary --}}

Summary

@foreach($cart->items as $item)
@if($item->product->images && is_array($item->product->images) && count($item->product->images) > 0) {{ $item->product->name }} @else @endif

{{ $item->product->name }}

Qty: {{ $item->quantity }}

Rs. {{ number_format($item->line_total) }}
@endforeach
@php $shipping = $cart->subtotal >= 10000 ? 0 : 299; @endphp
SubtotalRs. {{ number_format($cart->subtotal) }}
Logistics{{ $shipping==0?'FREE':'Rs. '.number_format($shipping) }}
@if($cart->discount>0)
Savings- Rs. {{ number_format($cart->discount) }}
@endif

Total

Rs. {{ number_format($cart->total + $shipping) }}
@endsection