custom/plugins/TcinnThemeWareLiving/src/Resources/views/storefront/themeware/product-detail/twt-product-specifications.html.twig line 1

Open in your IDE?
  1. {# ThemeWare "Product specifications" on product pages #}
  2. {#
  3.     Create container and add product specifications
  4.     type: buy-box
  5.     @Storefront/storefront/themeware/product-detail/twt-product-specifications.html.twig
  6. #}
  7. {# TODO: Blöcke prüfen... #}
  8. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  9. {# ThemeWare: Set theme variables #}
  10. {% set twtProductDetailAvailablestockShow = theme_config('twt-product-detail-availablestock-show') %}
  11. {% set twtProductDetailEanShow = theme_config('twt-product-detail-ean-show') %}
  12. {% set twtProductDetailHeightShow = theme_config('twt-product-detail-height-show') %}
  13. {% set twtProductDetailLengthShow = theme_config('twt-product-detail-length-show') %}
  14. {% set twtProductDetailManufacturerShow = theme_config('twt-product-detail-manufacturer-show') %}
  15. {% set twtProductDetailManufacturernumberShow = theme_config('twt-product-detail-manufacturernumber-show') %}
  16. {% set twtProductDetailMaxpurchaseShow = theme_config('twt-product-detail-maxpurchase-show') %}
  17. {% set twtProductDetailMinpurchaseShow = theme_config('twt-product-detail-minpurchase-show') %}
  18. {% set twtProductDetailWeightShow = theme_config('twt-product-detail-weight-show') %}
  19. {% set twtProductDetailWidthShow = theme_config('twt-product-detail-width-show') %}
  20. {% set twtProductDetailCustomField1Show = theme_config('twt-product-detail-custom-field-1-show') %}
  21. {% set twtProductDetailCustomField2Show = theme_config('twt-product-detail-custom-field-2-show') %}
  22. {% set twtProductDetailCustomField3Show = theme_config('twt-product-detail-custom-field-3-show') %}
  23. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  24. {# ThemeWare: Product specifications in buy-box #}
  25. {% block twt_buy_widget_product_specifications %}
  26.     {# ThemeWare: Add manufacturer (itemprop "brand") #}
  27.     {% if page.product.manufacturer and twtProductDetailManufacturerShow == 2 %}
  28.         <div class="twt-product-detail-manufacturer-container twt-product-specifications-container">
  29.             {% block twt_page_product_detail_manufacturer_label %}
  30.                 <span class="twt-product-detail-manufacturer-label twt-product-specifications-label">
  31.                         {{ "twt.detail.manufacturerLabel"|trans|sw_sanitize }}
  32.                     </span>
  33.             {% endblock %}
  34.             {% block twt_page_product_detail_manufacturer %}
  35.                 <span class="twt-product-detail-manufacturer">
  36.                         {{ page.product.manufacturer.translated.name }}
  37.                     </span>
  38.             {% endblock %}
  39.         </div>
  40.     {% endif %}
  41.     {# ThemeWare: Add manufacturerNumber (itemprop "mpn") #}
  42.     {% if page.product.manufacturerNumber and twtProductDetailManufacturernumberShow == 2 %}
  43.         <div class="twt-product-detail-manufacturernumber-container twt-product-specifications-container">
  44.             {% block twt_page_product_detail_manufacturernumber_label %}
  45.                 <span class="twt-product-detail-manufacturernumber-label twt-product-specifications-label">
  46.                     {{ "twt.detail.manufacturernumberLabel"|trans|sw_sanitize }}
  47.                 </span>
  48.             {% endblock %}
  49.             {% block twt_page_product_detail_manufacturernumber %}
  50.                 <span class="twt-product-detail-manufacturernumber">
  51.                     {{ page.product.manufacturerNumber }}
  52.                 </span>
  53.             {% endblock %}
  54.         </div>
  55.     {% endif %}
  56.     {# ThemeWare: Add ean (itemprop "gtin13") #}
  57.     {% if page.product.ean and twtProductDetailEanShow == 2 %}
  58.         <div class="twt-product-detail-ean-container twt-product-specifications-container">
  59.             {% block twt_page_product_detail_ean_label %}
  60.                 <span class="twt-product-detail-ean-label twt-product-specifications-label">
  61.                     {{ "twt.detail.eanLabel"|trans|sw_sanitize }}
  62.                 </span>
  63.             {% endblock %}
  64.             {% block twt_page_product_detail_ean %}
  65.                 <span class="twt-product-detail-ean">
  66.                     {{ page.product.ean }}
  67.                 </span>
  68.             {% endblock %}
  69.         </div>
  70.     {% endif %}
  71.     {# ThemeWare: Zusatzfeld 1 (ehemals Freitextfeld 1) #}
  72.     {% if twtCustomFields.product.twt_living_pro_custom_field__product__custom_field_1 is not empty and twtProductDetailCustomField1Show == 2 %}
  73.         <div class="twt-product-detail-custom-field-1-container twt-product-specifications-container">
  74.             {% block twt_page_product_detail_custom_field_1_label %}
  75.                 <span class="twt-product-detail-custom-field-1-label twt-product-specifications-label">
  76.                     {{ "twt.detail.customFields.customField1.label"|trans|sw_sanitize }}
  77.                 </span>
  78.             {% endblock %}
  79.             {% block twt_page_product_detail_custom_field_1 %}
  80.                 <span class="twt-product-detail-custom-field-1">
  81.                     {{ twtCustomFields.product.twt_living_pro_custom_field__product__custom_field_1 }}
  82.                 </span>
  83.             {% endblock %}
  84.         </div>
  85.     {% endif %}
  86.     {# ThemeWare: Add weight (itemprop "weight") #}
  87.     {% if page.product.weight and twtProductDetailWeightShow == 2 %}
  88.         <div class="twt-product-detail-weight-container twt-product-specifications-container">
  89.             {% block twt_page_product_detail_weight_label %}
  90.                 <span class="twt-product-detail-weight-label twt-product-specifications-label">
  91.                     {{ "twt.detail.weightLabel"|trans|sw_sanitize }}
  92.                 </span>
  93.             {% endblock %}
  94.             {% block twt_page_product_detail_weight %}
  95.                 <span class="twt-product-detail-weight">
  96.                     {{ page.product.weight }} kg
  97.                 </span>
  98.             {% endblock %}
  99.         </div>
  100.     {% endif %}
  101.     {# ThemeWare: Add length (itemprop "depth") #}
  102.     {% if page.product.length and twtProductDetailLengthShow == 2 %}
  103.         <div class="twt-product-detail-length-container twt-product-specifications-container">
  104.             {% block twt_page_product_detail_length_label %}
  105.                 <span class="twt-product-detail-length-label twt-product-specifications-label">
  106.                     {{ "twt.detail.lengthLabel"|trans|sw_sanitize }}
  107.                 </span>
  108.             {% endblock %}
  109.             {% block twt_page_product_detail_length %}
  110.                 <span class="twt-product-detail-length">
  111.                     {{ page.product.length }} mm
  112.                 </span>
  113.             {% endblock %}
  114.         </div>
  115.     {% endif %}
  116.     {# ThemeWare: Add width (itemprop "width") #}
  117.     {% if page.product.width and twtProductDetailWidthShow == 2 %}
  118.         <div class="twt-product-detail-width-container twt-product-specifications-container">
  119.             {% block twt_page_product_detail_width_label %}
  120.                 <span class="twt-product-detail-width-label twt-product-specifications-label">
  121.                     {{ "twt.detail.widthLabel"|trans|sw_sanitize }}
  122.                 </span>
  123.             {% endblock %}
  124.             {% block twt_page_product_detail_width %}
  125.                 <span class="twt-product-detail-width">
  126.                     {{ page.product.width }} mm
  127.                 </span>
  128.             {% endblock %}
  129.         </div>
  130.     {% endif %}
  131.     {# ThemeWare: Add height (itemprop "height") #}
  132.     {% if page.product.height and twtProductDetailHeightShow == 2 %}
  133.         <div class="twt-product-detail-height-container twt-product-specifications-container">
  134.             {% block twt_page_product_detail_height_label %}
  135.                 <span class="twt-product-detail-height-label twt-product-specifications-label">
  136.                     {{ "twt.detail.heightLabel"|trans|sw_sanitize }}
  137.                 </span>
  138.             {% endblock %}
  139.             {% block twt_page_product_detail_height %}
  140.                 <span class="twt-product-detail-height">
  141.                     {{ page.product.height }} mm
  142.                 </span>
  143.             {% endblock %}
  144.         </div>
  145.     {% endif %}
  146.     {# ThemeWare: Zusatzfeld 2 (ehemals Freitextfeld 2) #}
  147.     {# TODO: Add position 'below 1', 'default' or 'above 3'... #}
  148.     {% if twtCustomFields.product.twt_living_pro_custom_field__product__custom_field_2 is not empty and twtProductDetailCustomField2Show == 2 %}
  149.         <div class="twt-product-detail-custom-field-2-container twt-product-specifications-container">
  150.             {% block twt_page_product_detail_custom_field_2_label %}
  151.                 <span class="twt-product-detail-custom-field-2-label twt-product-specifications-label">
  152.                     {{ "twt.detail.customFields.customField2.label"|trans|sw_sanitize }}
  153.                 </span>
  154.             {% endblock %}
  155.             {% block twt_page_product_detail_custom_field_2 %}
  156.                 <span class="twt-product-detail-custom-field-2">
  157.                     {{ twtCustomFields.product.twt_living_pro_custom_field__product__custom_field_2 }}
  158.                 </span>
  159.             {% endblock %}
  160.         </div>
  161.     {% endif %}
  162.     {# ThemeWare: Add availableStock (itemprop "..") #}
  163.     {# TODO: handle isCloseout?! #}
  164.     {% if page.product.availableStock > 0 and twtProductDetailAvailablestockShow == 2 %}
  165.         <div class="twt-product-detail-availablestock-container twt-product-specifications-container">
  166.             {% block twt_page_product_detail_availablestock_label %}
  167.                 <span class="twt-product-detail-availablestock-label twt-product-specifications-label">
  168.                     {{ "twt.detail.availableStockLabel"|trans|sw_sanitize }}
  169.                 </span>
  170.             {% endblock %}
  171.             {% block twt_page_product_detail_availablestock %}
  172.                 <span class="twt-product-detail-availablestock">
  173.                     {{ page.product.availableStock }}
  174.                 </span>
  175.             {% endblock %}
  176.         </div>
  177.     {% endif %}
  178.     {# ThemeWare: Add minPurchase (itemprop "..") #}
  179.     {% if page.product.minPurchase and twtProductDetailMinpurchaseShow == 2 %}
  180.         <div class="twt-product-detail-minpurchase-container twt-product-specifications-container">
  181.             {% block twt_page_product_detail_minpurchase_label %}
  182.                 <span class="twt-product-detail-minpurchase-label twt-product-specifications-label">
  183.                     {{ "twt.detail.minpurchaseLabel"|trans|sw_sanitize }}
  184.                 </span>
  185.             {% endblock %}
  186.             {% block twt_page_product_detail_minpurchase %}
  187.                 <span class="twt-product-detail-minpurchase">
  188.                     {{ page.product.minPurchase }}
  189.                 </span>
  190.             {% endblock %}
  191.         </div>
  192.     {% endif %}
  193.     {# ThemeWare: Add maxPurchase (itemprop "..") #}
  194.     {% if page.product.maxPurchase and twtProductDetailMaxpurchaseShow == 2 %}
  195.         <div class="twt-product-detail-maxpurchase-container twt-product-specifications-container">
  196.             {% block twt_page_product_detail_maxpurchase_label %}
  197.                 <span class="twt-product-detail-maxpurchase-label twt-product-specifications-label">
  198.                     {{ "twt.detail.maxpurchaseLabel"|trans|sw_sanitize }}
  199.                 </span>
  200.             {% endblock %}
  201.             {% block twt_page_product_detail_maxpurchase %}
  202.                 <span class="twt-product-detail-maxpurchase">
  203.                     {{ page.product.maxPurchase }}
  204.                 </span>
  205.             {% endblock %}
  206.         </div>
  207.     {% endif %}
  208.     {# ThemeWare: Zusatzfeld 3 #}
  209.     {% if twtCustomFields.product.twt_living_pro_custom_field__product__custom_field_3 is not empty and twtProductDetailCustomField3Show == 2 %}
  210.         <div class="twt-product-detail-custom-field-3-container twt-product-specifications-container">
  211.             {% block twt_page_product_detail_custom_field_3_label %}
  212.                 <span class="twt-product-detail-custom-field-3-label twt-product-specifications-label">
  213.                     {{ "twt.detail.customFields.customField3.label"|trans|sw_sanitize }}
  214.                 </span>
  215.             {% endblock %}
  216.             {% block twt_page_product_detail_custom_field_3 %}
  217.                 <span class="twt-product-detail-custom-field-3">
  218.                     {{ twtCustomFields.product.twt_living_pro_custom_field__product__custom_field_3 }}
  219.                 </span>
  220.             {% endblock %}
  221.         </div>
  222.     {% endif %}
  223. {% endblock %}