From 52e70c2d80f0c26b53292901d5516542a0ea2eb1 Mon Sep 17 00:00:00 2001 From: maksim Date: Fri, 20 Jun 2025 10:09:25 +0300 Subject: [PATCH] =?UTF-8?q?Task=206811=20|=20=D0=B2=D1=8B=D0=BD=D0=B5?= =?UTF-8?q?=D1=81=20=D0=B4=D1=83=D0=B1=D0=BB=D0=B8=D1=80=D1=83=D1=8E=D1=89?= =?UTF-8?q?=D0=B8=D0=B9=D1=81=D1=8F=20=D0=BA=D0=BE=D0=B4=20=D0=B2=20=D0=BE?= =?UTF-8?q?=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=D0=BA=D0=BB=D1=8E=D1=87=D0=B0=D0=B5=D0=BC=D1=8B=D0=B9=20?= =?UTF-8?q?=D1=84=D0=B0=D0=B9=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/profile/order-list.twig | 88 ++++++++++++++++++ .../templates/profile/profile-orders.twig | 89 +------------------ .../cosmopet/templates/profile/profile.twig | 89 +------------------ 3 files changed, 90 insertions(+), 176 deletions(-) create mode 100644 wp-content/themes/cosmopet/templates/profile/order-list.twig 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()) }}

+
+
+
+
+ {% set order_track = meta_data.order_number|default('') %} +
+
+
+

{{ 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 %} +

+
+
+
+ {% for item in order.get_items %} + {% set product = item.get_product %} + {% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %} +
+ +
+
+

{{ item.name }}

+
+

{{ item.quantity }}

+

{{ item.total }} {{ function('get_woocommerce_currency_symbol', code) }}

+
+
+ {% endfor %} +
+ +
+
+
+ +
+
+ {% for item in order.get_items %} + {% set product = item.get_product %} + {% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %} + {% if thumbnail %} + + {% endif %} + {% endfor %} +
+
+
+
+
+ {% endfor %} + {% else %} +
+
+

{{ function('pll_e', 'No orders yet') }}

+
+ +
+ {% endif %} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/profile/profile-orders.twig b/wp-content/themes/cosmopet/templates/profile/profile-orders.twig index 791538a..aa195c3 100644 --- a/wp-content/themes/cosmopet/templates/profile/profile-orders.twig +++ b/wp-content/themes/cosmopet/templates/profile/profile-orders.twig @@ -13,94 +13,7 @@ - {% 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() }}

-
-
-
-
- {% set order_track = meta_data.order_number|default('') %} -
-
-
-

{{ 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 %} -

-
-
-
- {% for item in order.get_items %} - {% set product = item.get_product %} - {% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %} -
- -
-
-

{{ item.name }}

-
-

{{ item.quantity }}

-

{{ item.total }} {{ function('get_woocommerce_currency_symbol', code) }}

-
-
- {% endfor %} -
- -
-
-
- -
-
- {% for item in order.get_items %} - {% set product = item.get_product %} - {% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %} - {% if thumbnail %} - - {% endif %} - {% endfor %} -
-
-
-
-
- {% endfor %} - {% else %} -
-
-

{{ function('pll_e', 'No orders yet') }}

-
- -
- {% endif %} + {% include 'profile/order-list.twig' %} {% endblock %} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/profile/profile.twig b/wp-content/themes/cosmopet/templates/profile/profile.twig index a230deb..64d18d1 100644 --- a/wp-content/themes/cosmopet/templates/profile/profile.twig +++ b/wp-content/themes/cosmopet/templates/profile/profile.twig @@ -15,94 +15,7 @@ - {% 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()) }}

-
-
-
-
- {% set order_track = meta_data.order_number|default('') %} -
-
-
-

{{ 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 %} -

-
-
-
- {% for item in order.get_items %} - {% set product = item.get_product %} - {% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %} -
- -
-
-

{{ item.name }}

-
-

{{ item.quantity }}

-

{{ item.total }} {{ function('get_woocommerce_currency_symbol', code) }}

-
-
- {% endfor %} -
- -
-
-
- -
-
- {% for item in order.get_items %} - {% set product = item.get_product %} - {% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %} - {% if thumbnail %} - - {% endif %} - {% endfor %} -
-
-
-
-
- {% endfor %} - {% else %} -
-
-

{{ function('pll_e', 'No orders yet') }}

-
- -
- {% endif %} + {% include 'profile/order-list.twig' %}