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

Products / checkout

Billing Details

@if(Auth::check()) @else
@endif
{!! Form::select('roles[]', $roles, isset($user) ? $user->roles->pluck('id')->toArray() : null, ['class' => 'form-control select2-selection__rendered roleselect']) !!}

Your order

@php $total_price = 0; @endphp @if(count(session('cart'))>0) @foreach(session('cart') as $item) @php $unit_price = $item['unit_price'] * $item['quantity']; $total_price = $total_price + $unit_price; @endphp @if($item['product_id']) @endif @endforeach @endif @php $tot = $percentage + $total_price; @endphp
Product Total
{{$item['product_name']}} × {{$item['quantity']}} {!!currency()!!} {{number_format($item['quantity']*$item['unit_price'])}}
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 {!!currency()!!} {{number_format($tot)}}.00
@php $amount=$tot*1000; @endphp
@csrf
@endsection