From f062cbf11fac914da6ad1459f8dc1ae2b58918b3 Mon Sep 17 00:00:00 2001 From: maksim Date: Tue, 12 Aug 2025 12:56:09 +0300 Subject: [PATCH] Andrei | wip: refacting module shop --- wp-content/themes/cosmopet/modules/shop/CosmopetProduct.php | 1 + wp-content/themes/cosmopet/woocommerce.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/cosmopet/modules/shop/CosmopetProduct.php b/wp-content/themes/cosmopet/modules/shop/CosmopetProduct.php index 9f2d8f5..c6b198f 100644 --- a/wp-content/themes/cosmopet/modules/shop/CosmopetProduct.php +++ b/wp-content/themes/cosmopet/modules/shop/CosmopetProduct.php @@ -985,6 +985,7 @@ class CosmopetProduct extends TimberProduct { return $attributes; } + // TO_DO: переименовать в getPriceWithCurrency public function getPrice(){ $price = $this->product->get_price() . ' ' . get_woocommerce_currency_symbol(); return $price; diff --git a/wp-content/themes/cosmopet/woocommerce.php b/wp-content/themes/cosmopet/woocommerce.php index d5de513..ad47ba9 100644 --- a/wp-content/themes/cosmopet/woocommerce.php +++ b/wp-content/themes/cosmopet/woocommerce.php @@ -37,9 +37,9 @@ if (is_product()) { } if ($use_new_template) { - include_component('shop', 'product-single--new'); + include_component('shop', 'product-single--new'); // выводим новый шаблон с калькулятором для кормов и лакомств } else { - include_component('shop', 'product-single'); + include_component('shop', 'product-single'); // выводим старый шаблон подробной версии товара для аксессуаров } } elseif (is_shop()) { include_component('shop', 'catalog');