Edit File: products.blade.php
<div class="col-12"> <div class="card"> <div class="card-header"> <h5 class=""><i class="fa fa-info-circle"></i> {{ __('admin.products') }} </h5> </div> <hr> <div class="card-content"> <div class="card-body"> <table class="table " id="tab"> <thead> <tr> <th>{{ __('admin.product_name') }}</th> <th>{{ __('admin.category') }}</th> <th>{{ __('admin.quantity') }}</th> <th>{{ __('admin.unit_price') }}</th> <th>{{ __('admin.total') }}</th> <th>{{ __('admin.total_incl_addons') }}</th> <th>{{ __('admin.addons') }}</th> </tr> </thead> <tbody> @foreach ($order->orderItems as $item) <tr> <td>{{ $item?->product?->name }}</td> <td>{{ $item?->product?->category?->name }}</td> <td>{{ $item?->quantity }}</td> <td>{{ $item?->unit_price }}</td> <td>{{ $item?->total }}</td> <td>{{ $item?->total_incl_addons }}</td> @if ($item->orderItemAddons->count() > 0) <td> <button type="button" class="btn" data-toggle="collapse" data-target="#collapseRow{{ $item?->id }}" aria-expanded="false"> <i class="fa fa-chevron-down"></i> </button> </td> @else <td>{{ __('admin.no_addons') }}</td> @endif </tr> <tr class="collapse out" id="collapseRow{{ $item?->id }}"> <td colspan="7"> <table class="table table-striped" id="tab"> <thead> <tr> <th>{{ __('admin.addon_name') }}</th> <th>{{ __('admin.quantity') }}</th> <th>{{ __('admin.unit_price') }}</th> <th>{{ __('admin.total') }}</th> </tr> </thead> <tbody> @foreach ($item->orderItemAddons as $addon) <tr> <td>{{ $addon?->addon?->name }}</td> <td>{{ $addon?->quantity }}</td> <td>{{ $addon?->unit_price }}</td> <td>{{ $addon?->total }}</td> </tr> @endforeach </tbody> </table> </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div>
Back to File Manager