diff --git a/wp-content/themes/cosmopet/templates/profile/order-list.twig b/wp-content/themes/cosmopet/templates/profile/order-list.twig new file mode 100644 index 0000000..fbb1adb --- /dev/null +++ b/wp-content/themes/cosmopet/templates/profile/order-list.twig @@ -0,0 +1,88 @@ + {% if customer_orders %} + {% for order in customer_orders %} + {% set meta_data = order.meta_data.order_data %} + {% set shipping_address = order.get_address('shipping') %} +
{{ function('pll_e', 'Order from') }} {{ order.date_created|date('Y.m.d') }}
+{{ order.id }}
+{{ function('pll_e', 'Summary') }}:
+{{ order.get_total() }} {{ fn('get_woocommerce_currency_symbol', order.get_currency()) }}
+{{ function('pll_e', 'Delivery address') }}
+
+ {% if meta_data.office_code %}
+ {{ function('pll_e', 'CDEK shipping point') }}
+ {{ office_name }}
+ {% else %}
+ {{ shipping_address.city }} {{ shipping_address.address_1 }}
+ {% endif %}
+
{{ item.name }}
+{{ item.quantity }}
+{{ item.total }} {{ function('get_woocommerce_currency_symbol', code) }}
+{{ function('pll_e', 'No orders yet') }}
+{{ function('pll_e', 'Order from') }} {{ order.date_created|date('Y.m.d') }}
-{{ order.id }}
-{{ function('pll_e', 'Summary') }}:
-{{ order.get_total() }}
-{{ function('pll_e', 'Delivery address') }}
-
- {% if meta_data.office_code %}
- {{ function('pll_e', 'CDEK shipping point') }}
- {{ office_name }}
- {% else %}
- {{ shipping_address.city }} {{ shipping_address.address_1 }}
- {% endif %}
-
{{ item.name }}
-{{ item.quantity }}
-{{ item.total }} {{ function('get_woocommerce_currency_symbol', code) }}
-{{ function('pll_e', 'No orders yet') }}
-{{ function('pll_e', 'Order from') }} {{ order.date_created|date('Y.m.d') }}
-{{ order.id }}
-{{ function('pll_e', 'Summary') }}:
-{{ order.get_total() }} {{ fn('get_woocommerce_currency_symbol', order.get_currency()) }}
-{{ function('pll_e', 'Delivery address') }}
-
- {% if meta_data.office_code %}
- {{ function('pll_e', 'CDEK shipping point') }}
- {{ office_name }}
- {% else %}
- {{ shipping_address.city }} {{ shipping_address.address_1 }}
- {% endif %}
-
{{ item.name }}
-{{ item.quantity }}
-{{ item.total }} {{ function('get_woocommerce_currency_symbol', code) }}
-{{ function('pll_e', 'No orders yet') }}
-