custom/plugins/PickwareDhl/src/Resources/views/storefront/pickware-dhl/location-finder/location-finder.html.twig line 1

Open in your IDE?
  1. {% set pickwareDhlAllowDhlSpecificAddress = (changeShipping and not changeBilling) or (prefix in ['shippingAddress', 'address']) %}
  2. {% set pickwareDhlConfigurationExtension = page.extensions.pickwareDhlConfiguration ?? null %}
  3. {% set pickwareDhlCurrentShippingMethod = context.shippingMethod ?? null %}
  4. {% if pickwareDhlCurrentShippingMethod is not null
  5.     and pickwareDhlConfigurationExtension is not null
  6.     and pickwareDhlConfigurationExtension.shippingMethodConfigurations[pickwareDhlCurrentShippingMethod.id]
  7.     and pickwareDhlConfigurationExtension.shippingMethodConfigurations[pickwareDhlCurrentShippingMethod.id].storefrontConfig is not null
  8. %}
  9.     {% set pickwareDhlConfiguration = pickwareDhlConfigurationExtension.dhlConfig.config.rawConfig %}
  10.     {% set pickwareDhlShippingMethodConfig = pickwareDhlConfigurationExtension
  11.     .shippingMethodConfigurations[pickwareDhlCurrentShippingMethod.id].storefrontConfig
  12.     %}
  13.     {% set pickwareDhlEnablePackstation = pickwareDhlShippingMethodConfig.showPackstation ?? false %}
  14.     {% set pickwareDhlEnablePostOffice = pickwareDhlShippingMethodConfig.showPostOffice ?? false %}
  15.     {% set pickwareDhlEnablePaketshop = pickwareDhlShippingMethodConfig.showPaketshop ?? false %}
  16.     {% set pickwareDhlEnableSpecialAddressSelection =
  17.         pickwareDhlEnablePackstation or pickwareDhlEnablePostOffice or pickwareDhlEnablePaketshop
  18.     %}
  19. {% endif %}
  20. {% if pickwareDhlConfiguration and pickwareDhlEnableSpecialAddressSelection and pickwareDhlAllowDhlSpecificAddress %}
  21.     <div
  22.         class="pickware-dhl-location-finder"
  23.         data-csrf-token="{{ sw_csrf("pickware-dhl.frontend.location-finder.locations", {"mode": "token"}) }}"
  24.         data-google-maps-api-key="{{ pickwareDhlConfiguration['googleMapsApiKey'] }}"
  25.         data-google-maps-zoom-threshold="15"
  26.     >
  27.         <div class="card">
  28.             {% if showTitle ?? true %}
  29.                 <div class="card-title">
  30.                     {{ "pickware-dhl.location-finder.storefront.title"|trans|sw_sanitize }}
  31.                 </div>
  32.             {% endif %}
  33.             <div class="card-body">
  34.                 <div
  35.                     data-action="{{ path('pickware-dhl.frontend.location-finder.locations') }}"
  36.                     class="pickware-dhl-location-finder-form"
  37.                 >
  38.                     <div class="pickware-dhl-location-finder-form__actions d-flex flex-row align-items-end">
  39.                         <div>
  40.                             <label
  41.                                 class="form-label"
  42.                                 for="pickware-dhl-location-finder-form__zipcode-input"
  43.                             >
  44.                                 {{ "address.zipcodeLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  45.                             </label>
  46.                             <input type="text"
  47.                                    id="pickware-dhl-location-finder-form__zipcode-input"
  48.                                    class="form-control pickware-dhl-location-finder-form__zipcode-input"
  49.                                    placeholder="{{ "address.zipcodePlaceholder"|trans|striptags }}"
  50.                             >
  51.                         </div>
  52.                         <div>
  53.                             <button type="button"
  54.                                     class="d-flex pickware-dhl-location-finder-form__submit-button btn btn-primary col"
  55.                                     title="{{ "pickware-dhl.location-finder.storefront.search"|trans|sw_sanitize }}">
  56.                                 <span class="align-self-center spinner-border pickware-dhl-location-finder-form__loading-spinner d-none"></span>
  57.                                 {{ "pickware-dhl.location-finder.storefront.search"|trans|sw_sanitize }}
  58.                             </button>
  59.                         </div>
  60.                     </div>
  61.                 </div>
  62.                 <div class="pickware-dhl-location-finder__map"></div>
  63.                 <button type="button" class="pickware-dhl-location-finder__pan-to-location-button">
  64.                     {{ "pickware-dhl.location-finder.storefront.map.pan-to-location"|trans|sw_sanitize }}
  65.                 </button>
  66.                 <div class="pickware-dhl-location-finder-map-icons d-none"
  67.                      data-packstation="{{ asset('bundles/pickwaredhl/img/location-finder/icon-packstation.png') }}"
  68.                      data-post-office="{{ asset('bundles/pickwaredhl/img/location-finder/icon-post-office.png') }}"
  69.                      data-paketshop="{{ asset('bundles/pickwaredhl/img/location-finder/icon-paketshop.png') }}"
  70.                      data-packstation-selected="{{ asset('bundles/pickwaredhl/img/location-finder/icon-packstation-red.png') }}"
  71.                      data-post-office-selected="{{ asset('bundles/pickwaredhl/img/location-finder/icon-post-office-red.png') }}"
  72.                      data-paketshop-selected="{{ asset('bundles/pickwaredhl/img/location-finder/icon-paketshop-red.png') }}"
  73.                 >
  74.                 </div>
  75.                 <div class="pickware-dhl-location-finder-map-errors d-none">
  76.                     <span class="pickware-dhl-location-finder-map-errors__geolocation-failed">{{ "pickware-dhl.location-finder.storefront.map.errors.geolocation-failed"|trans|sw_sanitize }}</span>
  77.                     <span class="pickware-dhl-location-finder-map-errors__no-browser-geolocation">{{ "pickware-dhl.location-finder.storefront.map.errors.no-browser-geolocation"|trans|sw_sanitize }}</span>
  78.                 </div>
  79.                 <script class="pickware-dhl-location-finder-info-popup-template" type="text/template">
  80.                     <div class="pickware-dhl-location-finder-info-popup">
  81.                         <h4 class="pickware-dhl-location-finder-info-popup__title">${title}</h4>
  82.                         <address class="pickware-dhl-location-finder-info-popup__address">${address}</address>
  83.                         <div class="pickware-dhl-location-finder-info-popup-icons">
  84.                             <img class="icon pickware-dhl-location-finder-info-popup-icons__packstation" src="{{ asset('bundles/pickwaredhl/img/location-finder/icon-packstation-red.png') }}" title="" alt=""/>
  85.                             <img class="icon pickware-dhl-location-finder-info-popup-icons__post-office" src="{{ asset('bundles/pickwaredhl/img/location-finder/icon-post-office-red.png') }}" title="" alt=""/>
  86.                             <img class="icon pickware-dhl-location-finder-info-popup-icons__paketshop" src="{{ asset('bundles/pickwaredhl/img/location-finder/icon-paketshop-red.png') }}" title="" alt=""/>
  87.                             <img class="icon pickware-dhl-location-finder-info-popup-icons__wheelchair" src="{{ asset('bundles/pickwaredhl/img/location-finder/icon-wheelchair.png') }}" title="" alt=""/>
  88.                             <img class="icon pickware-dhl-location-finder-info-popup-icons__parking" src="{{ asset('bundles/pickwaredhl/img/location-finder/icon-parking.png') }}" title="" alt=""/>
  89.                         </div>
  90.                         <h5 class="pickware-dhl-location-finder-info-popup-opening-hours__title">{{ "pickware-dhl.location-finder.storefront.opening-hours.title"|trans|sw_sanitize }}</h5>
  91.                         <ul class="pickware-dhl-location-finder-info-popup-opening-hours__content">
  92.                             <li>{{ "pickware-dhl.location-finder.storefront.opening-hours.monday"|trans|sw_sanitize }}: <span class="pickware-dhl-location-finder-info-popup-opening-hours__day" data-value="monday">{{ "pickware-dhl.location-finder.storefront.opening-hours.closed"|trans|sw_sanitize }}</span></li>
  93.                             <li>{{ "pickware-dhl.location-finder.storefront.opening-hours.tuesday"|trans|sw_sanitize }}: <span class="pickware-dhl-location-finder-info-popup-opening-hours__day" data-value="tuesday">{{ "pickware-dhl.location-finder.storefront.opening-hours.closed"|trans|sw_sanitize }}</span></li>
  94.                             <li>{{ "pickware-dhl.location-finder.storefront.opening-hours.wednesday"|trans|sw_sanitize }}: <span class="pickware-dhl-location-finder-info-popup-opening-hours__day" data-value="wednesday">{{ "pickware-dhl.location-finder.storefront.opening-hours.closed"|trans|sw_sanitize }}</span></li>
  95.                             <li>{{ "pickware-dhl.location-finder.storefront.opening-hours.thursday"|trans|sw_sanitize }}: <span class="pickware-dhl-location-finder-info-popup-opening-hours__day" data-value="thursday">{{ "pickware-dhl.location-finder.storefront.opening-hours.closed"|trans|sw_sanitize }}</span></li>
  96.                             <li>{{ "pickware-dhl.location-finder.storefront.opening-hours.friday"|trans|sw_sanitize }}: <span class="pickware-dhl-location-finder-info-popup-opening-hours__day" data-value="friday">{{ "pickware-dhl.location-finder.storefront.opening-hours.closed"|trans|sw_sanitize }}</span></li>
  97.                             <li>{{ "pickware-dhl.location-finder.storefront.opening-hours.saturday"|trans|sw_sanitize }}: <span class="pickware-dhl-location-finder-info-popup-opening-hours__day" data-value="saturday">{{ "pickware-dhl.location-finder.storefront.opening-hours.closed"|trans|sw_sanitize }}</span></li>
  98.                             <li>{{ "pickware-dhl.location-finder.storefront.opening-hours.sunday"|trans|sw_sanitize }}: <span class="pickware-dhl-location-finder-info-popup-opening-hours__day" data-value="sunday">{{ "pickware-dhl.location-finder.storefront.opening-hours.closed"|trans|sw_sanitize }}</span></li>
  99.                         </ul>
  100.                         <button type="button" class="pickware-dhl-location-finder-info-popup-submit-button btn btn-secondary">
  101.                             <span class="pickware-dhl-location-finder-info-popup-submit-button__select-message">{{ "pickware-dhl.location-finder.storefront.select"|trans|sw_sanitize }}</span>
  102.                             <span class="pickware-dhl-location-finder-info-popup-submit-button__selected-message">{{ "pickware-dhl.location-finder.storefront.selected"|trans|sw_sanitize }}</span>
  103.                         </button>
  104.                     </div>
  105.                 </script>
  106.             </div>
  107.         </div>
  108.     </div>
  109. {% endif %}