custom/plugins/NetiNextStoreLocator/src/Resources/views/storefront/store_locator/detail.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_content %}
  3.     {% block neti_store_locator_detail %}
  4.         <div class="neti-next-store-locator-detail">
  5.             {% block neti_store_locator_detail_config %}
  6.                 <input type="hidden" value="{{ page.config|json_encode|escape }}" ref="config">
  7.                 <input type="hidden" value="{{ page.store|json_encode|escape }}" ref="store">
  8.             {% endblock %}
  9.             {% set store = page.store %}
  10.             {% block neti_store_locator_detail_map %}
  11.                 <div class="map-container" ref="mapContainer">
  12.                     <div id="map" ref="map"></div>
  13.                 </div>
  14.             {% endblock %}
  15.             <div class="container">
  16.                 {% block neti_store_locator_detail_header %}
  17.                     <div class="header">
  18.                         <div class="label">
  19.                             {{ store.label }}
  20.                             {% if page.isStoreOpen and page.storeBusinessHours %}
  21.                                 <div class="text-success">
  22.                                     {{ "neti-next-store-locator.index.store.open"|trans }}
  23.                                 </div>
  24.                             {% elseif page.storeBusinessHours %}
  25.                                 <div class="text-danger">
  26.                                     {{ "neti-next-store-locator.index.store.closed"|trans }}
  27.                                 </div>
  28.                             {% endif %}
  29.                         </div>
  30.                         {% if store.detailsPictureMedia.url %}
  31.                             <div class="logo">
  32.                                 <img src="{{ store.detailsPictureMedia.url }}" alt="{{ store.label }}">
  33.                             </div>
  34.                         {% elseif store.pictureMedia.url %}
  35.                             <div class="logo">
  36.                                 <img src="{{ store.pictureMedia.url }}" alt="{{ store.label }}">
  37.                             </div>
  38.                         {% endif %}
  39.                     </div>
  40.                 {% endblock %}
  41.                 <div class="row">
  42.                     {% block neti_store_locator_detail_description %}
  43.                         {% if store.translated.description %}
  44.                             <div class="col-md-6">
  45.                                 <div class="description">
  46.                                     {{ store.translated.description|raw }}
  47.                                 </div>
  48.                             </div>
  49.                         {% endif %}
  50.                     {% endblock %}
  51.                     <div class="col-md-6">
  52.                         {% block neti_store_locator_detail_address %}
  53.                             <div class="address">
  54.                                 {% if store.country.iso is same as('GB') %}
  55.                                     {{ store.streetNumber }} {{ store.street }}<br/>
  56.                                     {{ store.city }}<br/>
  57.                                     {% if store.countryState %}
  58.                                         {{ store.countryState.translated.name }}<br>
  59.                                     {% endif %}
  60.                                     {{ store.zipCode }}<br/>
  61.                                     {% if store.country %}
  62.                                         {{ store.country.name }}
  63.                                     {% endif %}
  64.                                 {% else %}
  65.                                     {{ store.street }} {{ store.streetNumber }}<br/>
  66.                                     {{ store.zipCode }} {{ store.city }}<br/>
  67.                                     {% if store.country %}
  68.                                         {{ store.country.name }}
  69.                                     {% endif %}
  70.                                 {% endif %}
  71.                             </div>
  72.                         {% endblock %}
  73.                         {% block neti_store_locator_detail_opening_times %}
  74.                             {% if page.storeBusinessHours %}
  75.                                 {% sw_include "@Storefront/storefront/store_locator/business-hours.html.twig" %}
  76.                             {% elseif store.translated.openingTimes %}
  77.                                 <div class="opening-times">
  78.                                     <strong>
  79.                                         {{ "neti-next-store-locator.index.store.labelOpeningTimes"|trans }}
  80.                                     </strong>
  81.                                     <div>
  82.                                         {{ store.translated.openingTimes|sw_sanitize }}
  83.                                     </div>
  84.                                 </div>
  85.                             {% endif %}
  86.                         {% endblock %}
  87.                         {% block neti_store_locator_detail_contact_form_button %}
  88.                             {% if store.contactFormEnabled %}
  89.                                 <div class="contact-form-button mb-2">
  90.                                     <button class="btn btn-primary" @click="onContactForm">
  91.                                         {{ "neti-next-store-locator.index.store.buttonContact"|trans }}
  92.                                     </button>
  93.                                     <neti-store-locator-contact-form :store="store"/>
  94.                                 </div>
  95.                             {% endif %}
  96.                         {% endblock %}
  97.                         {% block neti_store_locator_detail_additional_info %}
  98.                             <div class="additional-info">
  99.                                 {% if store.phone %}
  100.                                     <strong>{{ "neti-next-store-locator.index.store.labelTelephone"|trans }}</strong>
  101.                                     <a href="tel:{{ store.phone|escape }}">
  102.                                         {{ store.phone }}
  103.                                     </a>
  104.                                     <br/>
  105.                                 {% endif %}
  106.                                 {% if store.fax %}
  107.                                     <strong>{{ "neti-next-store-locator.index.store.labelFax"|trans }}</strong>
  108.                                     {{ store.fax }}
  109.                                     <br/>
  110.                                 {% endif %}
  111.                                 {% if store.email %}
  112.                                     <strong>{{ "neti-next-store-locator.index.store.labelEmail"|trans }}</strong>
  113.                                     <a href="mailto:{{ store.email|escape }}">
  114.                                         {{ store.email }}
  115.                                     </a>
  116.                                     <br/>
  117.                                 {% endif %}
  118.                                 {% if store.url %}
  119.                                     <a href="{{ store.url|escape }}" target="_blank">
  120.                                         {{ store.url }}
  121.                                     </a>
  122.                                     <br/>
  123.                                 {% endif %}
  124.                             </div>
  125.                         {% endblock %}
  126.                     </div>
  127.                     <div class="col-md-6">
  128.                         {% block neti_store_locator_detail_additional_text %}
  129.                             <div class="additional-text">
  130.                                 {% if store.translated.additionalInformation %}
  131.                                     {{ store.translated.additionalInformation|raw }}
  132.                                 {% endif %}
  133.                             </div>
  134.                         {% endblock %}
  135.                         {% block neti_store_locator_detail_html_content %}
  136.                             <div class="html-content">
  137.                                 {{ page.htmlContent|raw }}
  138.                             </div>
  139.                         {% endblock %}
  140.                     </div>
  141.                 </div>
  142.                 {% block neti_store_locator_detail_back_button %}
  143.                     <a href="{{ url('frontend.store_locator.index') }}" class="btn btn-outline-primary back-button">
  144.                         {{ "neti-next-store-locator.detail.backToOverview"|trans }}
  145.                     </a>
  146.                 {% endblock %}
  147.             </div>
  148.         </div>
  149.     {% endblock %}
  150.     <script type="text/x-template" id="neti-store-locator-contact-form">
  151.         {% sw_include '@Storefront/storefront/store_locator/contact-form.twig' %}
  152.     </script>
  153.     {% block neti_store_locator_cookie_consent %}
  154.         {% sw_include '@Storefront/storefront/store_locator/cookie-consent.html.twig' %}
  155.     {% endblock %}
  156. {% endblock %}
  157. {# Load google maps api after shopware js #}
  158. {% block base_script_hmr_mode %}
  159.     {{ parent() }}
  160.     <input type="hidden" name="netiNextStoreLocatorApiKey" value="{{ apiKey|url_encode }}"/>
  161. {% endblock %}