vendor/shopware/storefront/Resources/views/storefront/page/account/order-history/order-detail-list-item.html.twig line 1

Open in your IDE?
  1. {# @deprecated tag:v6.5.0 - Template `order-detail-list-item.html.twig` is deprecated. Use `storefront/component/line-item/line-item.html.twig` instead. #}
  2. {% block page_account_order_item_detail_list_item %}
  3.     {% set PROMOTION_LINE_ITEM_TYPE = constant('Shopware\\Core\\Checkout\\Cart\\LineItem\\LineItem::PROMOTION_LINE_ITEM_TYPE') %}
  4.     {% set isDiscount = (not lineItem.good and lineItem.price.totalPrice <= 0) %}
  5.     {% set isNested = lineItem.children.count > 0 %}
  6.     {% set childrenTemplate = '@Storefront/storefront/page/account/order-history/order-detail-list-item-children.html.twig' %}
  7.     {# @deprecated tag:v6.5.0 - var will be removed - use 'childrenTemplate' instead #}
  8.     {% set childTemplate = '@Storefront/storefront/page/account/order-history/order-detail-list-item.html.twig' %}
  9.     {# @deprecated tag:v6.5.0 - var will be removed with no replacement #}
  10.     {% set cartItemClasses = '' %}
  11.     {% block page_account_order_item_detail_list_item_container %}
  12.         <div class="order-item-detail-list-item order-detail-item-{{ lineItem.type }}{% if isDiscount %} is-discount{% endif %} {{ cartItemClasses }}">
  13.             <div class="row order-detail-content-row">
  14.                 {% block page_account_order_item_detail_image %}
  15.                     <div class="col-12 col-md-2 order-item order-item-image">
  16.                         {% block page_account_order_item_detail_image_value %}
  17.                             <div class="order-item-product-image">
  18.                                 {% if isDiscount %}
  19.                                     <div class="order-item-img order-item-discount-icon">
  20.                                         {% sw_icon 'marketing' style {
  21.                                             'color': 'success'
  22.                                         } %}
  23.                                     </div>
  24.                                 {% elseif isNested %}
  25.                                     <div class="order-item-nested-icon">
  26.                                         {% sw_icon 'bag-product' style {
  27.                                             'color': 'light'
  28.                                         } %}
  29.                                     </div>
  30.                                 {% else %}
  31.                                     {% set url = lineItem.referencedId ? seoUrl('frontend.detail.page', {'productId': lineItem.referencedId }) : '#not-found' %}
  32.                                     <a href="{{ url }}"
  33.                                        class="product-image-link"
  34.                                        title="{{ lineItem.label }}">
  35.                                         {% block page_checkout_item_info_image_element %}
  36.                                             {% if lineItem.cover %}
  37.                                                 {% sw_thumbnails 'cart-item-img-thumbnails' with {
  38.                                                     media: lineItem.cover,
  39.                                                     sizes: {
  40.                                                         'default': '100px'
  41.                                                     },
  42.                                                     attributes: {
  43.                                                         'class': 'img-fluid order-item-img',
  44.                                                         'alt': (lineItem.cover.translated.alt ?: ''),
  45.                                                         'title': (lineItem.cover.translated.title ?: '')
  46.                                                     }
  47.                                                 } %}
  48.                                             {% else %}
  49.                                                 <div class="product-image-placeholder">
  50.                                                     {% sw_icon 'placeholder' style {
  51.                                                         'size': 'fluid'
  52.                                                     } %}
  53.                                                 </div>
  54.                                             {% endif %}
  55.                                         {% endblock %}
  56.                                     </a>
  57.                                 {% endif %}
  58.                             </div>
  59.                         {% endblock %}
  60.                     </div>
  61.                 {% endblock %}
  62.                 {% block page_account_order_item_detail_name %}
  63.                     <div class="col-12 col-md-4 order-item order-item-name">
  64.                         {% block page_account_order_item_detail_name_value %}
  65.                             {% if isDiscount %}
  66.                                 <strong class="name-value">
  67.                                         {{ lineItem.label }}
  68.                                     </strong>
  69.                             {% else %}
  70.                                 {% set url = lineItem.referencedId ? seoUrl('frontend.detail.page', {'productId': lineItem.referencedId }) : '#not-found' %}
  71.                                 <a href="{{ url }}"
  72.                                    class="order-item-product-name"
  73.                                    title="{{ lineItem.label }}"> <strong class="name-value">
  74.                                         {{ lineItem.label }}
  75.                                     </strong> </a>
  76.                             {% endif %}
  77.                         {% endblock %}
  78.                         {% block page_account_order_item_detail_variants %}
  79.                             {% if lineItem.payload.options|length >= 1 %}
  80.                                 <div class="order-item-variants">
  81.                                     {% for option in lineItem.payload.options %}
  82.                                         {% if option.option %}
  83.                                             <div class="order-item-variants-properties">
  84.                                                 <div class="order-item-variants-properties-name">{{ option.group }}:</div>
  85.                                                 <div class="order-item-variants-properties-value">{{ option.option }}</div>
  86.                                             </div>
  87.                                         {% else %}
  88.                                             <div class="order-item-variants-properties">
  89.                                                 <div class="order-item-variants-properties-name">{{ option.group.translated.name }}:</div>
  90.                                                 <div class="order-item-variants-properties-value">{{ option.translated.name }}</div>
  91.                                             </div>
  92.                                         {% endif %}
  93.                                     {% endfor %}
  94.                                 </div>
  95.                             {% endif %}
  96.                         {% endblock %}
  97.                         {% block page_account_order_item_detail_unitprice %}
  98.                             {% set referencePrice = lineItem.price.referencePrice %}
  99.                             {% if referencePrice.purchaseUnit %}
  100.                                 <div class="order-price-unit">
  101.                                     {% block page_account_order_item_detail_purchaseunit %}
  102.                                         <div class="order-price-purchase">
  103.                                             {% block page_account_order_item_detail_purchaseunit_label %}
  104.                                                 <span class="order-price-purchase-label">
  105.                                                     {{ "account.orderItemInfoContent"|trans|sw_sanitize }}
  106.                                                 </span>
  107.                                             {% endblock %}
  108.                                             {% block page_account_order_item_detail_purchaseunit_content %}
  109.                                                 <span class="order-price-purchase-content">
  110.                                                    {{ referencePrice.purchaseUnit }} {{ referencePrice.unitName }}
  111.                                                 </span>
  112.                                             {% endblock %}
  113.                                         </div>
  114.                                     {% endblock %}
  115.                                     {% block page_account_order_item_detail_referenceunit %}
  116.                                         {% if referencePrice.referenceUnit is not null %}
  117.                                             <div class="order-price-reference">
  118.                                                 {% block page_account_order_item_detail_referenceunit_content %}
  119.                                                     <span class="order-price-reference-content">
  120.                                                         ({{ referencePrice.price|currency(order.currency.isoCode) }}{{ "general.star"|trans|sw_sanitize }} / {{ referencePrice.referenceUnit }} {{ referencePrice.unitName }})
  121.                                                     </span>
  122.                                                 {% endblock %}
  123.                                             </div>
  124.                                         {% endif %}
  125.                                     {% endblock %}
  126.                                 </div>
  127.                             {% endif %}
  128.                         {% endblock %}
  129.                     </div>
  130.                 {% endblock %}
  131.                 {% block page_account_order_item_detail_quantity %}
  132.                     <div class="col-12 col-md-2 order-item order-item-quantity">
  133.                         {% if not isChild %}
  134.                             {% block page_account_order_item_detail_quantity_label %}
  135.                                 <strong class="order-item-label order-item-quantity-label">
  136.                                     {{ "account.orderItemColumnQuantity"|trans|sw_sanitize }}{{ "account.colonCharacter"|trans|sw_sanitize }}
  137.                                 </strong>
  138.                             {% endblock %}
  139.                             {% block page_account_order_item_detail_quantity_value %}
  140.                                 <span class="order-item-value order-item-quantity-value">
  141.                                     {{ lineItem.quantity }}
  142.                                 </span>
  143.                             {% endblock %}
  144.                         {% endif %}
  145.                     </div>
  146.                 {% endblock %}
  147.                 {% block page_account_order_item_detail_price %}
  148.                     <div class="col-12 col-md-2 order-item order-item-price">
  149.                         {% if not isDiscount %}
  150.                             {% block page_account_order_item_detail_price_label %}
  151.                                 <strong class="order-item-label order-item-price-label">
  152.                                     {{ "account.orderItemColumnPrice"|trans|sw_sanitize }}{{ "account.colonCharacter"|trans|sw_sanitize }}
  153.                                 </strong>
  154.                             {% endblock %}
  155.                             {% block page_account_order_item_detail_price_value %}
  156.                                 <span class="order-item-value order-item-price-value">
  157.                                     {% if lineItem.type == PROMOTION_LINE_ITEM_TYPE %}
  158.                                         /
  159.                                     {% else %}
  160.                                         {{ lineItem.unitPrice|currency(order.currency.isoCode) }}{{ "general.star"|trans|sw_sanitize }}
  161.                                     {% endif %}
  162.                                 </span>
  163.                             {% endblock %}
  164.                         {% endif %}
  165.                     </div>
  166.                 {% endblock %}
  167.                 {% block page_account_order_item_detail_total %}
  168.                     <div class="col-12 col-md-2 order-item order-item-total">
  169.                         {% block page_account_order_item_detail_total_label %}
  170.                             <strong class="order-item-label order-item-total-label">
  171.                                 {{ "account.orderItemColumnTotal"|trans|sw_sanitize }}{{ "account.colonCharacter"|trans|sw_sanitize }}
  172.                             </strong>
  173.                         {% endblock %}
  174.                         {% block page_account_order_item_detail_total_value %}
  175.                             <span class="order-item-value order-item-total-value">
  176.                                 {{ lineItem.totalPrice|currency(order.currency.isoCode) }}{{ "general.star"|trans|sw_sanitize }}
  177.                             </span>
  178.                         {% endblock %}
  179.                     </div>
  180.                 {% endblock %}
  181.             </div>
  182.             {% block page_account_order_item_downloads_table %}
  183.                 <div class="order-detail-content-list">
  184.                     {% sw_include '@Storefront/storefront/component/line-item/element/downloads.html.twig' %}
  185.                 </div>
  186.             {% endblock %}
  187.             {% block page_account_order_item_detail_children_template %}
  188.                 {% if isNested %}
  189.                     {# @deprecated tag:v6.5.0 - `page_account_order_item_detail_list_item_children` will be moved to `@Storefront/storefront/page/account/order-history/order-detail-list-item-children.html.twig` #}
  190.                     {% block page_account_order_item_detail_list_item_children %}
  191.                         {% sw_include childrenTemplate %}
  192.                     {% endblock %}
  193.                 {% endif %}
  194.             {% endblock %}
  195.             {% block page_account_order_item_detail_list_item_divider %}
  196.                 <div class="order-item-detail-list-item-divider"></div>
  197.             {% endblock %}
  198.         </div>
  199.     {% endblock %}
  200.     {# @deprecated tag:v6.5.0 - block will be removed #}
  201.     {% block page_account_order_item_detail_list_item_child %}{% endblock %}
  202. {% endblock %}