custom/plugins/TcinnThemeWareLiving/src/Resources/views/storefront/layout/header/actions/wishlist-widget.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/header/actions/wishlist-widget.html.twig' %}
  2. {# ThemeWare® HC-Architecture® via configuration #}
  3. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  4. {# ThemeWare: Set theme variables #}
  5. {% set twtHeaderWishlistBtnCompatibility = theme_config('twt-header-wishlist-btn-compatibility') %}
  6. {% set twtIconSet = theme_config('twt-iconset') %}
  7. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  8. {# ThemeWare: Changes on the wishlist-button #}
  9. {# HC-Architecture @Doku #}
  10. {% block layout_header_actions_wishlist_widget %}
  11.     {% if twtHeaderWishlistBtnCompatibility == 2 %}
  12.         {% set showCounter = showCounter ?? true %}
  13.         {# ThemeWare: Icon austauschen #}
  14.         {% if showCounter %}
  15.             <span class="header-wishlist-icon">
  16.                 {% if twtIconSet is not same as ('default') %}
  17.                     {% sw_icon 'heart' style {'pack':'themeware'} %}
  18.                 {% else %}
  19.                     {% sw_icon 'heart' %}
  20.                 {% endif %}
  21.             </span>
  22.         {% endif %}
  23.         {# ThemeWare: Add label 'header-wishlist-name' #}
  24.         {% if showCounter %}
  25.             <span class="header-wishlist-name">
  26.                 {{ "twt.header.wishlistText"|trans }}
  27.             </span>
  28.         {% endif %}
  29.         {% set wishlistStorageOptions = {
  30.             listPath: path('frontend.wishlist.product.list'),
  31.             mergePath: path('frontend.wishlist.product.merge'),
  32.             tokenMergePath: sw_csrf('frontend.wishlist.product.merge', {'mode': 'token'}),
  33.             pageletPath: path('frontend.wishlist.product.merge.pagelet'),
  34.             tokenPageletPath: sw_csrf('frontend.wishlist.product.merge.pagelet', {'mode': 'token'}),
  35.         } %}
  36.         {% set wishlistWidgetOptions = { showCounter: showCounter } %}
  37.         <span class="badge badge-primary header-wishlist-badge"
  38.               id="wishlist-basket"
  39.               data-wishlist-storage="true"
  40.               data-wishlist-storage-options="{{ wishlistStorageOptions|json_encode }}"
  41.               data-wishlist-widget="true"
  42.               data-wishlist-widget-options="{{ wishlistWidgetOptions|json_encode }}"
  43.         ></span>
  44.     {% else %}
  45.         {# Default block #}
  46.         {{ parent() }}
  47.     {% endif %}
  48. {% endblock %}