@extends('frontend.layouts.app') @php $show_prices = false; $banner = null; $video_tag = ''; if(isset($data['category'])) { if(isset($data['category']->meta_title)) $title = $data['category']->meta_title; else $title = $data['category']->name . ' - ' . app_name(); if($data['category']->do_index == 'N' || $data['category']->status == 'N') $no_index = 'NOINDEX'; if($data['category']->show_prices == 'Y') $show_prices = true; if($show_prices && $data['category']->banner_id > 0) { $banner = \App\Models\Banner::getBanner($data['category']->banner_id); } if(trim($data['category']->video_link) != null) { if($data['category']->video_site == 'YouTube') { $video_tag = '
'; } else { $video_tag = '
'; } } } else { $title = ''; } @endphp @if(isset($no_index)) @push('head-area') @endpush @endif @if($data['listing_type'] == 'products_search') @section('title', 'Search Results for '.request()->input('s')) @elseif(isset($data['category'])) @php $title = trim($data['category']->meta_title); if($title != null && $title != 'NULL') $title = $data['category']->meta_title; else $title = $data['category']->name . ' - ' . app_name(); $data['category_products'] = $data['category']->products()->where('status', 'Y')->where('type', '!=', 'child')->take(5)->get(); foreach($data['category_products'] as $category_products){ if($category_products->type == 'variation'){ $range = \App\Models\Product::getVariationDiscoutedPriceRange($category_products->id); $category_products->max = $range['max']; $category_products->min = $range['min']; $category_products->avg = $range['avg']; } } @endphp @section('title', $title) @if(isset($data['category']->meta_description) && trim($data['category']->meta_description) != null && $data['category']->meta_description != 'NULL') @section('meta_description', $data['category']->meta_description) @section('meta_keywords', $data['category']->meta_keywords) @endif @section('meta_url', URL::Current()) @section('page_title', $title) @section('product_description',$data['category']->meta_description) @php if($data['category']->image != '' || $data['category']->image != null) $image = '/up_data/categories/large/'.$data['category']->image; else $image = 'https://www.germedusa.com/design/assets/images/og_imag_logo.png'; @endphp @section('image',$image) {{-- @section('image',URL::to('/').'/up_data/categories/large/'.$data['category']->image) --}} @section('image:width', "300") @section('image:height', "200") @endif @push('schema') @component('frontend.layouts.schema') @if($data['listing_type'] == 'products_search') {{-- { "@context": "https://schema.org", "@type": "CollectionPage", "name": "{{ $data['category']->name }}", "url": "https://www.germedusa.com/{{ $data['category']->slug }}", "description": "Description of Main Category", "keywords": "{{ $data['category']->meta_keywords }}", "mainEntity": { "@type": "BreadcrumbList", "itemListElement": [ @foreach ( $data['category_products'] as $key => $data['category_product']) { "@type": "Product", "@id": "https://www.germedusa.com/{{ $data['category_product']->slug }}/#Product", "name": "{{ $data['category_product']->name }}", "url": "https://www.germedusa.com/{{ $data['category_product']->slug }}", "keywords": "{{ $data['category_product']->meta_keywords }}", "image": "https://www.germedusa.com/up_data/products/images/large/{{ $data['category_product']->image }}", "description": "{{ $data['category_product']->short_description }}", "brand": { "@type": "Brand", "name": "GerMedUSA" }, "offers": { "@type": "AggregateOffer", "priceCurrency": "USD", @if($data['category_product']->type == 'variation') "highPrice": "{{ $data['category_product']->max }}", "lowPrice": "{{ $data['category_product']->min }}", @else highPrice": "{{ $data['category_product']->price_catalog }}", "lowPrice": "{{ $data['category_product']->price_discounted }}", @endif "sku": "{{ $data['category_product']->sku }}", "availability": "http://schema.org/InStock", "seller": { "@type": "Organization", "name": "Germed USA" } } } @if($key < count($data['category_products'])-1) , @endif @endforeach ] } } --}} {{-- { "@context": "https://schema.org/", "@type": "WebSite", "name": "GerMedUSA lnc.", "url": "https://www.germedusa.com/", "potentialAction": { "@type": "SearchAction", "target": "https://www.germedusa.com/search-results?s={{ request()->input('s') }}", "query-input": "required name={{ request()->input('s') }}" } } --}} @else { "@context": "https://schema.org/", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.germedusa.com/" }, @if(count($data['category']->subcategories) > 0),@endif @php $counter = 2; @endphp @foreach ($data['schema_breadcrumbs'] as $key => $schema_breadcrumbs) { "@type": "ListItem", "position": {{ $counter }}, "name": "{{ @$schema_breadcrumbs[0]['name'] }}", "item": "{{ @$schema_breadcrumbs[0]['url'] }}" } @if($key < count($data['schema_breadcrumbs']) -1) , @endif @php $counter++; @endphp @endforeach ] } @endif @endcomponent @endpush @if(isset($data['category']) && $data['category']->is_canonical == 'Y') @php if($data['category']->canonical_url != '') $url = $data['category']->canonical_url; else $url = URL::to( '/' . $data['category']->slug); @endphp @push('head-area') @endpush @endif @push('head-area') @endpush @section('content')
@include('includes.partials.bread-crumbs')

@if($data['listing_type'] == 'products_search') Search Results for "{{ request()->input('s') }}" @elseif(isset($data['category'])) {{-- {{ $data['category']->name }} --}} @endif

Showing {{ $data['products']->firstItem() }} to {{ $data['products']->lastItem() }} of total {{ $data['products']->total() }} results

{!! Form::open(array('route' => 'frontend.set-listing-limit', 'method' => 'POST', 'class' => 'mb-0')) !!} {!! Form::select('listing_limit', ['15' => '15', '30' => '30', '45' => '45', '60' => '60', '999' => 'All'] ,$data['listing_limit'] ,['class'=>'listing-limit', 'onchange' => 'this.form.submit();']) !!} {!! Form::close() !!}
@if(isset($data['category']))
{!! $data['category']->short_description ? $data['category']->short_description : $data['category']->description !!}
@endif {!! $video_tag !!}
@if($banner)
{!! $banner !!}
@endif @if(isset($data['products'])) @foreach($data['products'] as $product) {!! \App\Models\Product::productBlock($product, 'product-list', true, $show_prices) !!} @endforeach @else

Sorry!, no products found.

@endif
@if($data['products']) @endif @if(isset($data['category']) && $data['category']->short_description !== null) @if (strlen($data['category']->description) > 1200)
{!! implode(' ', array_slice(explode(' ', $data['category']->description), 0, 170)) !!}
@else
{!! $data['category']->description !!}
@endif @endif
@push('before-scripts') @endpush @push('after-scripts') @endpush @endsection