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

Open in your IDE?
  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.         <div class="card product-box box-{{ layout }}">
  9.             {% block component_product_box_content %}
  10.                 <div class="card-body">
  11.                     {% block component_product_box_badges %}
  12.                         {% sw_include '@Storefront/storefront/component/product/card/badges.html.twig' %}
  13.                     {% endblock %}
  14.                     {% block component_product_box_rich_snippets %}
  15.                         {# @deprecated tag:v6.5.0 - Block will be removed completely including the template it references #}
  16.                         {% sw_include '@Storefront/storefront/component/product/card/meta.html.twig' %}
  17.                     {% endblock %}
  18.                     {% block component_product_box_image %}
  19.     <div class="product-image-wrapper">
  20.         {# fallback if display mode is not set #}
  21.         {% set displayMode = displayMode ?: 'standard' %}
  22.         {# set display mode 'cover' for box-image with standard display mode #}
  23.         {% if layout == 'image' and displayMode == 'standard' %}
  24.             {% set displayMode = 'cover' %}
  25.         {% endif %}
  26.         {% block component_product_box_image_link %}
  27.             <a href="{{ seoUrl('frontend.detail.page', { 'productId': id }) }}"
  28.                title="{{ name }}"
  29.                class="product-image-link is-{{ displayMode }}">
  30.                 {% block component_product_box_image_link_inner %}
  31.                     {% set thumbUrl = 'https://shopware.c-2158.maxcluster.net/thumbnail/' ~ product.productNumber ~ '.jpg' %}
  32.                     <img src="{{ thumbUrl }}"
  33.                          alt="{{ name }}"
  34.                          title="{{ name }}"
  35.                          class="product-image is-{{ displayMode }} img-fluid"
  36.                          style="object-fit:{{ displayMode }}; width:100%; height:100%;"
  37.                          loading="lazy"
  38.                          onload="this.style.display='block';"
  39.                          onerror="this.style.display='none';">
  40.                 {% endblock %}
  41.             </a>
  42.         {% endblock %}
  43.         {% if config('core.cart.wishlistEnabled') %}
  44.             {% block component_product_box_wishlist_action %}
  45.                 {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  46.                     appearance: 'circle',
  47.                     productId: id
  48.                 } %}
  49.             {% endblock %}
  50.         {% endif %}
  51.     </div>
  52. {% endblock %}
  53.                     {% block component_product_box_info %}
  54.                         <div class="product-info">
  55.                             {% block component_product_box_rating %}
  56.                                 {% if config('core.listing.showReview') %}
  57.                                     <div class="product-rating">
  58.                                         {% if product.ratingAverage %}
  59.                                             {% sw_include '@Storefront/storefront/component/review/rating.html.twig' with {
  60.                                                 points: product.ratingAverage,
  61.                                                 style: 'text-primary'
  62.                                             } %}
  63.                                         {% endif %}
  64.                                     </div>
  65.                                 {% endif %}
  66.                             {% endblock %}
  67.                             {% block component_product_box_name %}
  68.                                 <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  69.                                    class="product-name"
  70.                                    title="{{ name }}">
  71.                                     {{ name }}
  72.                                 </a>
  73.                             {% endblock %}
  74.                             {# {% block component_product_box_variant_characteristics %}
  75.                                 <div class="product-variant-characteristics">
  76.                                     <div class="product-variant-characteristics-text">
  77.                                         {% if not displayParent %}
  78.                                             {% for variation in product.variation %}
  79.                                                 {{ variation.group }}:
  80.                                                 <span class="product-variant-characteristics-option">
  81.                                                     {{ variation.option }}
  82.                                                 </span>
  83.                                                 {% if product.variation|last != variation %}
  84.                                                     {{ " | " }}
  85.                                                 {% endif %}
  86.                                             {% endfor %}
  87.                                         {% endif %}
  88.                                     </div>
  89.                                 </div>
  90.                             {% endblock %} #}
  91.                             {# {% block component_product_box_description %}
  92.                                 <div class="product-description">
  93.                                     {{ product.translated.description|striptags|raw }}
  94.                                 </div>
  95.                             {% endblock %} #}
  96.                             {% block component_product_box_price %}
  97.                                 {% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
  98.                             {% endblock %}
  99.                             {% block component_product_box_action %}
  100.                                 {% sw_include '@Storefront/storefront/component/product/card/action.html.twig' %}
  101.                             {% endblock %}
  102.                         </div>
  103.                     {% endblock %}
  104.                 </div>
  105.             {% endblock %}
  106.         </div>
  107.     {% endif %}
  108. {% endblock %}