如何在 shopware6 的订单概览中过滤掉前端的订单状态

How to filter out the order status in frontend at orders overview in shopware6

我正在尝试根据前端的订单状态过滤订单状态。

在此处输入代码

  {% block page_account_orders_overview %}
                            <div class="account-orders-overview">
                                {% block page_account_orders_table %}
                                    {% block page_account_orders_table_body %}
                                        {% for order in page.orders %}
                                            {% set orderState = order.stateMachineState.technicalName %}
                                            {% if order.type == in_progress %}
                                            <div class="table order-table"
                                                 data-order-detail-loader="true">
                                                {% sw_include '@Storefront/storefront/page/account/quotationorder-history/quotationorder-item.html.twig' %}
                                            </div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endblock %}
                                {% endblock %}
                            </div>
                        {% endblock %}

您需要在字符串比较中添加引号:

{% if order.type == "in_progress" %}