]> _ Git - pmi.git/commitdiff
Done #2952 @0.75
authorStephen Cameron <stephen@cubedesigners.com>
Thu, 19 Sep 2019 09:43:05 +0000 (11:43 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Thu, 19 Sep 2019 09:43:05 +0000 (11:43 +0200)
resources/views/pages/aboutus.blade.php
resources/views/pages/product-detail.blade.php
resources/views/partials/contact-details.blade.php
resources/views/partials/product-link.blade.php
resources/views/partials/product-schema.blade.php [new file with mode: 0644]

index 3d2bcce3fb3b6b66c62d77875154a3066166682b..e0d20cb4e00a0546f7c95381f3dc2d7498befe8f 100644 (file)
@@ -72,7 +72,7 @@
                               "@type": "Person",
                               "name": "{{ $staff['name'] }}",
                               "jobTitle": "{{ $staff['role'] }}",
-                              "image": "{{ url('/') . $page->getImageURLByCollection($staff['photo']) }}",
+                              "image": "{{ url('/') . $page->getImageURLByCollection($staff['photo']) }}"
                             }
                         </script>
                     @endforeach
index 249e219d805773121a05361f7d4d59713a2d6dd4..fff60f027fb926a5cce2dd762421d412f212f9af 100644 (file)
@@ -10,6 +10,8 @@
 
 @section('content')
 
+    @include('partials.product-schema')
+
     <content class="pt-1v">
         <text-block title-tag="h1" :title="$product->name">
             <slot name="preTitle">
index 9972b332200ee228112097acf71f15e16bfcaf36..e9e0bed1c9e89d452ba7f499d08a753ddd891972 100644 (file)
@@ -30,6 +30,6 @@
       "@type": "Organization",
       "url": "{{ url('/') }}",
       "address": "{{ preg_replace("/\r|\n/", " ", $global->address) }}",
-      "telephone": "{{ $global->phone }}",
+      "telephone": "{{ $global->phone }}"
     }
 </script>
index cc90d0c3f8837b6219d3d1b7837b8c2c2229dad2..060dd5dba7c50c6e80213b75e92efcf5a8cf13b8 100644 (file)
@@ -12,7 +12,7 @@
         <h3><a class="text-navy" href="{{ $product->getEntity()->URL }}">{{ $product->get('reference') }}</a>
         </h3>
         <div class="product-highlights text-sm">
-            {{$product->get('name')}}
+            {{ $product->get('name') }}
         </div>
         <p class="mt-4">
             <a href="{{ $product->getEntity()->URL }}">
@@ -20,4 +20,7 @@
             </a>
         </p>
     </div>
+
+    @include('partials.product-schema')
+
 </div>
diff --git a/resources/views/partials/product-schema.blade.php b/resources/views/partials/product-schema.blade.php
new file mode 100644 (file)
index 0000000..28abd62
--- /dev/null
@@ -0,0 +1,16 @@
+<script type="application/ld+json">
+    {
+      "@context": "https://schema.org",
+      "@type": "Product",
+      "name": "{{ $product->get('name') }}",
+      "sku": "{{ $product->get('reference') }}",
+      "manufacturer": {
+        "@type": "Organization",
+        "name": "{{ $product->get('supplier') }}"
+      },
+      "mpn": "{{ $product->get('supplier_reference') }}",
+      "description": "{{ preg_replace("/\r|\n/", " ", $product->get('descriptions')) }}",
+      "image": "{{ url($product->getEntity()->image) }}",
+      "url": "{{ $product->getEntity()->URL }}"
+    }
+</script>