@foreach($new_products as $product)
{{$product->name}}
@if($product->discount_percentage > 0) {{translate('off')}} {{($product->discount_percentage)}} % @endif

{{$product->name}}

@php echo show_ratings($product->rating()->avg('rating')) @endphp
@php $price = (@$product->stock->first()?->price ?? $product->price); @endphp @if(($product->discount_percentage) > 0) @php $discountPrice = cal_discount($product->discount_percentage,$price); @endphp {{short_amount($discountPrice)}} {{short_amount($price)}} @else {{short_amount($price)}} @endif
@php $randNum = rand(1,10000000); $randNum = $randNum."+-".$randNum; @endphp
{{translate('Add to cart')}} @php $authUser = auth_user('web'); $wishedProducts = $authUser ? $authUser->wishlist->pluck('product_id')->toArray() : []; @endphp
@endforeach