{# @deprecated tag:v6.5.0 - Template `checkout-item.html.twig` is deprecated. Use `storefront/component/line-item/line-item.html.twig` instead. #}{% block page_checkout_item %} {# @var page \Shopware\Storefront\Page\Checkout\Cart\CheckoutCartPage #} {# @var delivery \Shopware\Core\Checkout\Cart\Delivery\Struct\Delivery #} {# @var lineItem \Shopware\Core\Checkout\Cart\LineItem\LineItem #} {% set PRODUCT_LINE_ITEM_TYPE = constant('Shopware\\Core\\Checkout\\Cart\\LineItem\\LineItem::PRODUCT_LINE_ITEM_TYPE') %} {% set DISCOUNT_LINE_ITEM_TYPE = constant('Shopware\\Core\\Checkout\\Cart\\LineItem\\LineItem::DISCOUNT_LINE_ITEM') %} {% set isDiscount = (not lineItem.good and lineItem.price.totalPrice <= 0) || lineItem.type == DISCOUNT_LINE_ITEM_TYPE %} {% set isNested = lineItem.children.count > 0 %} {# @deprecated tag:v6.5.0 - var will be removed - use 'childrenTemplate' instead #} {% set childTemplate = '@Storefront/storefront/page/checkout/checkout-item.html.twig' %} {% set childrenTemplate = '@Storefront/storefront/page/checkout/checkout-item-children.html.twig' %} {% set deliveryPosition = null %} {% if page.cart.deliveries.count > 0 %} {% set delivery = page.cart.deliveries.first %} {% set deliveryPosition = delivery.positions.get(lineItem.id) %} {% endif %} {# @deprecated tag:v6.5.0 - `cartItemClasses` & `isChild` will be removed with no replacement #} {% set cartItemClasses = '' %} {% set label = lineItem.label|trans|sw_sanitize %} {% set label = label !== '' ? label : lineItem.label %} {% block page_checkout_item_container %} <div class="cart-item cart-item-{{ lineItem.type }}{% if isDiscount %} is-discount{% endif %}{{ cartItemClasses }}"> <div class="row cart-item-row"> {% block page_checkout_item_info %} <div class="col-10 col-md-5 cart-item-info"> {% block page_checkout_item_info_inner %} <div class="row cart-item-row"> {% block page_checkout_item_info_image %} <div class="col-auto cart-item-info-img"> {% block page_checkout_item_info_image_container %} <div class="cart-item-img-container"> {% block page_checkout_item_info_image_link %} {% if isDiscount %} <div class="cart-item-img cart-item-discount-icon"> {% sw_icon 'marketing' style { 'color': 'success' } %} </div> {% elseif isNested %} <div class="cart-item-nested-icon"> {% sw_icon 'bag-product' style { 'color': 'light' } %} </div> {% else %} <a href="{{ seoUrl('frontend.detail.page', {'productId': lineItem.referencedId}) }}" class="cart-item-img-link" title="{{ label }}" {% if controllerAction is same as('confirmPage') %} {{ dataBsToggleAttr }}="modal" data-modal-class="quickview-modal" data-url="{{ path('widgets.quickview.minimal', { 'productId': lineItem.referencedId }) }}" {% endif %} > {% block page_checkout_item_info_image_element %} {% if lineItem.cover.url %} {% sw_thumbnails 'cart-item-img-thumbnails' with { media: lineItem.cover, sizes: { 'default': '100px' }, attributes: { 'class': 'img-fluid cart-item-img', 'alt': (lineItem.cover.translated.alt ?: ''), 'title': (lineItem.cover.translated.title ?: '') } } %} {% else %} {% sw_icon 'placeholder' style { 'size': 'fluid' } %} {% endif %} {% endblock %} </a> {% endif %} {% endblock %} </div> {% endblock %} </div> {% endblock %} {% block page_checkout_item_info_details %} <div class="col-12 col-sm-7 col-md-8 cart-item-details"> {% block page_checkout_item_info_details_inner %} <div class="cart-item-details-container"> {% block page_checkout_item_info_label %} {% if lineItem.type == PRODUCT_LINE_ITEM_TYPE %} <a href="{{ seoUrl('frontend.detail.page', {'productId': lineItem.referencedId}) }}" class="cart-item-label" title="{{ label }}" {% if controllerAction is same as('confirmPage') %} {{ dataBsToggleAttr }}="modal" data-modal-class="quickview-modal" data-url="{{ path('widgets.quickview.minimal',{ 'productId': lineItem.referencedId }) }}" {% endif %} > {{ label|u.truncate(60, '...', false)|raw }} </a> {% else %} <div class="cart-item-label"> {{ label|u.truncate(60, '...', false)|raw }} </div> {% endif %} {% endblock %} {% block page_checkout_item_info_variant_characteristics %} <div class="cart-item-details-characteristics"> {% for option in lineItem.payload.options %} {{ option.group }}: <span class="cart-item-details-characteristics-option">{{ option.option }}</span> {% if lineItem.payload.options|last != option %} {{ " | " }} {% endif %} {% endfor %} </div> {% endblock %} {% block page_checkout_item_info_features %} {% if lineItem.type == PRODUCT_LINE_ITEM_TYPE and lineItem.payload.features is not null %} {% sw_include '@Storefront/storefront/component/product/feature/list.html.twig' with { 'features': lineItem.payload.features } %} {% endif %} {% endblock %} {% block page_checkout_item_info_ordernumber %} {% if lineItem.payload.productNumber %} <div class="cart-item-ordernumber"> {{ "checkout.cartItemInfoId"|trans|sw_sanitize }} {{ lineItem.payload.productNumber }} </div> {% endif %} {% endblock %} {% block page_checkout_item_delivery_date %} {% if deliveryPosition and deliveryPosition.deliveryDate and config('core.cart.showDeliveryTime') %} <div class="cart-item-delivery-date"> {{ "checkout.lineItemDeliveryDate"|trans({ '%earliest%': deliveryPosition.deliveryDate.earliest|format_date('short', locale=app.request.locale), '%latest%': deliveryPosition.deliveryDate.latest|format_date('short', locale=app.request.locale) })|sw_sanitize }} </div> {% endif %} {% endblock %} {% block page_checkout_item_wishlist %} {% if config('core.cart.wishlistEnabled') and lineItem.type == PRODUCT_LINE_ITEM_TYPE %} {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with { showText: true, size: 'sm', productId: lineItem.referencedId } %} {% endif %} {% endblock %} </div> {% endblock %} </div> {% endblock %} </div> {% endblock %} </div> {% endblock %} {% block page_checkout_item_quantity %} <div class="col-12 col-sm-4 col-md-2 cart-item-quantity"> <div class="row cart-item-quantity-row"> {% block page_checkout_item_quantity_label %} <div class="col-8 col-sm-12 cart-item-quantity-label"> {{ "checkout.cartHeaderQuantity"|trans|sw_sanitize }} </div> {% endblock %} {% block page_checkout_item_quantity_select %} <div class="col-4 col-sm-12"> {% block page_checkout_item_quantity_form %} {% set showQuantitySelect = (not lineItem.states is defined or 'is-download' not in lineItem.states or ('is-download' in lineItem.states and lineItem.quantityInformation.maxPurchase !== 1)) %} {# @deprecated tag:v6.5.0 - 'isChild' will be removed with no replacement #} {% if lineItem.quantityInformation and lineItem.stackable and not isChild and showQuantitySelect %} <form action="{{ path('frontend.checkout.line-item.change-quantity', {'id': lineItem.id}) }}" class="cart-item-quantity-container" method="post" data-form-auto-submit="true"> {% block page_checkout_item_quantity_form_csrf %} {{ sw_csrf('frontend.checkout.line-item.change-quantity') }} {% endblock %} {% block page_checkout_item_quantity_redirect %} <input type="hidden" name="redirectTo" value="frontend.checkout.cart.page"> {% endblock %} {# @var quantityInformation \Shopware\Core\Checkout\Cart\LineItem\QuantityInformation #} {% set quantityInformation = lineItem.quantityInformation %} {% if quantityInformation.maxPurchase %} {% set maxQuantity = quantityInformation.maxPurchase %} {% else %} {% set maxQuantity = config('core.cart.maxQuantity') %} {% endif %} {% set selectQuantityThreshold = 100 %} {% block page_product_detail_buy_quantity %} {% if quantityInformation.maxPurchase / lineItem.quantityInformation.purchaseSteps > selectQuantityThreshold %} {% block page_product_detail_buy_quantity_input %} <input type="number" name="quantity" class="form-control js-offcanvas-cart-change-quantity" min="{{ quantityInformation.minPurchase }}" max="{{ maxQuantity }}" step="{{ quantityInformation.purchaseSteps }}" value="{{ lineItem.quantity }}" /> {% endblock %} {% else %} {% block page_product_detail_buy_quantity_select %} <select name="quantity" class="{{ formSelectClass }} quantity-select"> {% for quantity in range(lineItem.quantityInformation.minPurchase, maxQuantity, lineItem.quantityInformation.purchaseSteps) %} <option value="{{ quantity }}" {% if quantity == lineItem.quantity %} selected="selected"{% endif %}> {{ quantity }} </option> {% endfor %} </select> {% endblock %} {% endif %} {% endblock %} </form> {% elseif lineItem.type != "promotion" %} {% block page_checkout_item_quantity_number %} <div class="d-flex justify-content-end cart-item-quantity"> {{ lineItem.quantity }} </div> {% endblock %} {% endif %} {% endblock %} </div> {% endblock %} </div> </div> {% endblock %} {% block page_checkout_item_unit_price %} <div class="col-12 col-sm-4 col-md-2 cart-item-unit-price"> {% block page_checkout_item_unit_price_wrapper %} {% if not isDiscount %} {% block page_checkout_item_unit_price_label %} <div class="cart-item-unit-price-label"> {{ "checkout.cartHeaderUnitPrice"|trans|sw_sanitize }} </div> {% endblock %} {% block page_checkout_item_unit_price_inner %} {{ lineItem.price.unitPrice|currency }}{% block page_checkout_item_unit_price_tax_symbol %}{{ "general.star"|trans|sw_sanitize }}{% endblock %} {% endblock %} {% endif %} {% endblock %} </div> {% endblock %} {% block page_checkout_item_total_price %} <div class="col-12 col-sm-4 col-md-2 cart-item-total-price"> {% block page_checkout_item_total_price_wrapper %} {% block page_checkout_item_total_price_label %} <div class="cart-item-total-price-label"> {{ "checkout.cartHeaderTotalPrice"|trans|sw_sanitize }} </div> {% endblock %} {% block page_checkout_item_total_price_inner %} {# Shipping costs discounts always have a price of 0, which might be confusing, therefore we do not show those #} {% if lineItem.payload.discountScope != 'delivery' %} {{ lineItem.price.totalPrice|currency }}{% block page_checkout_item_total_price_tax_symbol %}{{ "general.star"|trans|sw_sanitize }}{% endblock %} {% endif %} {% endblock %} {% endblock %} </div> {% endblock %} {% block page_checkout_item_remove %} <div class="col-2 col-md-1 cart-item-remove"> {% block page_checkout_item_remove_form %} {% if lineItem.removable %} <form action="{{ path('frontend.checkout.line-item.delete', {'id': lineItem.id}) }}" method="post" data-form-csrf-handler="true"> {% block page_checkout_item_remove_form_csrf %} {{ sw_csrf('frontend.checkout.line-item.delete') }} {% endblock %} {% block page_checkout_item_remove_redirect %} <input type="hidden" name="redirectTo" value="frontend.checkout.cart.page"> {% endblock %} {% block page_checkout_item_remove_submit %} <button type="submit" title="{{ "checkout.removeLineItem"|trans|striptags }}" data-product-id="{{ lineItem.id }}" class="btn btn-light btn-sm cart-item-remove-button"> {% sw_icon 'x' style { 'size': 'sm' } %} </button> {% endblock %} </form> {% endif %} {% endblock %} </div> {% endblock %} {% block page_checkout_item_children_template %} {% if isNested %} {# @deprecated tag:v6.5.0 - block will be moved to `@Storefront/storefront/page/checkout/checkout-item-children.html.twig` #} {% block page_checkout_item_children %} {% sw_include childrenTemplate %} {% endblock %} {% endif %} {% endblock %} </div> </div> {% endblock %} {# @deprecated tag:v6.5.0 - block will be removed #} {% block page_checkout_item_child %}{% endblock %}{% endblock %}