custom/plugins/Theme3S/src/Resources/views/storefront/component/product/card/box-standard.html.twig line 1

  1. {% block component_product_box %}
  2. {% if product %}
  3. {% set name = product.translated.name %}
  4. {% set id = product.id %}
  5. {% set cover = product.cover.media %}
  6. {% set variation = product.variation %}
  7. {% set displayParent = product.variantListingConfig.displayParent and product.parentId === null %}
  8. {% set displayParent = true %}
  9. {% set sizeoption = variation[0].option %}
  10. {% set coloroption = variation[1].option %}
  11. {% set blank = " " %}
  12. {% set gloveoption = " " ~ variation[2].option %}
  13. {% set size = " " ~ sizeoption %}
  14. {% set ProductLink = "" %}
  15. <a href="{{ seoUrl('frontend.detail.page', { 'productId': id }) }}" title="{{ name }}" class="product-image-link is-{{ displayMode }}">
  16. {% set imageurl = "" %}
  17. {% set Element = "" %}
  18. {% for Item in product.cover.media.thumbnails.elements %}
  19. {% if Item.width == 800 %}
  20. {% set imageurl = Item.url %}
  21. {% set Element = Item %}
  22. {% endif %}
  23. {% endfor %}
  24. <div class="card product-box box-{{ layout }}">
  25. {% block component_product_box_content %}
  26. <div class="card-body">
  27. {% block component_product_box_badges %}
  28. {% sw_include '@Storefront/storefront/component/product/card/badges.html.twig' %}
  29. {% endblock %}
  30. {% block component_product_box_rich_snippets %}
  31. {# @deprecated tag:v6.5.0 - Block will be removed completely including the template it references #}
  32. {% sw_include '@Storefront/storefront/component/product/card/meta.html.twig' %}
  33. {% endblock %}
  34. {% block component_product_box_image %}
  35. <div class="product-image-wrapper">
  36. {# fallback if display mode is not set #}
  37. {% set displayMode = displayMode ?: 'standard' %}
  38. {# set display mode 'cover' for box-image with standard display mode #}
  39. {% if layout == 'image' and displayMode == 'standard' %}
  40. {% set displayMode = 'cover' %}
  41. {% endif %}
  42. {% block component_product_box_image_link %}
  43. {% block component_product_box_image_link_inner %}
  44. {% if cover.url %}
  45. {% set attributes = {
  46. 'class': 'product-image is-'~displayMode,
  47. 'alt': (cover.translated.alt ?: name),
  48. 'title': (cover.translated.title ?: name)
  49. } %}
  50. {% if displayMode == 'cover' or displayMode == 'contain' %}
  51. {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  52. {% endif %}
  53. {% block component_product_box_image_thumbnail %}
  54. {% if imageurl is empty %}
  55. {% set imageurl = cover.url %}
  56. {% endif %}
  57. <img src="{{ imageurl }}" class="product-image is-standard">
  58. <!--
  59. {% sw_thumbnails 'product-image-thumbnails' with {
  60. media: cover,
  61. sizes: sizes
  62. } %} -->
  63. {% endblock %}
  64. {% else %}
  65. {% block component_product_box_image_placeholder %}
  66. <div class="product-image-placeholder">
  67. <!-- {% sw_icon 'placeholder' style {
  68. 'size': 'fluid'
  69. } %} -->
  70. </div>
  71. {% endblock %}
  72. {% endif %}
  73. {% endblock %}
  74. {% endblock %}
  75. {% if config('core.cart.wishlistEnabled') %}
  76. {% block component_product_box_wishlist_action %}
  77. {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  78. appearance: 'circle',
  79. productId: id
  80. } %}
  81. {% endblock %}
  82. {% endif %}
  83. </div>
  84. {% endblock %}
  85. {% block component_product_box_info %}
  86. <div class="product-info">
  87. {% block component_product_box_rating %}
  88. {% if config('core.listing.showReview') %}
  89. <div class="product-rating">
  90. {% if product.ratingAverage %}
  91. {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  92. points: product.ratingAverage,
  93. style: 'text-primary'
  94. } %}
  95. {% endif %}
  96. </div>
  97. {% endif %}
  98. {% endblock %}
  99. {% block component_product_box_variant_characteristics %}
  100. <div class="product-variant-characteristics">
  101. <div class="product-variant-characteristics-text">
  102. {% if not displayParent %}
  103. {% for variation in product.variation %}
  104. {{ variation.group }}:
  105. <span class="product-variant-characteristics-option">
  106. {{ variation.option }}
  107. </span>
  108. {% if product.variation|last != variation %}
  109. {{ " | " }}
  110. {% endif %}
  111. {% endfor %}
  112. {% endif %}
  113. </div>
  114. </div>
  115. {% endblock %}
  116. <!--
  117. {% block component_product_box_description %}
  118. <div class="product-description">
  119. {{ product.translated.description|striptags|raw }}
  120. </div>
  121. {% endblock %}
  122. -->
  123. <div class="VariantData-{{ product.productNumber }}">
  124. <div class='wappenbox'>
  125. {% for propertyId in product.propertyIds %}
  126. {% if propertyId == "e755c9070e7d41469f9a1dad62db875a" %} <div class='variantwappen EN11491'></div> {% endif %}
  127. {% if propertyId == "a581943fd430489598f209896e7bbb56" %} <div class='variantwappen EN11495'></div> {% endif %}
  128. {% if propertyId == "b1fc6928266347428bd6b74c0268dad4" %} <div class='variantwappen EN14126'></div> {% endif %}
  129. {% if propertyId == "fa76425d7f2a400099d925d591e3be9f" %} <div class='variantwappen EN10732'></div> {% endif %}
  130. {% if propertyId == "3842201e22984368bcc0d3125cf2827c" %} <div class='variantwappen Typ1'></div> {% endif %}
  131. {% if propertyId == "fce6da51bcce4345a2fa0a44d88f249b" %} <div class='variantwappen Typ3'></div> {% endif %}
  132. {% if propertyId == "f0f15d19683a4fa0a16901a8f6e9f1af" %} <div class='variantwappen Typ4'></div> {% endif %}
  133. {% if propertyId == "778dfd9f51044a54a60cbd945b5b2762" %} <div class='variantwappen Typ5'></div> {% endif %}
  134. {% if propertyId == "ca28fcc57c924b8e925c2bef5893fafa" %} <div class='variantwappen Typ6'></div> {% endif %}
  135. {% if propertyId == "0be6549f03d142c785c97b05ba9f1faa" %} <div class='variantwappen KatIII'></div> {% endif %}
  136. {% endfor %}
  137. </div>
  138. <div class='clearingItem'></div>
  139. <div class='colorbox'>
  140. {% if product.translated.customFields.custom_colors_ != "" %}
  141. {% set colors = product.translated.customFields.custom_colors_ | split(',') %}
  142. {% for color in colors %}
  143. {% if color == "grün" %}
  144. <div class='variantcolor gruen'></div>
  145. {% elseif color == "weiß/blau" %}
  146. <div class='variantcolor' style="background: linear-gradient(to bottom left, #ffffff 50%, #395f98 50%);"></div>
  147. {% else %}
  148. <div class='variantcolor {{ color }}'></div>
  149. {% endif %}
  150. {% endfor %}
  151. {% endif %}
  152. </div>
  153. </div>
  154. {% block component_product_box_action %}
  155. {% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %}
  156. {% endblock %}
  157. {% block component_product_box_price %}
  158. {% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  159. {% endblock %}
  160. {% block component_product_box_name %}
  161. {% set newname = name %}
  162. {% if size != "" %}
  163. {% set newname = newname|replace({(size): blank}) %}
  164. {% endif %}
  165. {% if coloroption != "" %}
  166. {% set newname = newname|replace({(coloroption): blank}) %}
  167. {% endif %}
  168. {% if gloveoption != "" %}
  169. {% set newname = newname|replace({(gloveoption): blank}) %}
  170. {% endif %}
  171. <div class="BoxCardName">
  172. {% if newname|length > 0 %}
  173. {% if newname|length >= 71 %}
  174. {{ newname|u.truncate(70, '…') }}
  175. {% else %}
  176. {{ newname }}
  177. {% endif %}
  178. {% endif %}
  179. </div>
  180. {#
  181. {{ name|replace({(sizeoption): blank, (coloroption): blank}) }}
  182. {{ name }}
  183. #}
  184. {% endblock %}
  185. </div>
  186. {% endblock %}
  187. </div>
  188. {% endblock %}
  189. </div>
  190. </a>
  191. {% endif %}
  192. {% endblock %}