custom/plugins/cutvertSeo/src/Resources/views/storefront/component/product/listing.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/listing.html.twig' %}
  2. {% block product_listing %}
  3.     <script type="application/ld+json">
  4.         {
  5.             "@context": "https://schema.org",
  6.             "@type": "FAQPage",
  7.             "mainEntity": [
  8.                 {% set count = cutvertFaqs|length %}
  9.                 {% set num = 1 %}
  10.                 {% for cutvertFaq in cutvertFaqs %}
  11.                 {
  12.                     "@type": "Question",
  13.                     "name": "{{ cutvertFaq.question }}",
  14.                     "acceptedAnswer": {
  15.                         "@type": "Answer",
  16.                         "text": "{{ cutvertFaq.answer }}"
  17.                     }
  18.                 }{% if num < count %},{% endif %}
  19.                 {% set num = num + 1 %}
  20.                 {% endfor %}
  21.             ]
  22.         }
  23.     </script>
  24.     <script type="application/ld+json">
  25.         {
  26.             "@context": "https://schema.org/",
  27.             "@type": "Product",
  28.         "image": [
  29.         "{{ cutvertImages[0] }}",
  30.         "{{ cutvertImages[1] }}",
  31.         "{{ cutvertImages[2] }}"
  32.         ],
  33.         "name": "{{ config('core.basicInformation.shopName') }}",
  34.         {% if cutvertProductRepo['ratingCount'] > 0 %}
  35.         "aggregateRating": {
  36.         "@type": "AggregateRating",
  37.         "ratingValue": "{{ cutvertProductRepo['absoluteRating'] }}",
  38.         "ratingCount": "{{ cutvertProductRepo['ratingCount'] }}"
  39.         },
  40.         {% endif %}
  41.         "sameAs" : [
  42.             "{{ cutvertSeoConfig['facebook'] }}",
  43.             "{{ cutvertSeoConfig['twitter'] }}",
  44.             "{{ cutvertSeoConfig['instagram'] }}",
  45.             "{{ cutvertSeoConfig['youtube'] }}"
  46.         ],
  47.         "offers": {
  48.         "@type": "AggregateOffer",
  49.         "lowPrice": "{{ cutvertProductRepo['minPrice'] }}",
  50.         "priceCurrency": "EUR"
  51.         }
  52.         }
  53.     </script>
  54.     <script type="application/ld+json">
  55.         {
  56.             "@context":"https://schema.org",
  57.             "@type":"ItemList",
  58.             "itemListElement":[
  59.                 {% set count = cutvertSeoUrls|length %}
  60.                 {% set num = 1 %}
  61.                 {% for url in cutvertSeoUrls %}
  62.                 {
  63.                     "@type":"ListItem",
  64.                     "position":"{{ num }}",
  65.                     "url":  "{{ url['url'] }}",
  66.                     "name":"{{ url['name'] }}"
  67.                 }{% if num < count %},{% endif %}
  68.                 {% set num = num + 1 %}
  69.                 {% endfor %}
  70.             ]
  71.         }
  72.     </script>
  73.     {{ parent() }}
  74.     <script type="application/ld+json">
  75.         {
  76.             "@context": "https://schema.org",
  77.             "@type": "LocalBusiness",
  78.             "image": ["{{ theme_config('sw-logo-tablet') |sw_encode_url }}"],
  79.             "name": "{{ config('core.basicInformation.shopName') }}",
  80.             "address": {
  81.                 "@type": "PostalAddress",
  82.                 "streetAddress": "{{ cutvertSeoConfig['street'] }}",
  83.                 "addressLocality": "{{ cutverSeotConfig['houseNumber'] }}",
  84.                 "addressRegion": "{{ cutvertSeoConfig['state'] }}",
  85.                 "postalCode": "{{ cutvertSeoConfig['postalCode'] }}",
  86.                 "addressCountry": "{{ cutvertSeoConfig['country'] }}"
  87.             },
  88.             "sameAs" : [
  89.                 "{{ cutvertSeoConfig['facebook'] }}",
  90.                 "{{ cutvertSeoConfig['twitter'] }}",
  91.                 "{{ cutvertSeoConfig['instagram'] }}",
  92.                 "{{ cutvertSeoConfig['youtube'] }}"
  93.             ],
  94.             "url": "{{ cutvertShopURL }}",
  95.             "telephone": "{{ cutvertSeoConfig['telnumber'] }}",
  96.             "openingHoursSpecification": [
  97.                 {
  98.                         "@type": "OpeningHoursSpecification",
  99.                         "dayOfWeek": "Monday",
  100.                         "opens": "{{ cutvertSeoConfig['mondayOpen'] }}",
  101.                         "closes": "{{ cutvertSeoConfig['mondayClose'] }}"
  102.                 },
  103.                 {
  104.                     "@type": "OpeningHoursSpecification",
  105.                     "dayOfWeek": "Tuesday",
  106.                     "opens": "{{ cutvertSeoConfig['tuesdayOpen'] }}",
  107.                     "closes": "{{ cutvertSeoConfig['tuesdayClose'] }}"
  108.                 },
  109.                 {
  110.                     "@type": "OpeningHoursSpecification",
  111.                     "dayOfWeek": "Wednesday",
  112.                     "opens": "{{ cutvertSeoConfig['wednesdayOpen'] }}",
  113.                     "closes": "{{ cutvertSeoConfig['wednesdayClose'] }}"
  114.                 },
  115.                 {
  116.                     "@type": "OpeningHoursSpecification",
  117.                     "dayOfWeek": "Thursday",
  118.                     "opens": "{{ cutvertSeoConfig['thursdayOpen'] }}",
  119.                     "closes": "{{ cutvertSeoConfig['thursdayClose'] }}"
  120.                 },
  121.                 {
  122.                     "@type": "OpeningHoursSpecification",
  123.                     "dayOfWeek": "Friday",
  124.                     "opens": "{{ cutvertSeoConfig['fridayOpen'] }}",
  125.                     "closes": "{{ cutvertSeoConfig['fridayClose'] }}"
  126.                 },
  127.                 {
  128.                     "@type": "OpeningHoursSpecification",
  129.                     "dayOfWeek": "Saturday",
  130.                     "opens": "{{ cutvertSeoConfig['saturdayOpen'] }}",
  131.                     "closes": "{{ cutvertSeoConfig['saturdayClose'] }}"
  132.                 },
  133.                 {
  134.                     "@type": "OpeningHoursSpecification",
  135.                     "dayOfWeek": "Sunday",
  136.                     "opens": "{{ cutvertSeoConfig['sundayOpen'] }}",
  137.                     "closes": "{{ cutvertSeoConfig['sundayClose'] }}"
  138.                 }
  139.             ],
  140.             "department": [
  141.                 {
  142.                     "@type": "Shop",
  143.                     "image": ["{{ theme_config('sw-logo-tablet') |sw_encode_url }}"],
  144.                     "name": "{{ config('core.basicInformation.shopName') }}",
  145.                     "telephone": "{{ cutvertSeoConfig['telnumber'] }}",
  146.                     "openingHoursSpecification": [
  147.                         {
  148.                             "@type": "OpeningHoursSpecification",
  149.                             "dayOfWeek": "Monday",
  150.                             "opens": "{{ cutvertSeoConfig['mondayOpen'] }}",
  151.                             "closes": "{{ cutvertSeoConfig['mondayClose'] }}"
  152.                         },
  153.                         {
  154.                             "@type": "OpeningHoursSpecification",
  155.                             "dayOfWeek": "Tuesday",
  156.                             "opens": "{{ cutvertSeoConfig['tuesdayOpen'] }}",
  157.                             "closes": "{{ cutvertSeoConfig['tuesdayClose'] }}"
  158.                         },
  159.                         {
  160.                             "@type": "OpeningHoursSpecification",
  161.                             "dayOfWeek": "Wednesday",
  162.                             "opens": "{{ cutvertSeoConfig['wednesdayOpen'] }}",
  163.                             "closes": "{{ cutvertSeoConfig['wednesdayClose'] }}"
  164.                         },
  165.                         {
  166.                             "@type": "OpeningHoursSpecification",
  167.                             "dayOfWeek": "Thursday",
  168.                             "opens": "{{ cutvertSeoConfig['thursdayOpen'] }}",
  169.                             "closes": "{{ cutvertSeoConfig['thursdayClose'] }}"
  170.                         },
  171.                         {
  172.                             "@type": "OpeningHoursSpecification",
  173.                             "dayOfWeek": "Friday",
  174.                             "opens": "{{ cutvertSeoConfig['fridayOpen'] }}",
  175.                             "closes": "{{ cutvertSeoConfig['fridayClose'] }}"
  176.                         },
  177.                         {
  178.                             "@type": "OpeningHoursSpecification",
  179.                             "dayOfWeek": "Saturday",
  180.                             "opens": "{{ cutvertSeoConfig['saturdayOpen'] }}",
  181.                             "closes": "{{ cutvertSeoConfig['saturdayClose'] }}"
  182.                         },
  183.                         {
  184.                             "@type": "OpeningHoursSpecification",
  185.                             "dayOfWeek": "Sunday",
  186.                             "opens": "{{ cutvertSeoConfig['sundayOpen'] }}",
  187.                             "closes": "{{ cutvertSeoConfig['sundayClose'] }}"
  188.                         }
  189.                     ]
  190.                 }
  191.             ]
  192.         }
  193.     </script>
  194. {% endblock %}