@php $nxpage = 12; $items = 0; $pagina = 1; @endphp @foreach($products as $key => $product)
@if($product->offsale == 1)
{{ $product->porcentoffsale }}%
@endif
{{ $product->name }}
{!! $product->marca->name !!}
{!! str_limit( $product->name , $limit = 40, $end = '...') !!}
@if($product->offsale == 1)
${{ number_format($product->price, 0) }}
${{ number_format($product->price - ((($product->price * $product->porcentoffsale) / 100)), 0) }}
@else
${{ number_format($product->price, 0) }}
@endif
@php $items++; if($items == $nxpage){ $items=0; $pagina++; } @endphp @endforeach @if($pagina > 1)
@php $items = 0; $pagina = 1; $pgid = 1; @endphp
@endif @section('scripts') @stop