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. {% set imageurl = "" %}
  16. {% set Element = "" %}
  17. {% for Item in product.cover.media.thumbnails.elements %}
  18. {% if Item.width == 800 %}
  19. {% set imageurl = Item.url %}
  20. {% set Element = Item %}
  21. {% endif %}
  22. {% endfor %}
  23. {% block component_product_box_content %}
  24. {% block component_product_box_badges %}
  25. {% sw_include '@Storefront/storefront/component/product/card/badges.html.twig' %}
  26. {% endblock %}
  27. {% block component_product_box_rich_snippets %}
  28. {# @deprecated tag:v6.5.0 - Block will be removed completely including the template it references #}
  29. {% sw_include '@Storefront/storefront/component/product/card/meta.html.twig' %}
  30. {% endblock %}
  31. {% block component_product_box_image %}
  32. {# fallback if display mode is not set #}
  33. {% set displayMode = displayMode ?: 'standard' %}
  34. {# set display mode 'cover' for box-image with standard display mode #}
  35. {% if layout == 'image' and displayMode == 'standard' %}
  36. {% set displayMode = 'cover' %}
  37. {% endif %}
  38. {% block component_product_box_image_link %}
  39. {% block component_product_box_image_link_inner %}
  40. {% if cover.url %}
  41. {% set attributes = {
  42. 'class': 'product-image is-'~displayMode,
  43. 'alt': (cover.translated.alt ?: name),
  44. 'title': (cover.translated.title ?: name)
  45. } %}
  46. {% if displayMode == 'cover' or displayMode == 'contain' %}
  47. {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  48. {% endif %}
  49. {% block component_product_box_image_thumbnail %}
  50. {% if imageurl is empty %}
  51. {% set imageurl = cover.url %}
  52. {% endif %}
  53. {% endblock %}
  54. {% else %}
  55. {% block component_product_box_image_placeholder %}
  • {% endblock %}
  • {% endif %}
  • {% endblock %}
  • {% endblock %}
  • {% if config('core.cart.wishlistEnabled') %}
  • {% block component_product_box_wishlist_action %}
  • {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  • appearance: 'circle',
  • productId: id
  • } %}
  • {% endblock %}
  • {% endif %}
  • {% endblock %}
  • {% block component_product_box_info %}
  • {% block component_product_box_rating %}
  • {% if config('core.listing.showReview') %}
  • {% if product.ratingAverage %}
  • {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  • points: product.ratingAverage,
  • style: 'text-primary'
  • } %}
  • {% endif %}
  • {% endif %}
  • {% endblock %}
  • {% block component_product_box_variant_characteristics %}
  • {% if not displayParent %}
  • {% for variation in product.variation %}
  • {{ variation.group }}:
  • {{ variation.option }}
  • {% if product.variation|last != variation %}
  • {{ " | " }}
  • {% endif %}
  • {% endfor %}
  • {% endif %}
  • {% endblock %}
  • {% for propertyId in product.propertyIds %}
  • {% if propertyId == "e755c9070e7d41469f9a1dad62db875a" %}
    {% endif %}
  • {% if propertyId == "a581943fd430489598f209896e7bbb56" %}
    {% endif %}
  • {% if propertyId == "b1fc6928266347428bd6b74c0268dad4" %}
    {% endif %}
  • {% if propertyId == "fa76425d7f2a400099d925d591e3be9f" %}
    {% endif %}
  • {% if propertyId == "3842201e22984368bcc0d3125cf2827c" %}
    {% endif %}
  • {% if propertyId == "fce6da51bcce4345a2fa0a44d88f249b" %}
    {% endif %}
  • {% if propertyId == "f0f15d19683a4fa0a16901a8f6e9f1af" %}
    {% endif %}
  • {% if propertyId == "778dfd9f51044a54a60cbd945b5b2762" %}
    {% endif %}
  • {% if propertyId == "ca28fcc57c924b8e925c2bef5893fafa" %}
    {% endif %}
  • {% if propertyId == "0be6549f03d142c785c97b05ba9f1faa" %}
    {% endif %}
  • {% endfor %}
  • {% if product.translated.customFields.custom_colors_ != "" %}
  • {% set colors = product.translated.customFields.custom_colors_ | split(',') %}
  • {% for color in colors %}
  • {% if color == "grün" %}
  • {% elseif color == "weiß/blau" %}
  • {% else %}
  • {% endif %}
  • {% endfor %}
  • {% endif %}
  • {% block component_product_box_action %}
  • {% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %}
  • {% endblock %}
  • {% block component_product_box_price %}
  • {% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  • {% endblock %}
  • {% block component_product_box_name %}
  • {% set newname = name %}
  • {% if size != "" %}
  • {% set newname = newname|replace({(size): blank}) %}
  • {% endif %}
  • {% if coloroption != "" %}
  • {% set newname = newname|replace({(coloroption): blank}) %}
  • {% endif %}
  • {% if gloveoption != "" %}
  • {% set newname = newname|replace({(gloveoption): blank}) %}
  • {% endif %}
  • {% if newname|length > 0 %}
  • {% if newname|length >= 71 %}
  • {{ newname|u.truncate(70, '…') }}
  • {% else %}
  • {{ newname }}
  • {% endif %}
  • {% endif %}
  • {#
  • {{ name|replace({(sizeoption): blank, (coloroption): blank}) }}
  • {{ name }}
  • #}
  • {% endblock %}
  • {% endblock %}
  • {% endblock %}
  • {% endif %}
  • {% endblock %}