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') }}

+
+
+ +

{{ function('pll_e', 'Catalog') }}

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

-
-
- -

{{ function('pll_e', 'Catalog') }}

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

-
-
- -

{{ function('pll_e', 'Catalog') }}

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