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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/account/_page.html.twig' %}
  2. {% block page_account_main_content %}
  3.     {% block page_account_orders %}
  4.         <div class="account-orders">
  5.             {% block page_account_orders_welcome %}
  6.                 <div class="account-welcome">
  7.                     {% block page_account_orders_welcome_headline %}
  8.                         <h1>{{ "account.ordersTitle"|trans|sw_sanitize }}</h1>
  9.                         <p>{{ "account.ordersWelcome"|trans|sw_sanitize }}</p>
  10.                     {% endblock %}
  11.                 </div>
  12.             {% endblock %}
  13.             {% block page_account_orders_main %}
  14.                 <div class="account-orders-main">
  15.                     {% if page.orders.total == 0 %}
  16.                         {% block page_account_orders_info_empty %}
  17.                             {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  18.                                 type: "warning",
  19.                                 content: "account.ordersInfoEmpty"|trans|sw_sanitize
  20.                             } %}
  21.                         {% endblock %}
  22.                     {% else %}
  23.                         {% block page_account_orders_overview %}
  24.                             <div class="account-orders-overview">
  25.                                 {% block page_account_orders_table %}
  26.                                     {% block page_account_orders_table_body %}
  27.                                         {% for order in page.orders %}
  28.                                             {# @deprecated tag:v6.5.0 - Bootstrap v5 `.table` class will be removed because it adds unneeded styling. #}
  29.                                             <div class="{% if not feature('v6.5.0.0') %}table {% endif %}order-table"
  30.                                                  data-order-detail-loader="true">
  31.                                                 {% sw_include '@Storefront/storefront/page/account/order-history/order-item.html.twig' %}
  32.                                             </div>
  33.                                         {% endfor %}
  34.                                     {% endblock %}
  35.                                 {% endblock %}
  36.                             </div>
  37.                         {% endblock %}
  38.                         {% block page_account_orders_paging %}
  39.                             {% set criteria = page.orders.criteria %}
  40.                             {% set totalPages = (page.orders.total/criteria.limit)|round(0,'ceil') %}
  41.                             {% if totalPages > 1 %}
  42.                                 {% set formAjaxSubmitOptions = {
  43.                                     replaceSelectors: ".account-orders-main",
  44.                                     submitOnChange: true
  45.                                 } %}
  46.                                 {% block page_account_orders_paging_form %}
  47.                                     <div class="account-orders-pagination">
  48.                                         <form class="account-orders-pagination-form"
  49.                                               action="{{ path('frontend.account.order.page') }}"
  50.                                               method="post"
  51.                                               data-form-ajax-submit="true"
  52.                                               data-form-ajax-submit-options='{{ formAjaxSubmitOptions|json_encode }}'>
  53.                                             {# @deprecated tag:v6.5.0 - Block page_account_orders_paging_csrf will be removed. #}
  54.                                             {% block page_account_orders_paging_csrf %}
  55.                                                 {{ sw_csrf('frontend.account.order.page') }}
  56.                                             {% endblock %}
  57.                                             {% sw_include '@Storefront/storefront/component/pagination.html.twig' with {
  58.                                                 entities: page.orders,
  59.                                                 criteria: criteria
  60.                                             }  %}
  61.                                         </form>
  62.                                     </div>
  63.                                 {% endblock %}
  64.                             {% endif %}
  65.                         {% endblock %}
  66.                     {% endif %}
  67.                 </div>
  68.             {% endblock %}
  69.         </div>
  70.     {% endblock %}
  71. {% endblock %}