templates/block/razmetka.html.twig line 1

Open in your IDE?
  1. {# Organisation #}
  2. {% if env.site == env.mix and app.request.locale == 'pl' %}
  3. <script type="application/ld+json">
  4. {
  5.   "@context": "https://schema.org",
  6.   "@graph": [
  7.     {
  8.       "@type": "Organization",
  9.       "@id": "https://mixform.pl/#org",
  10.       "name": "Mixform",
  11.       "legalName": "Mixform",
  12.       "url": "https://mixform.pl/",
  13.       "logo": {
  14.         "@type": "ImageObject",
  15.         "@id": "https://mixform.pl/#logo",
  16.         "contentUrl": "https://mixform.pl/pic/images/mixform-logo.png",
  17.         "url": "https://mixform.pl/",
  18.         "width": 1024,
  19.         "height": 1024,
  20.         "caption": "Logo Mixform",
  21.         "encodingFormat": "image/png"
  22.       },
  23.       "sameAs": [
  24.         "https://www.instagram.com/mixform.pl/",
  25.         "https://www.facebook.com/pl.mixform"
  26.       ],
  27.       "email": "office@mixform.pl",
  28.       "telephone": "+48668522718",
  29.       "address": {
  30.         "@type": "PostalAddress",
  31.         "streetAddress": "ul. Czajcza 2",
  32.         "addressLocality": "Wrocław",
  33.         "postalCode": "51-422",
  34.         "addressRegion": "Dolnośląskie",
  35.         "addressCountry": "PL"
  36.       },
  37.       "areaServed": "PL",
  38.       "contactPoint": [
  39.         {
  40.           "@type": "ContactPoint",
  41.           "contactType": "customer support",
  42.           "email": "office@mixform.pl",
  43.           "telephone": "+48668522718",
  44.           "availableLanguage": ["pl","uk"],
  45.           "areaServed": "PL",
  46.           "hoursAvailable": [{
  47.             "@type": "OpeningHoursSpecification",
  48.             "dayOfWeek": [
  49.               "https://schema.org/Monday",
  50.               "https://schema.org/Tuesday",
  51.               "https://schema.org/Wednesday",
  52.               "https://schema.org/Thursday",
  53.               "https://schema.org/Friday"
  54.             ],
  55.             "opens": "09:00",
  56.             "closes": "16:00"
  57.           }]
  58.         },
  59.         {
  60.           "@type": "ContactPoint",
  61.           "contactType": "sales",
  62.           "email": "office@mixform.pl",
  63.           "telephone": "+48668522718",
  64.           "availableLanguage": ["pl","uk"],
  65.           "areaServed": "PL",
  66.           "hoursAvailable": [{
  67.             "@type": "OpeningHoursSpecification",
  68.             "dayOfWeek": [
  69.               "https://schema.org/Monday",
  70.               "https://schema.org/Tuesday",
  71.               "https://schema.org/Wednesday",
  72.               "https://schema.org/Thursday",
  73.               "https://schema.org/Friday"
  74.             ],
  75.             "opens": "09:00",
  76.             "closes": "16:00"
  77.           }]
  78.         }
  79.       ],
  80.       "hasMerchantReturnPolicy": {
  81.         "@type": "MerchantReturnPolicy",
  82.         "name": "Polityka zwrotów Mixform",
  83.         "url": "https://mixform.pl/info",
  84.         "applicableCountry": "PL",
  85.         "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
  86.         "merchantReturnDays": 14,
  87.         "returnMethod": "https://schema.org/ReturnByMail",
  88.         "returnFees": "https://schema.org/FreeReturn",
  89.         "refundType": "https://schema.org/FullRefund"
  90.       }
  91.     },
  92.     {
  93.       "@type": "WebSite",
  94.       "@id": "https://mixform.pl/#website",
  95.       "url": "https://mixform.pl/",
  96.       "name": "Mixform",
  97.       "publisher": { "@id": "https://mixform.pl/#org" },
  98.       "inLanguage": ["pl","uk"],
  99.       "potentialAction": [
  100.         {
  101.           "@type": "SearchAction",
  102.           "target": "https://mixform.pl/catalog/search?q={search_term_string}",
  103.           "query-input": "required name=search_term_string"
  104.         },
  105.         {
  106.           "@type": "SearchAction",
  107.           "target": "https://mixform.pl/uk/catalog/search?q={search_term_string}",
  108.           "query-input": "required name=search_term_string"
  109.         }
  110.       ]
  111.     }
  112.   ]
  113. }
  114. </script>
  115. {% endif %}
  116. {% if env.site == env.mix and app.request.locale == 'uk' %}
  117. <script type="application/ld+json">
  118. {
  119.   "@context": "https://schema.org",
  120.   "@graph": [
  121.     {
  122.       "@type": "Organization",
  123.       "@id": "https://mixform.pl/#org",
  124.       "name": "Mixform",
  125.       "legalName": "Mixform",
  126.       "url": "https://mixform.pl/",
  127.       "logo": {
  128.         "@type": "ImageObject",
  129.         "@id": "https://mixform.pl/#logo",
  130.         "contentUrl": "https://mixform.pl/pic/images/mixform-logo.png",
  131.         "url": "https://mixform.pl/",
  132.         "width": 1024,
  133.         "height": 1024,
  134.         "caption": "Логотип Mixform",
  135.         "encodingFormat": "image/png"
  136.       },
  137.       "sameAs": [
  138.         "https://www.instagram.com/mixform.pl/",
  139.         "https://www.facebook.com/pl.mixform"
  140.       ],
  141.       "email": "office@mixform.pl",
  142.       "telephone": "+48668522718",
  143.       "address": {
  144.         "@type": "PostalAddress",
  145.         "streetAddress": "вул. Чайча 2",
  146.         "addressLocality": "Вроцлав",
  147.         "postalCode": "51-422",
  148.         "addressRegion": "Нижньосілезьке воєводство",
  149.         "addressCountry": "PL"
  150.       },
  151.       "areaServed": "PL",
  152.       "contactPoint": [
  153.         {
  154.           "@type": "ContactPoint",
  155.           "contactType": "customer support",
  156.           "email": "office@mixform.pl",
  157.           "telephone": "+48668522718",
  158.           "availableLanguage": ["pl","uk"],
  159.           "areaServed": "PL",
  160.           "hoursAvailable": [{
  161.             "@type": "OpeningHoursSpecification",
  162.             "dayOfWeek": [
  163.               "https://schema.org/Monday",
  164.               "https://schema.org/Tuesday",
  165.               "https://schema.org/Wednesday",
  166.               "https://schema.org/Thursday",
  167.               "https://schema.org/Friday"
  168.             ],
  169.             "opens": "09:00",
  170.             "closes": "16:00"
  171.           }]
  172.         },
  173.         {
  174.           "@type": "ContactPoint",
  175.           "contactType": "sales",
  176.           "email": "office@mixform.pl",
  177.           "telephone": "+48668522718",
  178.           "availableLanguage": ["pl","uk"],
  179.           "areaServed": "PL",
  180.           "hoursAvailable": [{
  181.             "@type": "OpeningHoursSpecification",
  182.             "dayOfWeek": [
  183.               "https://schema.org/Monday",
  184.               "https://schema.org/Tuesday",
  185.               "https://schema.org/Wednesday",
  186.               "https://schema.org/Thursday",
  187.               "https://schema.org/Friday"
  188.             ],
  189.             "opens": "09:00",
  190.             "closes": "16:00"
  191.           }]
  192.         }
  193.       ],
  194.       "hasMerchantReturnPolicy": {
  195.         "@type": "MerchantReturnPolicy",
  196.         "name": "Політика повернення Mixform",
  197.         "url": "https://mixform.pl/uk/info",
  198.         "applicableCountry": "PL",
  199.         "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
  200.         "merchantReturnDays": 14,
  201.         "returnMethod": "https://schema.org/ReturnByMail",
  202.         "returnFees": "https://schema.org/FreeReturn",
  203.         "refundType": "https://schema.org/FullRefund"
  204.       }
  205.     },
  206.     {
  207.       "@type": "WebSite",
  208.       "@id": "https://mixform.pl/#website",
  209.       "url": "https://mixform.pl/",
  210.       "name": "Mixform",
  211.       "publisher": { "@id": "https://mixform.pl/#org" },
  212.       "inLanguage": ["pl","uk"],
  213.       "potentialAction": [
  214.         {
  215.           "@type": "SearchAction",
  216.           "target": "https://mixform.pl/catalog/search?q={search_term_string}",
  217.           "query-input": "required name=search_term_string"
  218.         },
  219.         {
  220.           "@type": "SearchAction",
  221.           "target": "https://mixform.pl/uk/catalog/search?q={search_term_string}",
  222.           "query-input": "required name=search_term_string"
  223.         }
  224.       ]
  225.     }
  226.   ]
  227. }
  228. </script>
  229. {% endif %}
  230. {% if env.site == env.mix and app.request.locale == 'uk' %}
  231. <script type="application/ld+json">
  232. {
  233.   "@context": "https://schema.org",
  234.   "@graph": [
  235.     {
  236.       "@type": "Organization",
  237.       "@id": "https://mixform.pl/#org",
  238.       "name": "Mixform",
  239.       "legalName": "Mixform",
  240.       "url": "https://mixform.pl/",
  241.       "logo": {
  242.         "@type": "ImageObject",
  243.         "@id": "https://mixform.pl/#logo",
  244.         "contentUrl": "https://mixform.pl/pic/images/mixform-logo.png",
  245.         "url": "https://mixform.pl/",
  246.         "width": 1024,
  247.         "height": 1024,
  248.         "caption": "Логотип Mixform",
  249.         "encodingFormat": "image/png"
  250.       },
  251.       "sameAs": [
  252.         "https://www.instagram.com/mixform.pl/",
  253.         "https://www.facebook.com/pl.mixform"
  254.       ],
  255.       "email": "office@mixform.pl",
  256.       "telephone": "+48668522718",
  257.       "address": {
  258.         "@type": "PostalAddress",
  259.         "streetAddress": "вул. Чайча 2",
  260.         "addressLocality": "Вроцлав",
  261.         "postalCode": "51-422",
  262.         "addressRegion": "Нижньосілезьке воєводство",
  263.         "addressCountry": "PL"
  264.       },
  265.       "areaServed": "PL",
  266.       "contactPoint": [
  267.         {
  268.           "@type": "ContactPoint",
  269.           "contactType": "customer support",
  270.           "email": "office@mixform.pl",
  271.           "telephone": "+48668522718",
  272.           "availableLanguage": ["pl","uk"],
  273.           "areaServed": "PL",
  274.           "hoursAvailable": [{
  275.             "@type": "OpeningHoursSpecification",
  276.             "dayOfWeek": [
  277.               "https://schema.org/Monday",
  278.               "https://schema.org/Tuesday",
  279.               "https://schema.org/Wednesday",
  280.               "https://schema.org/Thursday",
  281.               "https://schema.org/Friday"
  282.             ],
  283.             "opens": "09:00",
  284.             "closes": "16:00"
  285.           }]
  286.         },
  287.         {
  288.           "@type": "ContactPoint",
  289.           "contactType": "sales",
  290.           "email": "office@mixform.pl",
  291.           "telephone": "+48668522718",
  292.           "availableLanguage": ["pl","uk"],
  293.           "areaServed": "PL",
  294.           "hoursAvailable": [{
  295.             "@type": "OpeningHoursSpecification",
  296.             "dayOfWeek": [
  297.               "https://schema.org/Monday",
  298.               "https://schema.org/Tuesday",
  299.               "https://schema.org/Wednesday",
  300.               "https://schema.org/Thursday",
  301.               "https://schema.org/Friday"
  302.             ],
  303.             "opens": "09:00",
  304.             "closes": "16:00"
  305.           }]
  306.         }
  307.       ],
  308.       "hasMerchantReturnPolicy": {
  309.         "@type": "MerchantReturnPolicy",
  310.         "name": "Політика повернення Mixform",
  311.         "url": "https://mixform.pl/uk/info",
  312.         "applicableCountry": "PL",
  313.         "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
  314.         "merchantReturnDays": 14,
  315.         "returnMethod": "https://schema.org/ReturnByMail",
  316.         "returnFees": "https://schema.org/FreeReturn",
  317.         "refundType": "https://schema.org/FullRefund"
  318.       }
  319.     },
  320.     {
  321.       "@type": "WebSite",
  322.       "@id": "https://mixform.pl/#website",
  323.       "url": "https://mixform.pl/",
  324.       "name": "Mixform",
  325.       "publisher": { "@id": "https://mixform.pl/#org" },
  326.       "inLanguage": ["pl","uk"],
  327.       "potentialAction": [
  328.         {
  329.           "@type": "SearchAction",
  330.           "target": "https://mixform.pl/catalog/search?q={search_term_string}",
  331.           "query-input": "required name=search_term_string"
  332.         },
  333.         {
  334.           "@type": "SearchAction",
  335.           "target": "https://mixform.pl/uk/catalog/search?q={search_term_string}",
  336.           "query-input": "required name=search_term_string"
  337.         }
  338.       ]
  339.     }
  340.   ]
  341. }
  342. </script>
  343. {% endif %}
  344. {# BreadcrumbList #}
  345. {% if args[0] != '/' and args[0] != '' and bc|length %}
  346. <script type="application/ld+json">
  347.   {
  348.     "@context": "https://schema.org",
  349.     "@type": "BreadcrumbList",
  350.     "itemListElement": [
  351.       {% set i = 0 %}
  352.       {% set ll = '' %}
  353.       {% for l, t in bc %}
  354.       {% if i == 0 %}
  355.         {% set ll = l %}
  356.       {% endif %}
  357.       {
  358.         "@type": "ListItem",
  359.         "position": {% set i = i + 1 %}{{ i }},
  360.         "name": "{{ t|replace({'"': ''})|striptags }}",
  361.         "item": "{{ env.host_static ~ l }}"
  362.         
  363.       }{% if not loop.last %},{% endif %}      
  364.       {% endfor %}
  365.       {% if prod %}
  366.       ,{
  367.         "@type": "ListItem",
  368.         "position": {% set i = i + 1 %}{{ i }},
  369.         "name": "{{ prod.name|replace({'"': ''})|striptags }}"
  370.         {% if not loop.last %},
  371.         "item": "{{ env.host_static ~ ll ~ 'catalog/prod-' ~ prod.id }}"
  372.         {% endif %}
  373.         
  374.       }
  375.       {% endif %}
  376.     ]
  377.   }
  378. </script>
  379. {% endif %}
  380. {# ProdList #}
  381. {% if args[0] == 'catalog' and cat and prod is empty %}
  382.   {% if (paginator.cnt - paginator.start) < paginator.results %}
  383.     {% set numberOfItems = paginator.cnt - paginator.start %}
  384.   {% elseif paginator.results < paginator.cnt %}
  385.     {% set numberOfItems = paginator.results %}  
  386.   {% else %}
  387.     {% set numberOfItems = paginator.cnt - paginator.start %}
  388.   {% endif %}
  389. <script type="application/ld+json">
  390. {
  391.   "@context":"https://schema.org",
  392.   "@type":"CollectionPage",
  393.   "name":"{{ cat.name }}",
  394.   {% if paginator.start %}
  395.   "url":"https://{{ app.request.host }}{{ url_mk('/catalog/cat-' ~ cat.id ~ '-' ~ cat.intname) }}?start={{ paginator.start }}",
  396.   {% else %}
  397.   "url":"https://{{ app.request.host }}{{ url_mk('/catalog/cat-' ~ cat.id ~ '-' ~ cat.intname) }}",
  398.   {% endif %}
  399.   
  400.   "mainEntity":{
  401.     "@type":"ItemList",
  402.     "numberOfItems":{{ numberOfItems }},
  403.     "itemListElement":[
  404.     {% set i = 0 %}
  405.     {% for item in prods %}
  406.       {
  407.         "@type": "ListItem",
  408.         "position": {% set i = i + 1 %}{{ i + paginator.start }},
  409.         "name": "{{ item.name }}",
  410.         "url": "https://{{ app.request.host }}{{ url_mk('/catalog/prod-' ~ item.id) }}"        
  411.       }
  412.       {% if not loop.last %},{% endif %}
  413.     {% endfor %}      
  414.     ]
  415.   }
  416. }
  417. </script>
  418. {% endif %}
  419. {# ProdCont #}
  420. {% if args[0] == 'catalog' and prod %}
  421. {% set bc_cat = '' %}
  422. {% for l, t in bc %}
  423.   {% if not loop.first %}
  424.     {% set bc_cat = bc_cat ~ t %}
  425.     {% endif %}      
  426.   {% if not loop.last and not loop.first %}
  427.     {% set bc_cat = bc_cat ~ ' > ' %}
  428.   {% endif %}
  429. {% endfor %}
  430. <script type="application/ld+json">
  431. {
  432.     "@context": "https://schema.org",    
  433.     "@type": "Product",
  434.     "name": "{{ prod.name }}",
  435.     "description": "{{ prod.cont }}",
  436.     "sku": "{{ prod.art }}",
  437.     "image": [
  438.       { "@type": "ImageObject", "contentUrl": "{{ env.host_static ~ '/pic/prod-l/' ~ prod.id ~ '.jpg' }}", "width": 1200, "height": 1200 }
  439. {% for photo in photos %}
  440.       ,{ "@type": "ImageObject", "contentUrl": "{{ env.host_static ~ '/pic/photo/' ~ photo.id ~ '.jpg' }}", "width": 700, "height": 700 }
  441. {% endfor %}
  442.     ],
  443.     "category": "{{ bc_cat|raw }}",
  444.     "offers": {
  445.       "@type": "Offer",
  446.       "url": "https://{{ app.request.getHost() }}{% if app.request.locale != default_lang %}/{{ app.request.locale }}{% endif %}/catalog/prod-{{ prod.id }}",
  447.       "priceCurrency": "{{ sett.get('valuta_code')|raw }}",
  448.       "price": "{{ (prod.price * (100 - prod.skidka) / 100)|fmtmoney2 }}",
  449.       "availability": "https://schema.org/{% if prod.num > 0 or prod.num2 > 0 or prod.num3 > 0 %}InStock{% else %}OutOfStock{% endif %}",
  450.       "itemCondition": "https://schema.org/NewCondition",
  451.       "seller": { "@type": "Organization", "@id": "https://{{ app.request.host }}/#org" }
  452.     }    
  453.   }
  454. </script>
  455.   
  456.   {# "material": "Аметист",
  457.   "color": "Фіолетовий",
  458.   "size": "6~7×5~6 мм",
  459.   "countryOfOrigin": { "@type": "Country", "name": "Бразилія" },
  460.   "additionalProperty": [
  461.     { "@type": "PropertyValue", "name": "номер кольору", "value": "02 Amethyst" },
  462.     { "@type": "PropertyValue", "name": "Форма отвору", "value": "Наскрізний" },
  463.     { "@type": "PropertyValue", "name": "Застосування", "value": "Намистини" },
  464.     { "@type": "PropertyValue", "name": "Огранювання", "value": "Гранені" },
  465.     { "@type": "PropertyValue", "name": "Форма", "value": "Круглі" },
  466.     { "@type": "PropertyValue", "name": "Забарвлення", "value": "Незабарвлені" }
  467.   ],
  468.   "image": [
  469.     { "@type": "ImageObject", "contentUrl": "https://mixform.pl/pic/prod-l/81956.jpg", "width": 1200, "height": 1200 },
  470.     { "@type": "ImageObject", "contentUrl": "https://mixform.pl/pic/photo/198510.jpg", "width": 700, "height": 700 },
  471.     { "@type": "ImageObject", "contentUrl": "https://mixform.pl/pic/photo/198511.jpg", "width": 700, "height": 700 },
  472.     { "@type": "ImageObject", "contentUrl": "https://mixform.pl/pic/photo/198509.jpg", "width": 700, "height": 700 }
  473.   ],
  474.   "offers": {
  475.     "@type": "Offer",
  476.     "url": "https://mixform.pl/uk/catalog/prod-81956",
  477.     "priceCurrency": "PLN",
  478.     "price": "67.35",
  479.     "availability": "https://schema.org/InStock",
  480.     "itemCondition": "https://schema.org/NewCondition",
  481.     "seller": { "@type": "Organization", "@id": "https://mixform.pl/#org" },
  482.    "inventoryLevel": { "@type": "QuantitativeValue", "value": 12 }
  483.   } #}
  484. {% endif %}