@extends($_layout . 'master') @section('title', $page_title) @include($_lib . 'register-meta') @section('body.class', 'product-page') @section('content') @php $hasPromo = $product->hasPromo(); // $reviews = $product->getReviewData(); $hasOption = $product->hasOption(); $u = $product->getViewUrl(); $user = $request->user(); add_product_schema($product); $reviewAnalytics = $product->getReviewData(); @endphp @php $thumbnails = $product->getThumbnailOrderOption(); $thumbnailImages = []; if ($thumbnails) { foreach ($thumbnails as $thumbAttr) { if (is_array($attrValues = $thumbAttr->values) && count($attrValues)) { foreach ($attrValues as $attrVal) { if ($attrVal->thumbnail) { $thumbnailImages[] = $attrVal; } } } } } @endphp

{{ $product->name }}

@if ($hasPromo && $product->price_status > -1) {{ $product->priceFormat('list') }} {{-- -{{$product->getDownPercent()}}% --}} @endif {{ $product->priceFormat('final') }}
{!! $product->detail !!}
@if ($ecommerce->allow_place_order && $product->price_status > 0 && $product->status > 0 && $product->available_in_store)
@csrf {!! $product->attributesToHtml([ 'section_class' => '', 'attribute_class' => '', 'attribute_name_class' => '', 'value_list_class' => '', 'value_item_class' => '', 'select_class' => '', 'image_class' => '', 'value_text_class' => '', 'radio_class' => '', 'value_label_class' => '', ]) !!}
Số lượng
@if ($product->note)
{!! nl2br($product->note) !!}
@endif
@elseif(!$product->available_in_store)
Sản phẩm tạm hết hàng
@endif
@if (count($list = $product->getRelated([ '@limit' => 6, '@with' => ['gallery', 'promoAvailable'], '@withOption' => true ])))

Có thể bạn sẽ thích

@foreach ($list as $item)
@php $hasPromo = $item->hasPromo(); $reviews = $item->getReviewData(); $hasOption = $item->hasOption(); $u = $item->getViewUrl(); $style_attrs = $item->style_attrs ?? []; $downPercent = $item->getDownPercent(); $listPrice = $item->priceFormat('list'); $finalPrice = $style_attrs ? get_currency_format($item->checkPrice($item->style_attrs)) : $item->priceFormat('final'); @endphp @if ($item->labels && count($item->labels))
@foreach ($item->labels as $label)
{{$label->title}}
@endforeach
@endif

{{ $item->name }}

{{ $finalPrice }}
@endforeach
@endif
@endsection