Commit ce9bbd5e authored by Artem's avatar Artem

add link to product on orders page in different way

parent 2d99e842
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
<ul class="list-group list-group-flush"> <ul class="list-group list-group-flush">
@foreach($order->products as $product) @foreach($order->products as $product)
<li class="list-group-item order-item"> <li class="list-group-item order-item">
<a href="{{ $product->product->path() }}">{{ $product->ordered_reference }}</a> <a href="{{ route('product.show', $product->product_id) }}"
{{-- href="{{ $product->product->path() }}" TODO ask if this is good for performance, to get product from eloquent relation --}}
>{{ $product->ordered_reference }}</a>
<div class="d-flex"> <div class="d-flex">
<div>{{ $product->ordered_price }} EUR</div> <div>{{ $product->ordered_price }} EUR</div>
<div class="ml-auto">{{ $product->ordered_qty }} {{ ($product->ordered_qty === 1) ? 'pc' : 'pcs' }}</div> <div class="ml-auto">{{ $product->ordered_qty }} {{ ($product->ordered_qty === 1) ? 'pc' : 'pcs' }}</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment