@extends('frontend.layouts.mobile') @php $title = trim($data['product']->meta_title); if($title == null || $title == 'NULL') $title = $data['product']->name . ' - ' . app_name(); if($data['product']->do_index == 'N' || $data['product']->status == 'N') $no_index = 'NOINDEX'; $stock_info = \App\Models\Product::printStockInformationMobile($data['product']); $data['product']->variation_select = 1; $videos = []; if($data['product']->video_id > 0) { $videos[$data['product']->video_id] = $data['product']->video; } if($data['product']->video_id2 > 0) { $videos[$data['product']->video_id2] = $data['product']->video2; } if($data['product']->video_id3 > 0) { $videos[$data['product']->video_id3] = $data['product']->video3; } $set_items = []; $set_products = \App\Models\Product::printSetProducts($data['product'], 'mobile'); if(trim($set_products) != null) $set_items[$data['product']->id] = $set_products; @endphp @section('title', $title) @if(trim($data['product']->meta_description) != null && $data['product']->meta_description != 'NULL') @section('meta_description', $data['product']->meta_description) @section('meta_keywords', $data['product']->meta_keywords) @endif @php $invalid_price = $data['product']->price_discounted == null || $data['product']->price_discounted == ''; @endphp {{-- schema --}} @push('schema') @component('frontend.layouts.schema') { "@context": "https://schema.org/", "@type": "Product", "name": "{{ $data['product']->name }}", "image": "https://www.germedusa.com/up_data/products/images/large/{{ $data['product']->image }}", "description": "{{ $data['product']->short_description }} {!! strip_tags($data['product']->full_description) !!}", {{-- "keywords": "{{ $data['product']->meta_keywords }}", --}} "brand": { "@type": "Brand", "name": "GerMedUSA" }, "sku": "{{ $data['product']->sku }}", "offers": { @if($invalid_price && $data['product']->type != 'variation') "@type": "Offer", @else "@type": "AggregateOffer", @endif "url": "https://www.germedusa.com/{{ $data['product']->slug }}", "priceCurrency": "USD", @if($data['product']->type == 'variation') @php $subProductsCount = $data['product']->childProducts()->orderBy('position','asc')->orderBy('name','asc')->count(); @endphp "lowPrice": "{{ $data['product']->min }}", "highPrice": "{{ $data['product']->max }}", "offerCount": "{{ $subProductsCount }}" @else @if(!$invalid_price) "lowPrice": "{{ $data['product']->price_discounted }}", "highPrice": "{{ $data['product']->price_catalog }}" @else "price": "{{ $data['product']->price_catalog }}" @endif @endif , "availability": "https://schema.org/InStock", "itemCondition": "https://schema.org/NewCondition" } {{-- , "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.5", "bestRating": "5" } --}} } @endcomponent @endpush @if($data['product']->is_canonical == 'Y') @php if($data['product']->canonical_url != '') $url = $data['product']->canonical_url; else $url = URL::to( '/' . $data['product']->slug); @endphp @else @php $url = URL::current(); @endphp @endif @push('head-area') @if(isset($no_index)) @endif @endpush @section('content')
{{--
--}}
You May Also Like
@if(isset($data['you_may_also_like_products'])) @foreach($data['you_may_also_like_products'] as $same_product) @php $url = $same_product->slug; $name = $same_product->name; if(strlen($name) > 14) $name = substr($name, 0, 14).'..'; @endphp @push('head-area') @endpush @endforeach @endif
@push('after-scripts') @if($data['product']->type == 'variation') @endif @endpush @push('before-scripts') @endpush @endsection