custom/plugins/TcinnThemeWareLiving/src/Resources/views/storefront/component/product/card/badges.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/badges.html.twig' %}
  2. {# ThemeWare® HC-Architecture® via configuration #}
  3. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  4. {# ThemeWare: Set theme variables #}
  5. {% set twtProductBadgesDiscountBadgeShow = theme_config('twt-product-badges-discount-badge-show') %}
  6. {% set twtProductBadgesDiscountBadgeType = theme_config('twt-product-badges-discount-badge-type') %}
  7. {% set twtProductBadgesNewBadgeShow = theme_config('twt-product-badges-new-badge-show') %}
  8. {% set twtProductBadgesShippingFreeBadgeShow = theme_config('twt-product-badges-shipping-free-badge-show') %}
  9. {% set twtProductBadgesSoldBadgeShow = theme_config('twt-product-badges-sold-badge-show') %}
  10. {% set twtProductBadgesStockBadgeShow = theme_config('twt-product-badges-stock-badge-show') %}
  11. {% set twtProductBadgesTopsellerBadgeShow = theme_config('twt-product-badges-topseller-badge-show') %}
  12. {% set twtProductBadgesDiscountBadgeCompatibility = theme_config('twt-product-badges-discount-badge-compatibility') %}
  13. {% set twtProductBadgesTopsellerBadgeCompatibility = theme_config('twt-product-badges-topseller-badge-compatibility') %}
  14. {% set twtProductBadgesNewBadgeCompatibility = theme_config('twt-product-badges-new-badge-compatibility') %}
  15. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  16. {#
  17.     + stock
  18.     + sold
  19.     + shippingFree
  20.     - discount*
  21.     - topseller*
  22.     - new*
  23. #}
  24. {# ThemeWare: Adjustments on the product discount badge #}
  25. {# HC-Architecture @Doku #}
  26. {% block component_product_badges_discount %}
  27.     {# ThemeWare: "Lagerbestand-Badge" ergänzen. #}
  28.     {% if twtProductBadgesStockBadgeShow == 2 %}
  29.         {% sw_include '@Storefront/storefront/themeware/includes/twt-badge-stock-include.html.twig' ignore missing with {
  30.             product: product,
  31.             type: 'listing'
  32.         } %}
  33.     {% endif %}
  34.     {# ThemeWare: "Ausverkauft-Badge" ergänzen. #}
  35.     {% if twtProductBadgesSoldBadgeShow == 2 %}
  36.         {% sw_include '@Storefront/storefront/themeware/includes/twt-badge-sold-include.html.twig' ignore missing with {
  37.             product: product,
  38.             type: 'listing'
  39.         } %}
  40.     {% endif %}
  41.     {# ThemeWare: "Versandkostenfrei-Badge" ergänzen. #}
  42.     {% if twtProductBadgesShippingFreeBadgeShow == 2 %}
  43.         {% sw_include '@Storefront/storefront/themeware/includes/twt-badge-shipping-free-include.html.twig' ignore missing with {
  44.             product: product,
  45.             type: 'listing'
  46.         } %}
  47.     {% endif %}
  48.     {# ThemeWare: "Discount-Badge" ergänzen. #}
  49.     {% if twtProductBadgesDiscountBadgeCompatibility == 2 %}
  50.         {% if twtProductBadgesDiscountBadgeShow == 2 %}
  51.             {% sw_include '@Storefront/storefront/themeware/includes/twt-badge-discount-include.html.twig' ignore missing with {
  52.                 product: product,
  53.                 type: 'listing'
  54.             } %}
  55.         {% endif %}
  56.     {% else %}
  57.         {# Default block #}
  58.         {{ parent() }}
  59.     {% endif %}
  60. {% endblock %}
  61. {# ThemeWare: Adjustments on the product topseller badge #}
  62. {# HC-Architecture @Doku #}
  63. {% block component_product_badges_topseller %}
  64.     {% if twtProductBadgesTopsellerBadgeCompatibility == 2 %}
  65.         {% if twtProductBadgesTopsellerBadgeShow == 2 %}
  66.             {% sw_include '@Storefront/storefront/themeware/includes/twt-badge-topseller-include.html.twig' ignore missing with {
  67.                 product: product,
  68.                 type: 'listing'
  69.             } %}
  70.         {% endif %}
  71.     {% else %}
  72.         {# Default block #}
  73.         {{ parent() }}
  74.     {% endif %}
  75. {% endblock %}
  76. {# ThemeWare: Adjustments on the product new badge #}
  77. {# HC-Architecture @Doku #}
  78. {% block component_product_badges_new %}
  79.     {% if twtProductBadgesNewBadgeCompatibility == 2 %}
  80.         {% if twtProductBadgesNewBadgeShow == 2 %}
  81.             {% sw_include '@Storefront/storefront/themeware/includes/twt-badge-new-include.html.twig' ignore missing with {
  82.                 product: product,
  83.                 type: 'listing'
  84.             } %}
  85.         {% endif %}
  86.     {% else %}
  87.         {# Default block #}
  88.         {{ parent() }}
  89.     {% endif %}
  90. {% endblock %}