orange_ecom_starter-2.0.x-dev/templates/commerce/commerce-checkout-order-summary.html.twig

templates/commerce/commerce-checkout-order-summary.html.twig
{#
/**
 * @file
 * Theme implementation for the checkout order summary.
 *
 * The rendered order totals come from commerce-order-total-summary.html.twig.
 * See commerce-order-receipt.html.twig for examples of manual total theming.
 *
 * Available variables:
 * - order_entity: The order entity.
 * - checkout_step: The current checkout step.
 * - totals: An array of order total values with the following keys:
 *   - subtotal: The order subtotal price.
 *   - adjustments: An array of adjustment totals:
 *     - type: The adjustment type.
 *     - label: The adjustment label.
 *     - total: The adjustment total price.
 *     - weight: The adjustment weight, taken from the adjustment type.
 *   - total: The order total price.
 * - rendered_totals: The rendered order totals.
 */
#}
<div{{ attributes.addClass('checkout-order-summary') }}>
  {% block order_items %}
    <div class="checkout-order-summary__items">
      {% for order_item in order_entity.getItems %}
        <div class="checkout-order-summary__item">
          <div class="checkout-order-summary__item-product">
            <div class="checkout-order-summary__item-quantity">
              {{ order_item.getQuantity|number_format }} x
            </div>
            {% if order_item.hasPurchasedEntity %}
              {{ order_item.getPurchasedEntity|commerce_entity_render('summary') }}
            {% else %}
              {{- order_item.label -}}
            {% endif %}
          </div>
          <div class="checkout-order-summary__item-price-total">{{ order_item.getTotalPrice|commerce_price_format }}</div>
        </div>
      {% endfor %}
    </div>
  {% endblock %}
  {% block totals %}
    {{ rendered_totals }}
  {% endblock %}
</div>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc