@extends('layouts.layout') @section('title', 'Cart') @section('content') @php function currency(){ $result=DB::table('membership_currency')->where('status','Active')->first(); return isset($result->currency_symbol)?$result->currency_symbol:''; } @endphp

Products / list of products

@php $total_price = 0; @endphp @if(count(session('cart'))>0) @foreach(session('cart') as $item) @php $productimg=DB::table('product_images')->where('product_id',$item['product_id'])->where('is_delete','0')->orderBy('id','ASC')->limit('1')->first(); $unit_price = $item['unit_price'] * $item['quantity']; $total_price = $total_price + $unit_price; @endphp @if($item['product_id']) @endif @endforeach
Delete Image Product Price Quantity Total
@if(isset($productimg->image_name)) @endif {{$item['product_name']}} {!!currency()!!} {{number_format($item['unit_price'])}} {!!currency()!!} {{number_format($item['quantity']*$item['unit_price'])}}
@csrf
@else

Your shopping cart is currently empty !



@endif

@if(count(session('cart'))>0)

Subtotal {!!currency()!!} {{number_format($total_price,2)}}

Gst (18%) @php $x = 18; $percentage = ($x*$total_price)/100; @endphp {!!currency()!!} {{number_format($percentage,2)}}

Grand Total @php $tot = $percentage + $total_price; @endphp {!!currency()!!} {{number_format($tot,2)}}


@endif
@endsection