@extends('frontend::layouts.master') @section('title') @section('style') @endsection @section('content')
{{-- Section : Product List --}}

@lang('frontend.frnd_70')

@foreach ($products as $product) @php $paymentDate = date('Y-m-d'); $paymentDate = date('Y-m-d', strtotime($paymentDate)); $price = calculator_price($product->item_price); $get_image_item = setImage($product->id); @endphp
status_board)) @if (!empty($price['discount_type'])) data-discount="%" @endif @endif @if (empty($product->status_board) && ($paymentDate >= date('Y-m-d', strtotime(!empty($product->date_start)?$product->date_start:'')) && ($paymentDate <= date('Y-m-d', strtotime(!empty($product->date_end)?$product->date_end:''))))) @if (!empty($price['discount_type'])) data-discount="%" @endif @endif >

{{!empty($product->status_new)?'NEW':''}}

{{-- @if (!empty($price['discount_type']))

{{ $price['discount_percent'] }}%

@endif --}}
{{ $product['name_' . $pageInit['lang']] ?? '' }}{!! backProductName($product, $get_image_item['foritems']??'', $pageInit['lang']) !!}
@if (!empty($price['discount_type']))

{{ number_format($price['old_price'], 2) }}

THB {{ number_format($price['total_price'], 2) }} ({{ $price['discount_percent'] }}@lang('frontend::lang.product_01'))

@else

THB {{ number_format($price['total_price'], 2) }}

@endif
{{-- --}}
@endforeach
@endsection @section('script') @endsection