@extends('frontend.layouts.amp') @section('title', 'Shopping Cart - ' . app_name()) @section('content')

Shopping Cart

@if(Cart::isEmpty()) Sorry!, your cart is empty, click here to go back to the home page. @else
@include('includes.partials.messages')
@csrf
@php $sub_total = 0; $bogo_discount = 0; @endphp @foreach($data['cart'] as $cart) @php if($cart->attributes->image != '') $path = 'up_data/products/images/thumbnails/'.$cart->attributes->image; else $path = 'up_data/na.jpg'; $is_freebie = false; $freebie_qty = 0; if($cart->attributes->freebie) { $is_freebie = true; $freebie_qty = $cart->attributes->freebie_qty; $item_price = 0; $total_price = 0; } else { $item_price = $cart->getPriceWithConditions(); $total_price = $cart->getPriceSumWithConditions(); } if($cart->bogo_free) { $total_price_discount = $cart->bogo_free * $item_price; $bogo_discount += $total_price_discount; $talal_price_after_bogo = $total_price - $total_price_discount; } if($cart->bogod_count) { $discounted_price = ($item_price * $cart->bogod_percent) / 100; $total_price_discount = $cart->bogod_count * $discounted_price; $bogo_discount += $total_price_discount; $talal_price_after_bogo = $total_price - $total_price_discount; } @endphp @php $sub_total += $total_price; //echo '

'.$sub_total.''; @endphp @endforeach

Image Product Price Quantity Total
{{ $cart->name }}
{{ $cart->attributes->sku }}@if($is_freebie)
1 {{ $cart->name }} Per Order
@endif
@if($is_freebie)
Free Product
@else @if($cart->attributes->discount == 0) ${{ number_format($cart->price, 2) }} @else ${{ number_format($cart->price, 2) }} ${{ number_format($item_price, 2) }} @endif @endif
@if($is_freebie)      1 @else @endif
@if($is_freebie)
Free Product
@else @if($cart->attributes->discount == 0) bogo_free || $cart->bogod_count) class="old-price" @endif>${{ number_format($cart->getPriceSum(), 2) }} @else ${{ number_format($cart->getPriceSum(), 2) }} bogo_free || $cart->bogod_count) class="old-price" @endif>${{ number_format($total_price, 2) }} @endif @if($cart->bogo_free || $cart->bogod_count) ${{ number_format($talal_price_after_bogo, 2) }} @if($cart->bogod_count) {{ $cart->bogod_percent }}% discount
on {{ $cart->bogod_count }} @if($cart->bogod_count > 1) items @else item @endif @else {{ $cart->bogo_free }} free @if($cart->bogo_free > 1) items @else item @endif @endif
@endif @endif
@if(!$is_freebie) @endif

Use Coupon Code

Enter your coupon code if you have one.

@if(Cart::isEmpty()) @else

Cart Summary

@php $discount = 0; if(request()->session()->get('ses_coupon')) { $coupon = request()->session()->get('ses_coupon'); if($coupon['type'] == 'amount') { $discount = $coupon['value']; } else { $discount = ($sub_total * $coupon['value']) / 100; } } if($bogo_discount) { $discount += $bogo_discount; } if( request()->session()->get('ses_shipping_rate') ) $shipping_rate = request()->session()->get('ses_shipping_rate'); else $shipping_rate = 0; $grand_total = (($sub_total + $shipping_rate) - $discount); $total_withot_shipping = $sub_total - $discount; request()->session()->put('ses_total_without_shipping', $total_withot_shipping); @endphp
  • Sub Total ${{ number_format($sub_total, 2) }}
  • Discount ${{ number_format($discount, 2) }}
  • Shipping Cost {{ $data['shipping_rate'] ?? "$0.00" }}

Grand Total ${{ number_format($grand_total, 2) }}

@endif @endif
@endsection