@extends('layouts.user') @section('sidebar') @include('frontend.components.user-layout-sidebar') @endsection @section('body_class') fill_data shop invoice orders_pages wizard @endsection @section('content')

@php $total = $price =0; @endphp
    @foreach ($order->order_items as $key => $cartItem)
  • {{ ++$key }}
    @if ($cartItem->type == 'sadakat') @php $total += $cartItem->sadakat->price * $cartItem->quantity; $price = $cartItem->sadakat->price; @endphp

    {{ $cartItem->sadakat->name }}

    باقة : {{ $cartItem->sadakat->price }} ريال
    @elseif($cartItem->type == 'ashom') @php $total += $cartItem->ashom->price * $cartItem->quantity; $price = $cartItem->ashom->price; @endphp

    {{ $cartItem->ashom->name }}

    سعر السهم : {{ $cartItem->ashom->price }} ريال
    @else @php $total += $cartItem->price * $cartItem->quantity; $price = $cartItem->price; @endphp

    الذكاة

    المبلغ : {{ $cartItem->price }} ريال
    @endif
    {{ $cartItem->quantity }}
    الاجمالي : {{ $price * $cartItem->quantity }} ريال
  • @endforeach
الأجمالي : {{ $order->total }} ريال
@endsection