src/DcSiteBundle/Resources/views/Peugeot/Accessories/accessories-page.html.twig line 1

Open in your IDE?
  1. {% extends '@DcSite/Peugeot/template.html.twig' %}
  2. {% block canonical %}
  3.     <link rel="canonical" href="{{ url(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}"/>
  4. {% endblock canonical %}
  5. {% block head %}
  6.     {% include '@DcSite/Modules/acessories/module/block-seo.html.twig' %}
  7.     <meta name="google-site-verification" content="gboUNadhhEyBztnrR7iBIU5BZf_sUV0rIuRsXq2bcH8" />
  8.     <link rel="stylesheet" type="text/css" href="/dist/{{ MODE }}/dcsite/peugeot/css/peugeotAccessoriesPage.css?{{ VERSION }}">
  9. {% endblock %}
  10. {% block ogtagDynamic %}
  11.     {% include '@DcSite/Modules/acessories/module/og-tag-dnamic.htm.twig' %}
  12. {% endblock %}
  13. {% block ogtagDynamicImage %}
  14.     <meta property="og:image" content="{{ sonata_path(accessory.image , 'reference') }}"/>
  15. {% endblock %}
  16. {% block content %}
  17.     <section class="breadcrumb_page breadcrumbs__new">
  18.         {% set contentId = 1 %}
  19.         <div class="container">
  20.             <ol class="global_breadcrumbs__new" itemscope itemtype="https://schema.org/BreadcrumbList">
  21.                 <li class="marker__none" itemprop="itemListElement" itemscope
  22.                     itemtype="https://schema.org/ListItem">
  23.                     <a itemprop="item" href="{{ path('peugeot_homepage') }}">
  24.                         <span class="breadcrumbs__link" itemprop="name">Peugeot</span></a>
  25.                     <meta itemprop="position" content="{{ contentId }}"/>
  26.                 </li>
  27.                 {% for item in breadcrumbs %}
  28.                     {% set contentId = contentId + 1 %}
  29.                     <div class="arrow-bcs"> ❯</div>
  30.                     <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  31.                         itemtype="https://schema.org/ListItem">
  32.                         {% if item.parent is null %}
  33.                             <a itemprop="item" href="{{ path('shop_accessory_catalog') }}">
  34.                             <span class="breadcrumbs__link"
  35.                                   itemprop="name">{{ item.title(app.request.locale) }}</span>
  36.                             </a>
  37.                         {% else %}
  38.                             <a itemprop="item" href="{{ path('shop_accessory_category', {categoryUrl:item.url}) }}">
  39.                             <span class="breadcrumbs__link"
  40.                                   itemprop="name">{{ item.title(app.request.locale) }}</span></a>
  41.                         {% endif %}
  42.                         <meta itemprop="position" content="{{ contentId }}"/>
  43.                     </li>
  44.                 {% endfor %}
  45.                 {% set contentId = contentId + 1 %}
  46.                 <div class="arrow-bcs"> ❯</div>
  47.                 <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  48.                     itemtype="https://schema.org/ListItem">
  49.                     <span style="color: #ABABAB;" class="breadcrumbs__link" itemprop="name">{{ accessory.title }}</span>
  50.                     <meta itemprop="position" content="{{ contentId }}"/>
  51.                 </li>
  52.             </ol>
  53.         </div>
  54.     </section>
  55.     {% include '@DcSite/Modules/acessories/acessories-product.html.twig' with {'svgColor' : '#00a3e0'} %}
  56. {% endblock %}
  57. {% block script %}
  58.     <script type="application/ld+json">
  59.         {
  60.             "@context": "http://schema.org",
  61.             "@type": "Product",
  62.             "image": [
  63.                 "{{ sonata_path(accessory.image, 'reference') }}"
  64.             ],
  65.             "brand": {
  66.                 "@type": "Brand",
  67.                 "name": "{{ accessory.dealer.nameByLocale(app.request.locale) }}"
  68.             },
  69.             "manufacturer": {
  70.                 "@type": "Corporation",
  71.                 "name": "{{ accessory.dealer.nameByLocale(app.request.locale) }}"
  72.             },
  73.             "description": "{{ accessory.description|raw }}",
  74.             "sku": "{{ accessory.vendorCode }}",
  75.             "name": "{{ accessory.title }}",
  76.             "offers": {
  77.                 "@type": "AggregateOffer",
  78.                 "availability": "http://schema.org/InStock",
  79.                 "priceCurrency": "UAH",
  80.                 "price": "{{ accessory.salePricePart |number_format(2, '.', ' ') }}",
  81.                 "lowPrice": "{{ accessory.salePricePart |number_format(2, '.', ' ') }}",
  82.                 "highPrice": "{{ accessory.pricePart |number_format(2, '.', ' ') }}"},
  83.             "itemCondition": "http://schema.org/NewCondition",
  84.             "seller": {
  85.                 "@type": "Organization",
  86.                 "name": "{{ accessory.dealer.nameByLocale(app.request.locale) }}",
  87.                 "url": "{{ domain }}"
  88.             },
  89.             "url": "{{ path('shop_accessory_page', {workId: accessory.id}) }}"
  90.         }
  91.     </script>
  92.     <script src="/dist/{{ MODE }}/dcsite/peugeot/js/peugeotAccessoriesPage.js?{{ VERSION }}"></script>
  93.     <script>
  94.         $(() => {
  95.             initAccessoriesProduct({
  96.                 initUrl: '{{ path('base_accessories_vs') }}',
  97.                 addReviewUrl: '{{ path('base_review_init') }}',
  98.                 addAccessoryToBasketUrl: '{{ path('my_basket_add_accessory') }}',
  99.                 basketUrl: '{{ path('peugeot_basket') }}',
  100.                 locale: '{{ app.request.locale }}',
  101.                 accessoryId: {{ accessory.id }},
  102.                 dealerId: {{ dealer.id }},
  103.                 review_count: {{ accessory.review.count }},
  104.                 review_avg: {{ accessory.review.avg }},
  105.                 accessory: {{ accessory|json_encode|raw }},
  106.                 secondCategory: "{{ breadcrumbs[1].titleUa }}",
  107.             });
  108.         });
  109.     </script>
  110. {% endblock %}