@php $activedProduct = get_active_model('product'); $products = $activedProduct->getSuggestionProducts([ '@limit' => $data->limit && $data->limit > 0 ? $data->limit : 4, '@sorttype' => $data->sorttype(1), '@with' => ['promoAvailable'] ]); @endphp @if (count($products))

{{str_replace('{product_name}', $activedProduct->name, $data->title('Phối đồ cùng {product_name}'))}}

@foreach ($products as $item) @php $hasPromo = $item->hasPromo(); // $reviews = $product->getReviewData(); $hasOption = $item->hasOption(); $u = $item->getViewUrl(); $downPercent = $item->getDownPercent(); $listPrice = $item->priceFormat('list'); $finalPrice = $item->priceFormat('final'); @endphp

{{$item->sub('name', 50, '...')}}

@if ($hasPromo) {{$listPrice}} {{$finalPrice}} -{{$downPercent}}% @else {{$finalPrice}} @endif

@endforeach
@endif