File: D:/HostingSpaces/SBogers10/carrot.komma.pro/resources/views/shop/partials/orders/overview.blade.php
<table>
<thead>
<tr>
<th>@lang('shop/products.sku')</th>
<th>@lang('shop/products.description')</th>
<th>@lang('shop/products.quantity')</th>
<th>@lang('shop/products.discount')</th>
<th>@lang('shop/products.total')</th>
</tr>
</thead>
<tbody>
{{-- pivotfields on orderProducts = ['quantity', 'price', 'title', 'product_discount', 'stock_keeping_unit']; --}}
<tr>
<td collspan="5">Bestelde producten</td>
</tr>
@foreach($products as $orderedProduct)
<tr>
<td style="font-size: 12px">{{ $orderedProduct->stock_keeping_unit }}</td>
<td style="font-size: 12px">{{ $orderedProduct->title }}</td>
<td style="font-size: 12px">{{ $orderedProduct->quantity }}</td>
<td style="font-size: 12px">{{ $orderedProduct->discount }}</td>
<td style="font-size: 12px">€ {{ $orderedProduct->price / 100}}</td> <!--TODO Use region info to format prices-->
</tr>
@endforeach
<tr>
<td colspan="5"><b>Bestelde product groepen</b></td>
</tr>
@foreach($product_groups as $orderedProductGroup)
<tr>
<td colspan="2">{{ $orderedProductGroup->title }}</td>
<td>{{ $orderedProductGroup->quantity }}</td>
<td>{{ $orderedProductGroup->discount }}</td>
<td>€ {{ $orderedProductGroup->price / 100 }}</td>
</tr>
@foreach($orderedProductGroup->orderedProducts as $orderedProduct)
<tr>
<td style="font-size: 12px">{{ $orderedProduct->stock_keeping_unit }}</td>
<td style="font-size: 12px">{{ $orderedProduct->title }}</td>
<td style="font-size: 12px">{{ $orderedProduct->quantity }}</td>
<td style="font-size: 12px">{{ $orderedProduct->discount }}</td>
<td style="font-size: 12px">€ {{ $orderedProduct->price / 100}}</td>
</tr>
@endforeach
@endforeach
@foreach($product_composites as $orderedProductComposite)
<tr>
<td collspan="5"><b>Bestelde samengestelde product groepen</b></td>
</tr>
<tr>
<td colspan="2">{{ $orderedProductComposite->title }}</td>
<td>{{ $orderedProductComposite->quantity }}</td>
<td>{{ $orderedProductComposite->discount }}</td>
<td>€ {{ $orderedProductComposite->price / 100 }}</td>
</tr>
@foreach($orderedProductComposite->orderedGroups as $orderedProductGroup)
<tr>
<td style="font-size: 12px">{{ $orderedProduct->stock_keeping_unit }}</td>
<td style="font-size: 12px">{{ $orderedProduct->title }}</td>
<td style="font-size: 12px">{{ $orderedProduct->quantity }}</td>
<td style="font-size: 12px">{{ $orderedProduct->discount }}</td>
<td style="font-size: 12px">€ {{ $orderedProduct->price / 100}}</td>
</tr>
<tr>
<td colspan="2">{{ $orderedProductGroup->title }}</td>
<td>{{ $orderedProductGroup->quantity }}</td>
<td>{{ $orderedProductGroup->discount }}</td>
<td>€ {{ $orderedProductGroup->price / 100 }}</td>
</tr>
@foreach($orderedProductGroup->orderedProducts as $orderedProduct)
<tr>
<td style="font-size: 12px">{{ $orderedProduct->stock_keeping_unit }}</td>
<td style="font-size: 12px">{{ $orderedProduct->title }}</td>
<td style="font-size: 12px">{{ $orderedProduct->quantity }}</td>
<td style="font-size: 12px">{{ $orderedProduct->discount }}</td>
<td style="font-size: 12px">€ {{ $orderedProduct->price / 100}}</td>
</tr>
@endforeach
@endforeach
@endforeach
</tbody>
</table>