@extends('frontend.layouts.app') @section('title-suffix') {{ __('cart.title') }} @endsection @push('styles') @endpush @section('main-content')
@if (!$products)

{{ __('cart.empty-1') }}
{{ __('cart.empty-2') }}

{{ __('cart.fill-btn') }}
@else
@foreach ($products as $key => $product) @endforeach
{{ __('cart.thead-product') }} {{ __('cart.thead-price') }} {{ __('cart.thead-quantity') }} {{ __('Total') }}
{{ $product['price'] }} FCFA @if ($product['discount'])-{{ $product['discount'] }} %@endif
{{ $product['total'] }} FCFA
{{ __('cart.update-btn') }}
@csrf @method('PUT')
{{ __('cart.subtotal-btn') }}
@php $subTotal = 0.0; @endphp @if ($products) @foreach ($products as $key => $product) @php $subTotal += doubleval($product['total']); @endphp @endforeach @endif
{{ $subTotal }} FCFA
@endif
@endsection @push('scripts') @endpush