@php use App\Models\GeneralSetting; $setting= GeneralSetting::latest()->first(); $ecomm_setting = DB::table('ecommerce_settings')->first(); $cart_price = $ecomm_setting->cart_price ?? 0; $payment_options=DB::table('pos_setting')->first()->payment_options; $total=0; @endphp
Cart - {{ getTotalCart()}} items
@if($setting->coupon_apply == 1) @if($couponMessage) {{$couponMessage}} @endif
get('couponCode')) readonly style="background: #ebebeb;" @endif placeholder="Enter your coupon code"> @if(session()->get('couponCode')) @else @endif
@endif
@foreach($cart as $key=>$item) @php $sub_total=$item['price']*$item['quantity']; $total +=$sub_total; $free = $item['free_ship']; @endphp @endforeach @if($setting->coupon_apply == 1) @endif @if(getTotalDiscount()>0) @endif @php $total=$total-getTotalDiscount() - $coupon; @endphp
@csrf @method('DELETE')
Code: {{ isset($item['code']) ? $item['code'] : $item['name']}}
@if($item['variants']) @foreach($item['variants'] as $v) @if($v->id==$item['variant_id'])

{{$v->name}}

@endif @endforeach @endif
@if($free) Free Ship @endif
@if($item['old_price']!='0') {{$item['old_price']}} @else {{$item['price']}} @endif @if($item['discount']) Discount: {{$item['discount']}} @endif
Subtotal {{$total}} ৳
Coupon Discount

{{$coupon}} ৳

Delivery Charge

Discount

{{getTotalDiscount()}} ৳

Total

{{number_format($total, 0)}} ৳

@foreach($cart as $item)
@endforeach