@foreach ($orders as $order_key => $order) @php $phones = json_decode($order->phone); $first_phone = $phones[0]; $second_phone = sizeof($phones) > 1 ? $phones[1] : ''; $description = ''; $Quantity = 0; $last_note = sizeof($order->notes) - 1 == -1 ? "" : $order->notes[sizeof($order->notes) - 1]['note']; $total_price = $order->Shipping_fees; foreach ($order->items as $key => $item) { $description .= ($key == 0 ? "\n" : "\n," ). $item->needed. ' ' . $item->product_name . ' ' . $item->color . ' ' . $item->size; $Quantity += +$item->needed; $total_price += +$item->needed_price * +$item->needed; } $description .= "\n," . $second_phone; @endphp @endforeach
Package_Serial Description Total_Weight Service Service_Type Service_Category Payment_Type COD_Value Quantity Weight Dimensions Item_Category Item_Special_Notes Customer_Code Customer_Name Mobile_No Building_No Street Floor_No Apartment_No City Neighborhood District Address_Category Package_Ref. Number Piece_Ref. Number Fulfillment
{{$description}} Next Day Door-to-Door Delivery {{$order->payment_type}} {{$total_price}} {{$Quantity}} يسمح بفتح الشحنة، {{$last_note}} {{$order->name}} {{$first_phone}} {{$order->Shipping_location}} - {{implode(",\n", json_decode($order->address))}} {{$order->address_category}} {{$order->id}}