From c74600377adb3a1f8cd357be81ccc3fc8848afbb Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 18 Jun 2025 14:09:12 +0300 Subject: [PATCH] =?UTF-8?q?Andrei=20|=20=D1=84=D0=B8=D0=BA=D1=81=20=D0=BA?= =?UTF-8?q?=D0=B0=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=D0=B0=20(=D0=BF=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D1=81=D1=82=D0=B8=D0=BB=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D1=8B=20single=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86?= =?UTF-8?q?=D1=8B=20=D0=B2=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=B8=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BB=D0=B8=D1=88=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D1=8B=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D1=8B=D0=B5=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D1=81=D1=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../single-product/component-controller.php | 55 +- wp-content/themes/cosmopet/single-product.php | 50 +- .../_pages/shop/product-single.twig} | 986 +++++++++--------- .../themes/cosmopet/templates/shop/index.php | 1 - .../templates/shop/single-product.php | 63 -- .../cosmopet/woocommerce/single-product.php | 19 - 6 files changed, 544 insertions(+), 630 deletions(-) rename wp-content/themes/cosmopet/{modules/shop/components/single-product/component-template.twig => templates/_pages/shop/product-single.twig} (98%) delete mode 100644 wp-content/themes/cosmopet/templates/shop/index.php delete mode 100644 wp-content/themes/cosmopet/templates/shop/single-product.php delete mode 100644 wp-content/themes/cosmopet/woocommerce/single-product.php diff --git a/wp-content/themes/cosmopet/modules/shop/components/single-product/component-controller.php b/wp-content/themes/cosmopet/modules/shop/components/single-product/component-controller.php index e635834..ecca9fc 100644 --- a/wp-content/themes/cosmopet/modules/shop/components/single-product/component-controller.php +++ b/wp-content/themes/cosmopet/modules/shop/components/single-product/component-controller.php @@ -1,11 +1,6 @@ is_type('variable') $product; $product_type; $context_for_twig; @@ -103,3 +98,53 @@ add_filter('timber/context', function ($context) use ($context_for_twig) { return array_merge($context, $context_for_twig); }); + + + $context = Timber::get_context(); + $post = Timber::get_post(); + $context['post'] = $post; + + $context['wc_breadcrumbs'] = array(); + + if (function_exists('woocommerce_breadcrumb')) { + $args = array( + 'delimiter' => '', + 'wrap_before' => '', + 'wrap_after' => '', + 'before' => '', + 'after' => '', + 'home' => _x('Home', 'breadcrumb', 'woocommerce'), + ); + + $breadcrumbs = new WC_Breadcrumb(); + $breadcrumbs->generate(); + + $formatted_breadcrumbs = array(); + foreach ($breadcrumbs->get_breadcrumb() as $crumb) { + $formatted_breadcrumbs[] = array( + 'text' => $crumb[0], + 'url' => $crumb[1] + ); + } + + $context['wc_breadcrumbs'] = $formatted_breadcrumbs; + } + + $product_id = get_the_ID(); + $product = wc_get_product($product_id); + + $context['product'] = $product; + + $context['related_products'] = array(); + $related_products_ids = wc_get_related_products($product_id, 5); + + if ($related_products_ids) { + foreach ($related_products_ids as $related_id) { + $related_product = wc_get_product($related_id); + if ($related_product) { + $context['related_products'][] = $related_product; + } + } + } + + Timber::render('_pages/shop/product-single.twig', $context); \ No newline at end of file diff --git a/wp-content/themes/cosmopet/single-product.php b/wp-content/themes/cosmopet/single-product.php index ad3e75f..8cbab0e 100644 --- a/wp-content/themes/cosmopet/single-product.php +++ b/wp-content/themes/cosmopet/single-product.php @@ -8,53 +8,5 @@ if (is_product()) { include_module('shop'); include_component('shop', 'single-product'); - - $context = Timber::get_context(); - $post = Timber::get_post(); - $context['post'] = $post; - - $context['wc_breadcrumbs'] = array(); - - if (function_exists('woocommerce_breadcrumb')) { - $args = array( - 'delimiter' => '', - 'wrap_before' => '', - 'wrap_after' => '', - 'before' => '', - 'after' => '', - 'home' => _x('Home', 'breadcrumb', 'woocommerce'), - ); - - $breadcrumbs = new WC_Breadcrumb(); - $breadcrumbs->generate(); - - $formatted_breadcrumbs = array(); - foreach ($breadcrumbs->get_breadcrumb() as $crumb) { - $formatted_breadcrumbs[] = array( - 'text' => $crumb[0], - 'url' => $crumb[1] - ); - } - - $context['wc_breadcrumbs'] = $formatted_breadcrumbs; - } - - $product_id = get_the_ID(); - $product = wc_get_product($product_id); - - $context['product'] = $product; - - $context['related_products'] = array(); - $related_products_ids = wc_get_related_products($product_id, 5); - - if ($related_products_ids) { - foreach ($related_products_ids as $related_id) { - $related_product = wc_get_product($related_id); - if ($related_product) { - $context['related_products'][] = $related_product; - } - } - } - - Timber::render('modules/shop/components/single-product/component-template.twig', $context); + } \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig b/wp-content/themes/cosmopet/templates/_pages/shop/product-single.twig similarity index 98% rename from wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig rename to wp-content/themes/cosmopet/templates/_pages/shop/product-single.twig index e63a67a..5ecb353 100644 --- a/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig +++ b/wp-content/themes/cosmopet/templates/_pages/shop/product-single.twig @@ -1,494 +1,494 @@ -{% set current_path = template_path ~ '/modules/shop/components/single-product' %} -{% set bodyClass = 'bg-white' %} -{% set mainClass = 'wrapper' %} -{% extends 'layout.twig' %} - -{% block content %} -
- - - - {{ function('pll_e', 'к каталогу') }} - - -
-
- {% for image in gallery_images %} -
- {{ image.alt }} -
- {% endfor %} -
-
- -
- - {# Start | Теги = категории #} -
-
- {% for tag in product_tags %} -
- {{ tag }} -
- {% endfor %} - - {% if product_attributes.Flavor is defined and product_attributes.Flavor|length > 0 %} -
- {{ product_attributes.Flavor[0].name }} -
- {% endif %} - {% if product_attributes.Вкус is defined and product_attributes.Вкус|length > 0 %} - - {% endif %} - - {% if product_attributes.Тег is defined and product_attributes.Тег|length > 0 %} - - {% endif %} - -
- {% if product.is_on_sale %} -
- {{ function('pll_e', 'Распродажа %') }} -
- {% endif %} -
- {# End | Теги = категории #} - -

- {{ product.get_title }} -

- -
-
- {% for image in gallery_images %} -
-
- {{ image.alt }} -
-
- {% endfor %} -
-
-
- - {# Start | Цена для неподписочного товара #} - {% if product.get_price %} -
- {% if is_subscription %} - {% if product.get_regular_price %} -
-

- {{ product.get_regular_price }} {{ fn('get_woocommerce_currency_symbol') }} -

-

- {{ ((product.get_regular_price - product.get_price) / product.get_regular_price * 100)|round }} -

-
- {% else %} - не задана цена по подписке - {% endif %} - {% else %} -

- {{ product.get_price }} {{ fn('get_woocommerce_currency_symbol') }} - {% if product.is_on_sale %} - -

-

- {{ product.get_regular_price }} {{ fn('get_woocommerce_currency_symbol') }} -

-

- {% set discount = ((product.get_regular_price - product.get_sale_price) / product.get_regular_price * 100)|round(0, 'floor') %} - {{ discount }} -

-
- {% endif %} -

- {% endif %} -
- {% endif %} - {# End | Цена для неподписочного товара #} - - {# Start | Кнопка добавить в корзину + варинанты подписки на товар #} -
- {% set collection = fn('wc_get_product_terms', product.id, 'pa_collection') %} - {% if collection %} - {% set siblings = function('get_collection_siblings', collection[0].term_id) %} - {% if siblings %} -
- {% for sibling in siblings %} - {% set weight = function('get_product_info', sibling.ID, 'weight') %} - {% set current_weight = function('get_product_info', product.id, 'weight') %} - {% set class = weight == current_weight ? 'active' : '' %} - - - {{ weight|upper }} - - {% endfor %} - -
- {% endif %} - {% endif %} -
- - {% if product.in_stock %} - - {{ function('do_action', 'woocommerce_' ~ product.get_type() ~ '_add_to_cart') }} - {# Start | Вывод кнопки узнать о поступлении если товара нет в наличии #} - {% else %} -
- -
- {% endif %} - {# End | Вывод кнопки узнать о поступлении если товара нет в наличии #} - {# End | Кнопка добавить в корзину + варинанты подписки на товар #} - - {# Start | Табы с информацией #} -
- - {# Start | Описание товара #} -
-

- {{ function('pll_e', 'ОПИСАНИЕ') }} -

-
-
-

- {{ product.get_description() }} -

-
-
-
- {# End | Описание товара #} - - {# Start | Состав товара #} - {% if product_meta.composition %} -
-

- {{ function('pll_e', 'СОСТАВ') }} -

-
-
-

- {{ product_meta.composition }} -

-
-
-
- {% endif %} - {# End | Состав товара #} - - {# Start | Рекомендации по кормлению #} - {% if product_meta.feeding_recommendations_table %} -
-

- {{ function('pll_e', 'РЕКОМЕНДАЦИИ ПО КОРМЛЕНИЮ') }} -

-
-
- - - - - - - {% if product_meta.feeding_recommendations_table.header is defined %} - - - {% for col in product_meta.feeding_recommendations_table.header %} - - {% endfor %} - - - {% endif %} - - {% for row in product_meta.feeding_recommendations_table.body %} - - {% for cell in row %} - - {% endfor %} - - {% endfor %} - -
{{ col.c }}
-

{{ cell.c }}

-
-
- - - - - {# Старая таблица #} - {#
- {% if product_meta.feeding_recommendations_table.header %} -
-

{{ product_meta.feeding_recommendations_table.header.0 is iterable ? product_meta.feeding_recommendations_table.header.0|join(', ') : product_meta.feeding_recommendations_table.header.0 }}

- {% for row in product_meta.feeding_recommendations_table.body %} -
-

{{ row.0 is iterable ? row.0|join(', ') : row.0 }}

-
-
- {% endfor %} -
-
-

{{ product_meta.feeding_recommendations_table.header.1 is iterable ? product_meta.feeding_recommendations_table.header.1|join(', ') : product_meta.feeding_recommendations_table.header.1 }}

- {% for row in product_meta.feeding_recommendations_table.body %} -
-

{{ row.1 is iterable ? row.1|join(', ') : row.1 }}

-
-
- {% endfor %} -
-
-

{{ product_meta.feeding_recommendations_table.header.2 is iterable ? product_meta.feeding_recommendations_table.header.2|join(', ') : product_meta.feeding_recommendations_table.header.2 }}

- {% for row in product_meta.feeding_recommendations_table.body %} -
-

{{ row.2 is iterable ? row.2|join(', ') : row.2 }}

-
- {% endfor %} -
- {% endif %} -
#} - - -
-
-
- {% elseif product_meta.feeding_recommendations %} -
-

- {{ function('pll_e', 'РЕКОМЕНДАЦИИ ПО КОРМЛЕНИЮ') }} -

-
-
- {{ product_meta.feeding_recommendations }} -
-
-
- {% endif %} - {# End | Рекомендации по кормлению #} - - {% if product_meta.nutritional_value or product_meta.vitamins or product_meta.additives or product_meta.energy_value %} -
-

- {{ function('pll_e', 'ПИЩЕВАЯ ЦЕННОСТЬ') }} -

-
-
- {% if product_meta.nutritional_value and product_meta.vitamins %} -
-
-

{{ function('pll_e', 'ПИЩЕВАЯ ЦЕННОСТЬ') }}

- {{ product_meta.nutritional_value }} -
-
-

{{ function('pll_e', 'ВИТАМИНЫ НА КГ') }}

- {{ product_meta.vitamins }} -
-
- {% endif %} - - {% if product_meta.additives or product_meta.energy_value %} -
- {% if product_meta.additives %} -
-

{{ function('pll_e', 'ПИТАТЕЛЬНЫЕ ДОБАВКИ НА КГ') }}

- {{ product_meta.additives }} -
- {% endif %} - - {% if product_meta.energy_value %} -
-

{{ function('pll_e', 'ЭНЕРГЕТИЧЕСКАЯ ЦЕННОСТЬ НА 100 ГРАММ') }}

-
-
-
-

{{ product_meta.energy_value }}

-
-
-
-
- {% endif %} -
- {% endif %} -
-
-
- {% endif %} -
- {# End | Табы с информацией #} - - {% if product_meta.important %} -
-
-

{{ function('pll_e', 'Важно') }}

-

- {{ product_meta.important }} -

-
-
- {% endif %} -
- -
- {% set recommended_products = function('get_field', 'recommended_products', product.id) %} - {% set related_products = recommended_products ? recommended_products : function('wc_get_related_products', product.id, 4) %} - {% if related_products %} -
-
-
-

- {{ function('pll_e', 'вашему питомцу может понравиться') }} -

- -
- - - -
-
-
- {% for related_product in related_products %} -
- {% set post_id = related_product.ID is defined ? related_product.ID : related_product %} - {% set wc_product = fn('wc_get_product', post_id) %} - {% if wc_product %} - {% include '_blocks/shop/archive-product-tease.twig' with {post: wc_product} %} - {% endif %} -
- {% endfor %} -
-
-
- {% endif %} -
-
- - - - -
+{% set current_path = template_path ~ '/modules/shop/components/single-product' %} +{% set bodyClass = 'bg-white' %} +{% set mainClass = 'wrapper' %} +{% extends 'layout.twig' %} + +{% block content %} +
+ + + + {{ function('pll_e', 'к каталогу') }} + + +
+
+ {% for image in gallery_images %} +
+ {{ image.alt }} +
+ {% endfor %} +
+
+ +
+ + {# Start | Теги = категории #} +
+
+ {% for tag in product_tags %} +
+ {{ tag }} +
+ {% endfor %} + + {% if product_attributes.Flavor is defined and product_attributes.Flavor|length > 0 %} +
+ {{ product_attributes.Flavor[0].name }} +
+ {% endif %} + {% if product_attributes.Вкус is defined and product_attributes.Вкус|length > 0 %} + + {% endif %} + + {% if product_attributes.Тег is defined and product_attributes.Тег|length > 0 %} + + {% endif %} + +
+ {% if product.is_on_sale %} +
+ {{ function('pll_e', 'Распродажа %') }} +
+ {% endif %} +
+ {# End | Теги = категории #} + +

+ {{ product.get_title }} +

+ +
+
+ {% for image in gallery_images %} +
+
+ {{ image.alt }} +
+
+ {% endfor %} +
+
+
+ + {# Start | Цена для неподписочного товара #} + {% if product.get_price %} +
+ {% if is_subscription %} + {% if product.get_regular_price %} +
+

+ {{ product.get_regular_price }} {{ fn('get_woocommerce_currency_symbol') }} +

+

+ {{ ((product.get_regular_price - product.get_price) / product.get_regular_price * 100)|round }} +

+
+ {% else %} + не задана цена по подписке + {% endif %} + {% else %} +

+ {{ product.get_price }} {{ fn('get_woocommerce_currency_symbol') }} + {% if product.is_on_sale %} + +

+

+ {{ product.get_regular_price }} {{ fn('get_woocommerce_currency_symbol') }} +

+

+ {% set discount = ((product.get_regular_price - product.get_sale_price) / product.get_regular_price * 100)|round(0, 'floor') %} + {{ discount }} +

+
+ {% endif %} +

+ {% endif %} +
+ {% endif %} + {# End | Цена для неподписочного товара #} + + {# Start | Кнопка добавить в корзину + варинанты подписки на товар #} +
+ {% set collection = fn('wc_get_product_terms', product.id, 'pa_collection') %} + {% if collection %} + {% set siblings = function('get_collection_siblings', collection[0].term_id) %} + {% if siblings %} +
+ {% for sibling in siblings %} + {% set weight = function('get_product_info', sibling.ID, 'weight') %} + {% set current_weight = function('get_product_info', product.id, 'weight') %} + {% set class = weight == current_weight ? 'active' : '' %} + + + {{ weight|upper }} + + {% endfor %} + +
+ {% endif %} + {% endif %} +
+ + {% if product.in_stock %} + + {{ function('do_action', 'woocommerce_' ~ product.get_type() ~ '_add_to_cart') }} + {# Start | Вывод кнопки узнать о поступлении если товара нет в наличии #} + {% else %} +
+ +
+ {% endif %} + {# End | Вывод кнопки узнать о поступлении если товара нет в наличии #} + {# End | Кнопка добавить в корзину + варинанты подписки на товар #} + + {# Start | Табы с информацией #} +
+ + {# Start | Описание товара #} +
+

+ {{ function('pll_e', 'ОПИСАНИЕ') }} +

+
+
+

+ {{ product.get_description() }} +

+
+
+
+ {# End | Описание товара #} + + {# Start | Состав товара #} + {% if product_meta.composition %} +
+

+ {{ function('pll_e', 'СОСТАВ') }} +

+
+
+

+ {{ product_meta.composition }} +

+
+
+
+ {% endif %} + {# End | Состав товара #} + + {# Start | Рекомендации по кормлению #} + {% if product_meta.feeding_recommendations_table %} +
+

+ {{ function('pll_e', 'РЕКОМЕНДАЦИИ ПО КОРМЛЕНИЮ') }} +

+
+
+ + + + + + + {% if product_meta.feeding_recommendations_table.header is defined %} + + + {% for col in product_meta.feeding_recommendations_table.header %} + + {% endfor %} + + + {% endif %} + + {% for row in product_meta.feeding_recommendations_table.body %} + + {% for cell in row %} + + {% endfor %} + + {% endfor %} + +
{{ col.c }}
+

{{ cell.c }}

+
+
+ + + + + {# Старая таблица #} + {#
+ {% if product_meta.feeding_recommendations_table.header %} +
+

{{ product_meta.feeding_recommendations_table.header.0 is iterable ? product_meta.feeding_recommendations_table.header.0|join(', ') : product_meta.feeding_recommendations_table.header.0 }}

+ {% for row in product_meta.feeding_recommendations_table.body %} +
+

{{ row.0 is iterable ? row.0|join(', ') : row.0 }}

+
+
+ {% endfor %} +
+
+

{{ product_meta.feeding_recommendations_table.header.1 is iterable ? product_meta.feeding_recommendations_table.header.1|join(', ') : product_meta.feeding_recommendations_table.header.1 }}

+ {% for row in product_meta.feeding_recommendations_table.body %} +
+

{{ row.1 is iterable ? row.1|join(', ') : row.1 }}

+
+
+ {% endfor %} +
+
+

{{ product_meta.feeding_recommendations_table.header.2 is iterable ? product_meta.feeding_recommendations_table.header.2|join(', ') : product_meta.feeding_recommendations_table.header.2 }}

+ {% for row in product_meta.feeding_recommendations_table.body %} +
+

{{ row.2 is iterable ? row.2|join(', ') : row.2 }}

+
+ {% endfor %} +
+ {% endif %} +
#} + + +
+
+
+ {% elseif product_meta.feeding_recommendations %} +
+

+ {{ function('pll_e', 'РЕКОМЕНДАЦИИ ПО КОРМЛЕНИЮ') }} +

+
+
+ {{ product_meta.feeding_recommendations }} +
+
+
+ {% endif %} + {# End | Рекомендации по кормлению #} + + {% if product_meta.nutritional_value or product_meta.vitamins or product_meta.additives or product_meta.energy_value %} +
+

+ {{ function('pll_e', 'ПИЩЕВАЯ ЦЕННОСТЬ') }} +

+
+
+ {% if product_meta.nutritional_value and product_meta.vitamins %} +
+
+

{{ function('pll_e', 'ПИЩЕВАЯ ЦЕННОСТЬ') }}

+ {{ product_meta.nutritional_value }} +
+
+

{{ function('pll_e', 'ВИТАМИНЫ НА КГ') }}

+ {{ product_meta.vitamins }} +
+
+ {% endif %} + + {% if product_meta.additives or product_meta.energy_value %} +
+ {% if product_meta.additives %} +
+

{{ function('pll_e', 'ПИТАТЕЛЬНЫЕ ДОБАВКИ НА КГ') }}

+ {{ product_meta.additives }} +
+ {% endif %} + + {% if product_meta.energy_value %} +
+

{{ function('pll_e', 'ЭНЕРГЕТИЧЕСКАЯ ЦЕННОСТЬ НА 100 ГРАММ') }}

+
+
+
+

{{ product_meta.energy_value }}

+
+
+
+
+ {% endif %} +
+ {% endif %} +
+
+
+ {% endif %} +
+ {# End | Табы с информацией #} + + {% if product_meta.important %} +
+
+

{{ function('pll_e', 'Важно') }}

+

+ {{ product_meta.important }} +

+
+
+ {% endif %} +
+ +
+ {% set recommended_products = function('get_field', 'recommended_products', product.id) %} + {% set related_products = recommended_products ? recommended_products : function('wc_get_related_products', product.id, 4) %} + {% if related_products %} +
+
+
+

+ {{ function('pll_e', 'вашему питомцу может понравиться') }} +

+ +
+ + + +
+
+
+ {% for related_product in related_products %} +
+ {% set post_id = related_product.ID is defined ? related_product.ID : related_product %} + {% set wc_product = fn('wc_get_product', post_id) %} + {% if wc_product %} + {% include '_blocks/shop/archive-product-tease.twig' with {post: wc_product} %} + {% endif %} +
+ {% endfor %} +
+
+
+ {% endif %} +
+
+ + + + +
{% endblock %} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/shop/index.php b/wp-content/themes/cosmopet/templates/shop/index.php deleted file mode 100644 index d800886..0000000 --- a/wp-content/themes/cosmopet/templates/shop/index.php +++ /dev/null @@ -1 +0,0 @@ -123 \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/shop/single-product.php b/wp-content/themes/cosmopet/templates/shop/single-product.php deleted file mode 100644 index 59884cb..0000000 --- a/wp-content/themes/cosmopet/templates/shop/single-product.php +++ /dev/null @@ -1,63 +0,0 @@ - '', - 'wrap_before' => '', - 'wrap_after' => '', - 'before' => '', - 'after' => '', - 'home' => _x('Home', 'breadcrumb', 'woocommerce'), - ); - - $breadcrumbs = new WC_Breadcrumb(); - $breadcrumbs->generate(); - - $formatted_breadcrumbs = array(); - foreach ($breadcrumbs->get_breadcrumb() as $crumb) { - $formatted_breadcrumbs[] = array( - 'text' => $crumb[0], - 'url' => $crumb[1] - ); - } - - $context['wc_breadcrumbs'] = $formatted_breadcrumbs; - } - - - $product_id = get_the_ID(); - $product = wc_get_product($product_id); - - $context['product'] = $product; - - $context['related_products'] = array(); - $related_products_ids = wc_get_related_products($product_id, 5); - - if ($related_products_ids) { - foreach ($related_products_ids as $related_id) { - $related_product = wc_get_product($related_id); - if ($related_product) { - $context['related_products'][] = $related_product; - } - } - } - - Timber::render('modules/shop/components/single-product/component-template.twig', $context); -} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/single-product.php b/wp-content/themes/cosmopet/woocommerce/single-product.php deleted file mode 100644 index 16272d7..0000000 --- a/wp-content/themes/cosmopet/woocommerce/single-product.php +++ /dev/null @@ -1,19 +0,0 @@ -