vendor/shopware/storefront/Resources/views/storefront/page/checkout/checkout-aside-item.html.twig line 1

Open in your IDE?
  1. {# @deprecated tag:v6.5.0 - Template `checkout-aside-item.html.twig` is deprecated. Use `storefront/component/line-item/line-item.html.twig` instead. #}
  2. {% block page_checkout_aside_item %}
  3.     {% set isDiscount = (not lineItem.good and lineItem.price.totalPrice <= 0) %}
  4.     {% set isNested = lineItem.children.count > 0 %}
  5.     {% set childrenTemplate = '@Storefront/storefront/page/checkout/checkout-aside-item-children.html.twig' %}
  6.     {% set PRODUCT_LINE_ITEM_TYPE = constant('Shopware\\Core\\Checkout\\Cart\\LineItem\\LineItem::PRODUCT_LINE_ITEM_TYPE') %}
  7.     {# @deprecated tag:v6.5.0 - `cartItemClasses` & `isChild` will be removed with no replacement #}
  8.     {% set cartItemClasses = '' %}
  9.     {% block page_checkout_aside_item_container %}
  10.         <div class="row checkout-aside-item cart-item cart-item-{{ lineItem.type }}{% if isDiscount %} is-discount{% endif %}{{ cartItemClasses }}">
  11.             {% block page_checkout_aside_item_image %}
  12.                 <div class="col-4 checkout-aside-item-image">
  13.                     {% block page_checkout_aside_item_image_inner %}
  14.                         {% if isDiscount %}
  15.                             <div class="cart-item-discount-icon cart-item-img">
  16.                                 {% sw_icon 'marketing' style {
  17.                                     'color': 'success'
  18.                                 } %}
  19.                             </div>
  20.                         {% elseif isNested %}
  21.                             <div class="cart-item-nested-icon">
  22.                                 {% sw_icon 'bag-product' style {
  23.                                     'color': 'light'
  24.                                 } %}
  25.                             </div>
  26.                         {% else %}
  27.                             {% if lineItem.cover.url %}
  28.                                 {% sw_thumbnails 'cart-item-img-thumbnails' with {
  29.                                     media: lineItem.cover,
  30.                                     sizes: {
  31.                                         'default': '100px'
  32.                                     },
  33.                                     attributes: {
  34.                                         'class': 'img-fluid cart-item-img',
  35.                                         'alt': (lineItem.cover.translated.alt ?: ''),
  36.                                         'title': (lineItem.cover.translated.title ?: '')
  37.                                     }
  38.                                 } %}
  39.                             {% else %}
  40.                                 {% sw_icon 'placeholder' style {
  41.                                     'size': 'fluid'
  42.                                 } %}
  43.                             {% endif %}
  44.                         {% endif %}
  45.                     {% endblock %}
  46.                 </div>
  47.             {% endblock %}
  48.             {% block page_checkout_aside_item_data %}
  49.                 <div class="col-8 checkout-aside-item-data">
  50.                     {% block page_checkout_aside_item_title %}
  51.                         <div class="checkout-aside-item-title">
  52.                             {% set label = lineItem.label|trans|sw_sanitize %}
  53.                             {% set label = label !== '' ? label : lineItem.label %}
  54.                             {{ label|u.truncate(60)|raw }}
  55.                         </div>
  56.                     {% endblock %}
  57.                     {% block page_checkout_aside_item_variant_characteristics %}
  58.                         <div class="checkout-aside-item-characteristics">
  59.                             {% for option in lineItem.payload.options %}
  60.                                 {{ option.group }}:
  61.                                 <span class="checkout-aside-item-characteristics-option">{{ option.option }}</span>
  62.                                 {% if lineItem.payload.options|last != option %}
  63.                                     {{ " | " }}
  64.                                 {% endif %}
  65.                             {% endfor %}
  66.                         </div>
  67.                     {% endblock %}
  68.                     {% block page_checkout_aside_item_info_features %}
  69.                         {% if lineItem.type == PRODUCT_LINE_ITEM_TYPE and lineItem.payload.features is not null %}
  70.                             {% sw_include '@Storefront/storefront/component/product/feature/list.html.twig' with {
  71.                                 'features': lineItem.payload.features
  72.                             } %}
  73.                         {% endif %}
  74.                     {% endblock %}
  75.                     {% block page_checkout_aside_item_quantity %}
  76.                         <div class="checkout-aside-item-link-quantity">
  77.                             {% if lineItem.quantity and lineItem.type != "promotion" %}
  78.                                 {{ "checkout.cartHeaderQuantity"|trans }}: {{ lineItem.quantity }}
  79.                             {% endif %}
  80.                         </div>
  81.                     {% endblock %}
  82.                     {% block page_checkout_aside_item_price %}
  83.                         <div class="checkout-aside-item-link-price">
  84.                             {{ lineItem.price.totalPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  85.                         </div>
  86.                     {% endblock %}
  87.                 </div>
  88.             {% endblock %}
  89.             {% block page_checkout_aside_item_children_template %}
  90.                 {% if isNested %}
  91.                     {# @deprecated tag:v6.5.0 - block will be moved to `@Storefront/storefront/page/checkout/checkout-aside-item-children.html.twig` #}
  92.                     {% block page_checkout_aside_item_children %}
  93.                         {% sw_include childrenTemplate %}
  94.                     {% endblock %}
  95.                 {% endif %}
  96.             {% endblock %}
  97.         </div>
  98.     {% endblock %}
  99.         {# @deprecated tag:v6.5.0 - block will be removed #}
  100.         {% block page_checkout_aside_item_child %}{% endblock %}
  101. {% endblock %}