@php $SEOurl = url()->current(); $SEOtitle = $title ?? get_platform_title(); $SEOdescription = config('seo.meta.description'); $SEOimage = filter_var(config('seo.meta.image'), FILTER_VALIDATE_URL) ? config('seo.meta.image') : get_logo_url('system', 'logo'); $SEOkeywords = config('seo.meta.keywords'); $character_limit = config('seo.meta.description_character_limit'); // For Products if (isset($item)) { $SEOtitle = $item->meta_title ?? $item->title; $SEOdescription = $item->meta_description ?? substr(strip_tags($item->description), 0, $character_limit); $SEOimage = get_product_img_src($item, 'full'); $SEOkeywords = implode(', ', $item->tags->pluck('name')->toArray()); } // For Categories elseif (Request::is('categories/*') || Request::is('categorygrp/*') || Request::is('category/*')) { $category = $category ?? ($categorySubGroup ?? $categoryGroup); $SEOtitle = $category->meta_title ?? $SEOtitle; $SEOdescription = $category->meta_description ?? $SEOdescription; } // For Shops elseif (Request::is('shop/*')) { $SEOtitle = $shop->getName() ?? $SEOtitle; $SEOdescription = $shop->description ? substr(strip_tags($shop->description), 0, $character_limit) : $SEOdescription; } // For Brands elseif (Request::is('brand/*')) { $SEOtitle = $brand->getName() ?? $SEOtitle; $SEOdescription = $brand->description ? substr(strip_tags($brand->description), 0, $character_limit) : $SEOdescription; } // For blogs elseif (isset($blog)) { $SEOtitle = $blog->title; $SEOdescription = substr(strip_tags($blog->excerpt), 0, $character_limit); $SEOimage = get_storage_file_url(optional($blog->image)->path, 'blog'); $SEOkeywords = implode(', ', $blog->tags->pluck('name')->toArray()); } // For events elseif (isset($event)) { $SEOtitle = $event->title; $SEOdescription = substr(strip_tags($event->excerpt), 0, $character_limit); $SEOimage = get_storage_file_url(optional($event->image)->path, 'blog'); } // For pages elseif (isset($page)) { $SEOtitle = $page->title; $SEOdescription = substr(strip_tags($page->content), 0, $character_limit); $SEOimage = get_storage_file_url(optional($page->image)->path, 'page'); // $SEOkeywords = implode(', ', $page->tags->pluck('name')->toArray()); } $SEOtitle = strip_tags($SEOtitle); $SEOdescription = strip_tags($SEOdescription); @endphp @if (is_incevio_package_loaded('googleAnalytics')) @include('analytics::scripts.google_tag_manager') @endif @include('scripts.facebook_pixel') @include('scripts.twitter_pixel') @include('scripts.tiktok_pixel') @include('scripts.pinterest_pixel') @include('scripts.linkedin_pixel') @if (config('seo.enabled')) @if (config('seo.meta.geo_region') !== '') @endif @if (config('seo.meta.geo_position') !== '') @endif @if (isset($item)) @php $item_images = $item->images->count() ? $item->images : $item->product->images; if (isset($variants)) { // Remove images of current items from the variants imgs $other_images = $variants ->pluck('images') ->flatten(1) ->filter(function ($value, $key) use ($item) { return $value->imageable_id != $item->id; }); $item_images = $item_images->concat($other_images); } @endphp @foreach ($item_images as $img) @continue(!$img->path) @endforeach @else @endif @if (config('seo.meta.video') !== '') @endif @if (config('seo.meta.fb_app_id') !== '') @endif @if (isset($item)) @elseif(config('seo.meta.twitter_card') !== '') @endif @if (config('seo.meta.twitter_site') !== '') @endif @if (isset($item)) @endif @endif