@foreach (\App\HomeCategory::where('status', 1)->orderBy('ordering')->get() as $key => $homeCategory) @if ($homeCategory->category != null)

{{ translate($homeCategory->category->name) }}

@foreach(\App\Product::where('published', 1)->when( $homeCategory->category->id != '134', function ($q) { return $q->where('is_sortable', 1); })->where('category_id', $homeCategory->category->id) ->select(['*', \DB::raw('IF(`ordering` IS NOT NULL, `ordering`, 1000000) `ordering`')]) ->orderBy('ordering', 'asc') ->take(6)->get() as $key => $product)
@if(home_base_price($product->id) != home_discounted_base_price($product->id)) {{ home_base_price($product->id) }} @endif {{ home_discounted_base_price($product->id) }}
{{ renderStarRating($product->rating) }}

{{ __($product->name) }}

@if (\App\Addon::where('unique_identifier', 'club_point')->first() != null && \App\Addon::where('unique_identifier', 'club_point')->first()->activated)
{{ translate('Club Point') }}: {{ $product->earn_point }}
@endif
@endforeach
@endif @endforeach