From 5afe066576eb992f7605304d3a5f80e6200e06c9 Mon Sep 17 00:00:00 2001
From: Your Name
Date: Sun, 25 May 2025 20:25:33 +0300
Subject: [PATCH] Feat | profile add subscriptions pages
---
wp-content/themes/cosmopet/functions.php | 121 +-
.../global-functions/multilang-functions.php | 1615 ++++++++++++++++-
.../global-functions/multisite-functions.php | 19 +
.../footer/assets/css/gp-style-desktop.css | 4 +
.../modules/footer/module-controller.php | 2 +-
.../layout/assets/css/gp-style-core.css | 11 +
.../modules/layout/assets/js/gp-cabinet.js | 67 -
.../modules/profile/assets/css/profile.css | 158 +-
.../modules/profile/assets/js/profile.js | 305 +---
.../profile/component-controller.php | 7 +-
.../component-controller.php | 143 ++
.../subscriptions/component-controller.php | 107 ++
.../profile/module-ajax-controller.php | 1 +
.../modules/profile/module-controller.php | 1 +
.../shop/components/cart/assets/js/cart.js | 329 ++--
.../single-product/component-template.twig | 4 +-
wp-content/themes/cosmopet/page.php | 17 +-
.../static/assets/js/telegram-auth.js | 55 +
.../cosmopet/static/front-page/css/style.css | 4 +
.../cosmopet/static/img/pet/mini-cat.png | Bin 0 -> 1872 bytes
.../templates/front-page/front-page.twig | 11 +-
.../themes/cosmopet/templates/pet-card.twig | 2 +-
.../templates/profile/profile-base.twig | 611 +++++++
.../templates/profile/profile-orders.twig | 106 ++
.../profile/profile-subs-single.twig | 133 ++
.../templates/profile/profile-subs.twig | 78 +
.../cosmopet/templates/profile/profile.twig | 432 +----
.../cosmopet/templates/shop/bestsellers.twig | 16 +-
.../archive-product/archive-product.twig | 4 +-
.../myaccount/my-subscriptions.php | 0
30 files changed, 3300 insertions(+), 1063 deletions(-)
delete mode 100644 wp-content/themes/cosmopet/modules/layout/assets/js/gp-cabinet.js
create mode 100644 wp-content/themes/cosmopet/modules/profile/components/subscription_single/component-controller.php
create mode 100644 wp-content/themes/cosmopet/modules/profile/components/subscriptions/component-controller.php
create mode 100644 wp-content/themes/cosmopet/static/assets/js/telegram-auth.js
create mode 100644 wp-content/themes/cosmopet/static/img/pet/mini-cat.png
create mode 100644 wp-content/themes/cosmopet/templates/profile/profile-base.twig
create mode 100644 wp-content/themes/cosmopet/templates/profile/profile-orders.twig
create mode 100644 wp-content/themes/cosmopet/templates/profile/profile-subs-single.twig
create mode 100644 wp-content/themes/cosmopet/templates/profile/profile-subs.twig
create mode 100644 wp-content/themes/cosmopet/woocommerce/myaccount/my-subscriptions.php
diff --git a/wp-content/themes/cosmopet/functions.php b/wp-content/themes/cosmopet/functions.php
index 1cfddf6..b6148f8 100644
--- a/wp-content/themes/cosmopet/functions.php
+++ b/wp-content/themes/cosmopet/functions.php
@@ -1195,25 +1195,7 @@ function remove_woocommerce_styles_on_checkout() {
}
}
-// Отключаем канонические ссылки и hreflang от Yoast SEO
-add_filter('wpseo_canonical', '__return_false');
-add_filter('wpseo_opengraph_url', '__return_false'); // Отключаем OG URL
-add_filter('wpseo_add_x_default_hreflang', '__return_false'); // Отключаем hreflang от Yoast
-add_filter('wpseo_disable_adjacent_rel_links', '__return_true'); // Отключаем соседние rel-ссылки
-
-// Добавляем каноническую ссылку
-add_action('wp_head', 'custom_canonical_url', 5);
-function custom_canonical_url() {
- // Защищаем от дублирования
- static $canonical_added = false;
- if ($canonical_added) {
- return;
- }
- $canonical_added = true;
- $current_url = home_url(add_query_arg('', $_SERVER['REQUEST_URI']));
- echo ' ' . "\n";
-}
// Добавляем hreflang теги для cosmopet.shop
add_action('wp_head', 'custom_hreflang_shop', 6);
@@ -1233,3 +1215,106 @@ function custom_hreflang_shop() {
echo ' ' . "\n";
}
+add_action('wp_head', 'custom_checkout_padding');
+function custom_checkout_padding() {
+ // Проверяем, что это страница Checkout
+ if (is_checkout() && !is_admin()) {
+ ?>
+
+ user_email . time()); // Generate a unique activation key
+ update_field('uuid', $activation_key, 'user_' . get_current_user_id()); // Save the key in user meta
+
+ $activation_link = home_url("/activate/$activation_key");
+
+ if(pll_current_language() === 'ru'){
+ $subject = "Активация аккаунта COSMOPET -".$string;
+ $message = " Остался последний шаг!\n
+Пройдите по ссылке для активации аккаунта:\n
+".$activation_link;
+ } else {
+ $subject = "Account activation COSMOPET -".$string;
+ $message = "Last step!\n
+ Follow the link to activate your account\n
+".$activation_link;
+ }
+
+ wp_mail($user->user_email, $subject, $message);
+}
+
+
+
+add_action('init', 'custom_register_activation_endpoint');
+
+function custom_register_activation_endpoint() {
+ add_rewrite_rule('^activate/([^/]*)/?', 'index.php?activation_key=$matches[1]', 'top');
+ add_rewrite_tag('%activation_key%', '([^&]+)');
+}
+
+
+add_action('template_redirect', 'custom_handle_activation_request');
+
+
+
+add_action('template_redirect', 'custom_handle_activation_request');
+
+function get_user_by_acf_field_value($field_value) {
+ // Prepare the arguments for WP_User_Query
+ $args = array(
+ 'meta_query' => array(
+ array(
+ 'key' => 'uuid', // Change to your ACF field key
+ 'value' => $field_value,
+ 'compare' => '=', // You can use other comparison operators if needed
+ ),
+ ),
+ );
+
+ // Execute the query
+ $user_query = new WP_User_Query($args);
+
+ // Check for results
+ if (!empty($user_query->get_results())) {
+ return $user_query->get_results(); // Returns an array of WP_User objects
+ } else {
+ return null; // No users found
+ }
+}
+
+function custom_handle_activation_request() {
+ if (get_query_var('activation_key')) {
+ $activation_key = sanitize_text_field(get_query_var('activation_key'));
+
+ $users = get_user_by_acf_field_value($activation_key);
+
+ if ($users) {
+ foreach ($users as $user) {
+ $user->set_bio();
+ // delete_user_meta($user->ID, 'uuid'); // Clean up the activation key
+ update_field('uuid', '', 'user_' . $user->ID);
+ update_field('activated', true, 'user_' . $user->ID);
+ wp_set_auth_cookie($user->ID);
+ wp_redirect('/my-account/'); // Redirect to the homepage or a custom page
+ var_dump($user);
+ exit;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/global-functions/multilang-functions.php b/wp-content/themes/cosmopet/global-functions/multilang-functions.php
index 9b8e557..f7ff4b3 100644
--- a/wp-content/themes/cosmopet/global-functions/multilang-functions.php
+++ b/wp-content/themes/cosmopet/global-functions/multilang-functions.php
@@ -1,98 +1,1527 @@
-
скидку!', 'Узнайте о нас больше и получите скидку! ');
- pll_register_string ('Это миф!', 'Это миф!');
- pll_register_string ('Это правда!', 'Это правда!');
- pll_register_string ('Правда', 'Правда');
- pll_register_string ('Миф', 'Миф');
- pll_register_string ('Далее', 'Далее');
- pll_register_string ('ваш результат', 'ваш результат');
- pll_register_string ('Скопировать', 'Скопировать');
- pll_register_string ('Скопировано', 'Скопировано');
- pll_register_string ('В магазин', 'В магазин');
- pll_register_string ('Наш блог', 'Наш блог');
- pll_register_string ('Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных', 'Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных');
- pll_register_string ('ЭТАПЫ ПРОИЗВОД­СТВА', 'ЭТАПЫ ПРОИЗВОД­СТВА');
- pll_register_string ('Этапы производс­тва корма', 'Этапы производс­тва корма');
- pll_register_string ('Все статьи', 'Все статьи');
- pll_register_string ('Узнать больше', 'Узнать больше');
- pll_register_string ('Продукция', 'Продукция');
- pll_register_string ('Фильтры', 'Фильтры');
- pll_register_string ('Новинка', 'Новинка');
- pll_register_string ('Распродажа %', 'Распродажа %');
- pll_register_string ('Купить', 'Купить');
- pll_register_string ('Подробнее', 'Подробнее');
- pll_register_string ('Объем', 'Объем');
- pll_register_string ('Количество', 'Количество');
- pll_register_string ('Добавить в корзину', 'Добавить в корзину');
- pll_register_string ('Применить', 'Применить');
- pll_register_string ('Сбросить фильтры', 'Сбросить фильтры');
- pll_register_string('cosmopet_bestsellers_title', 'BESTSELLERS', 'CosmoPet Theme Bestsellers');
- pll_register_string('cosmopet_previous_products', 'Previous products', 'CosmoPet Theme Bestsellers');
- pll_register_string('cosmopet_next_products', 'Next products', 'CosmoPet Theme Bestsellers');
- pll_register_string('cosmopet_view_product', 'View product:', 'CosmoPet Theme Bestsellers');
- pll_register_string('cosmopet_product_image', 'Product image:', 'CosmoPet Theme Bestsellers');
- pll_register_string('cosmopet_buy_button', 'Buy', 'CosmoPet Theme Bestsellers');
- pll_register_string('cosmopet_all_products', 'All products', 'CosmoPet Theme Bestsellers');
- pll_register_string('cosmopet_no_products', 'No bestsellers found', 'CosmoPet Theme Bestsellers');
- pll_register_string('cosmopet_back_to_catalog', 'к каталогу', 'Product Detail');
- pll_register_string('cosmopet_sale_tag', 'Распродажа %', 'Product Detail');
- pll_register_string('cosmopet_add_to_cart', 'Добавить в корзину', 'Product Detail');
- pll_register_string('cosmopet_description', 'ОПИСАНИЕ', 'Product Detail');
- pll_register_string('cosmopet_composition', 'СОСТАВ', 'Product Detail');
- pll_register_string('cosmopet_feeding_recommendations', 'РЕКОМЕНДАЦИИ ПО КОРМЛЕНИЮ', 'Product Detail');
- pll_register_string('cosmopet_nutritional_value', 'ПИЩЕВАЯ ЦЕННОСТЬ', 'Product Detail');
- pll_register_string('cosmopet_vitamins_per_kg', 'ВИТАМИНЫ НА КГ', 'Product Detail');
- pll_register_string('cosmopet_nutritional_additives_per_kg', 'ПИТАТЕЛЬНЫЕ ДОБАВКИ НА КГ', 'Product Detail');
- pll_register_string('cosmopet_energy_value_per_100g', 'ЭНЕРГЕТИЧЕСКАЯ ЦЕННОСТЬ НА 100 ГРАММ', 'Product Detail');
- pll_register_string('cosmopet_important', 'Важно', 'Product Detail');
- pll_register_string('cosmopet_you_may_also_like', 'вашему питомцу может понравиться', 'Product Detail');
- pll_register_string('cosmopet_new_product', 'Новинка', 'Product Detail');
- pll_register_string('cosmopet_buy', 'Купить', 'Product Detail');
- pll_register_string('cosmopet_volume', 'Объем', 'Product Detail');
- pll_register_string('cosmopet_quantity', 'Количество', 'Product Detail');
- pll_register_string('cosmopet_details', 'Подробнее', 'Product Detail');
+add_action('init', function () {
+ if (function_exists('pll_register_string')) {
+ // Массив строк с переводами
+ $strings = [
+ [
+ 'name' => 'Темы',
+ 'string' => 'Темы',
+ 'translations' => [
+ 'ru' => 'Темы',
+ 'en' => 'Topics',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'САМЫЕ ЧИТАЕМЫЕ',
+ 'string' => 'САМЫЕ ЧИТАЕМЫЕ',
+ 'translations' => [
+ 'ru' => 'САМЫЕ ЧИТАЕМЫЕ',
+ 'en' => 'MOST READ',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'время чтения',
+ 'string' => 'время чтения',
+ 'translations' => [
+ 'ru' => 'время чтения',
+ 'en' => 'reading time',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'ВСЕ СТАТЬИ',
+ 'string' => 'ВСЕ СТАТЬИ',
+ 'translations' => [
+ 'ru' => 'ВСЕ СТАТЬИ',
+ 'en' => 'ALL ARTICLES',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'ПРЕДЛОЖИТЕ СТАТЬЮ ИЛИ СТАНЬТЕ АВТОРОМ',
+ 'string' => 'ПРЕДЛОЖИТЕ СТАТЬЮ ИЛИ СТАНЬТЕ АВТОРОМ',
+ 'translations' => [
+ 'ru' => 'ПРЕДЛОЖИТЕ СТАТЬЮ ИЛИ СТАНЬТЕ АВТОРОМ',
+ 'en' => 'SUGGEST AN ARTICLE OR BECOME AN AUTHOR',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'НАПИШИТЕ НАМ',
+ 'string' => 'НАПИШИТЕ НАМ',
+ 'translations' => [
+ 'ru' => 'НАПИШИТЕ НАМ',
+ 'en' => 'WRITE TO US',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'COSMO тема редакции',
+ 'string' => 'COSMO тема редакции',
+ 'translations' => [
+ 'ru' => 'COSMO тема редакции',
+ 'en' => 'COSMO editor\'s choice',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'мин.',
+ 'string' => 'мин.',
+ 'translations' => [
+ 'ru' => 'мин.',
+ 'en' => 'min.',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Форма обратной связи',
+ 'string' => 'Форма обратной связи',
+ 'translations' => [
+ 'ru' => 'Форма обратной связи',
+ 'en' => 'Contact Form',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Ваше имя',
+ 'string' => 'Ваше имя',
+ 'translations' => [
+ 'ru' => 'Ваше имя',
+ 'en' => 'Your name',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Эл.почта',
+ 'string' => 'Эл.почта',
+ 'translations' => [
+ 'ru' => 'Эл.почта',
+ 'en' => 'Email',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Текст обращения',
+ 'string' => 'Текст обращения',
+ 'translations' => [
+ 'ru' => 'Текст обращения',
+ 'en' => 'Message text',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Отправить',
+ 'string' => 'Отправить',
+ 'translations' => [
+ 'ru' => 'Отправить',
+ 'en' => 'Send',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Чат бот с ветеринаром',
+ 'string' => 'Чат бот с ветеринаром',
+ 'translations' => [
+ 'ru' => 'Чат бот с ветеринаром',
+ 'en' => 'Chatbot with a veterinarian',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'К клькулятор рациона',
+ 'string' => 'Калькулятор рациона',
+ 'translations' => [
+ 'ru' => 'Калькулятор рациона',
+ 'en' => 'Diet Calculator',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'ПОКАЗАТЬ ЕЩЁ',
+ 'string' => 'ПОКАЗАТЬ ЕЩЁ',
+ 'translations' => [
+ 'ru' => 'ПОКАЗАТЬ ЕЩЁ',
+ 'en' => 'SHOW MORE',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'ВСЕ',
+ 'string' => 'ВСЕ',
+ 'translations' => [
+ 'ru' => 'ВСЕ',
+ 'en' => 'ALL',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'читать статью',
+ 'string' => 'читать статью',
+ 'translations' => [
+ 'ru' => 'читать статью',
+ 'en' => 'read article',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Блог',
+ 'string' => 'Блог',
+ 'translations' => [
+ 'ru' => 'Блог',
+ 'en' => 'Blog',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Главная',
+ 'string' => 'Главная',
+ 'translations' => [
+ 'ru' => 'Главная',
+ 'en' => 'Home',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Подпишитесь, чтобы быть в курсе деятельности Cosmopet и узнавать о наших, предложениях. Обещаем не заваливать вас бесполезными письмами. А за подписку дарим -25% на весь ассортимент нашей продукции',
+ 'string' => 'Подпишитесь, чтобы быть в курсе деятельности Cosmopet и узнавать о наших, предложениях. Обещаем не заваливать вас бесполезными письмами. А за подписку дарим -25% на весь ассортимент нашей продукции',
+ 'translations' => [
+ 'ru' => 'Подпишитесь, чтобы быть в курсе деятельности Cosmopet и узнавать о наших, предложениях. Обещаем не заваливать вас бесполезными письмами. А за подписку дарим -25% на весь ассортимент нашей продукции',
+ 'en' => 'Subscribe to stay updated on Cosmopet activities and learn about our offers. We promise not to spam you with useless emails. And for subscribing, we offer a -25% discount on our entire product range',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Подписываясь на рассылку, я даю согласие на обработку персональных данных, на получение рекламных сообщений и новостей о товарах и услугах',
+ 'string' => 'Подписываясь на рассылку, я даю согласие на обработку персональных данных, на получение рекламных сообщений и новостей о товарах и услугах',
+ 'translations' => [
+ 'ru' => 'Подписываясь на рассылку, я даю согласие на обработку персональных данных, на получение рекламных сообщений и новостей о товарах и услугах',
+ 'en' => 'By subscribing to the newsletter, I consent to the processing of personal data and receiving promotional messages and news about products and services',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'подписаться',
+ 'string' => 'подписаться',
+ 'translations' => [
+ 'ru' => 'подписаться',
+ 'en' => 'subscribe',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Узнайте о нас больше и получите скидку! ',
+ 'string' => 'Узнайте о нас больше и получите скидку! ',
+ 'translations' => [
+ 'ru' => 'Узнайте о нас больше и получите скидку! ',
+ 'en' => 'Learn more about us and get a discount! ',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Это миф!',
+ 'string' => 'Это миф!',
+ 'translations' => [
+ 'ru' => 'Это миф!',
+ 'en' => 'It\'s a myth!',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Это правда!',
+ 'string' => 'Это правда!',
+ 'translations' => [
+ 'ru' => 'Это правда!',
+ 'en' => 'It\'s true!',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Правда',
+ 'string' => 'Правда',
+ 'translations' => [
+ 'ru' => 'Правда',
+ 'en' => 'True',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Миф',
+ 'string' => 'Миф',
+ 'translations' => [
+ 'ru' => 'Миф',
+ 'en' => 'Myth',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Далее',
+ 'string' => 'Далее',
+ 'translations' => [
+ 'ru' => 'Далее',
+ 'en' => 'Next',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'ваш результат',
+ 'string' => 'ваш результат',
+ 'translations' => [
+ 'ru' => 'ваш результат',
+ 'en' => 'your result',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Скопировать',
+ 'string' => 'Скопировать',
+ 'translations' => [
+ 'ru' => 'Скопировать',
+ 'en' => 'Copy',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Скопировано',
+ 'string' => 'Скопировано',
+ 'translations' => [
+ 'ru' => 'Скопировано',
+ 'en' => 'Copied',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'В магазин',
+ 'string' => 'В магазин',
+ 'translations' => [
+ 'ru' => 'В магазин',
+ 'en' => 'To the store',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Наш блог',
+ 'string' => 'Наш блог',
+ 'translations' => [
+ 'ru' => 'Наш блог',
+ 'en' => 'Our blog',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных',
+ 'string' => 'Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных',
+ 'translations' => [
+ 'ru' => 'Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных',
+ 'en' => 'News on the pet food and ecology market, helpful articles on pet health',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'ЭТАПЫ ПРОИЗВОДСТВА',
+ 'string' => 'ЭТАПЫ ПРОИЗВОДСТВА',
+ 'translations' => [
+ 'ru' => 'ЭТАПЫ ПРОИЗВОДСТВА',
+ 'en' => 'PRODUCTION STAGES',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Этапы производства корма',
+ 'string' => 'Этапы производства корма',
+ 'translations' => [
+ 'ru' => 'Этапы производства корма',
+ 'en' => 'Pet food production stages',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Все статьи',
+ 'string' => 'Все статьи',
+ 'translations' => [
+ 'ru' => 'Все статьи',
+ 'en' => 'All articles',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Узнать больше',
+ 'string' => 'Узнать больше',
+ 'translations' => [
+ 'ru' => 'Узнать больше',
+ 'en' => 'Learn more',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Продукция',
+ 'string' => 'Продукция',
+ 'translations' => [
+ 'ru' => 'Продукция',
+ 'en' => 'Products',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Фильтры',
+ 'string' => 'Фильтры',
+ 'translations' => [
+ 'ru' => 'Фильтры',
+ 'en' => 'Filters',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Новинка',
+ 'string' => 'Новинка',
+ 'translations' => [
+ 'ru' => 'Новинка',
+ 'en' => 'New',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Распродажа %',
+ 'string' => 'Распродажа %',
+ 'translations' => [
+ 'ru' => 'Распродажа %',
+ 'en' => 'Sale %',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Купить',
+ 'string' => 'Купить',
+ 'translations' => [
+ 'ru' => 'Купить',
+ 'en' => 'Buy',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Подробнее',
+ 'string' => 'Подробнее',
+ 'translations' => [
+ 'ru' => 'Подробнее',
+ 'en' => 'Details',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Объем',
+ 'string' => 'Объем',
+ 'translations' => [
+ 'ru' => 'Объем',
+ 'en' => 'Volume',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Количество',
+ 'string' => 'Количество',
+ 'translations' => [
+ 'ru' => 'Количество',
+ 'en' => 'Quantity',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Добавить в корзину',
+ 'string' => 'Добавить в корзину',
+ 'translations' => [
+ 'ru' => 'Добавить в корзину',
+ 'en' => 'Add to cart',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Применить',
+ 'string' => 'Применить',
+ 'translations' => [
+ 'ru' => 'Применить',
+ 'en' => 'Apply',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Сбросить фильтры',
+ 'string' => 'Сбросить фильтры',
+ 'translations' => [
+ 'ru' => 'Сбросить фильтры',
+ 'en' => 'Reset filters',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'cosmopet_bestsellers_title',
+ 'string' => 'BESTSELLERS',
+ 'translations' => [
+ 'ru' => 'БЕСТСЕЛЛЕРЫ',
+ 'en' => 'BESTSELLERS',
+ ],
+ 'group' => 'CosmoPet Theme Bestsellers',
+ ],
+ [
+ 'name' => 'cosmopet_previous_products',
+ 'string' => 'Previous products',
+ 'translations' => [
+ 'ru' => 'Предыдущие товары',
+ 'en' => 'Previous products',
+ ],
+ 'group' => 'CosmoPet Theme Bestsellers',
+ ],
+ [
+ 'name' => 'cosmopet_next_products',
+ 'string' => 'Next products',
+ 'translations' => [
+ 'ru' => 'Следующие товары',
+ 'en' => 'Next products',
+ ],
+ 'group' => 'CosmoPet Theme Bestsellers',
+ ],
+ [
+ 'name' => 'cosmopet_view_product',
+ 'string' => 'View product:',
+ 'translations' => [
+ 'ru' => 'Посмотреть товар:',
+ 'en' => 'View product:',
+ ],
+ 'group' => 'CosmoPet Theme Bestsellers',
+ ],
+ [
+ 'name' => 'cosmopet_product_image',
+ 'string' => 'Product image:',
+ 'translations' => [
+ 'ru' => 'Изображение товара:',
+ 'en' => 'Product image:',
+ ],
+ 'group' => 'CosmoPet Theme Bestsellers',
+ ],
+ [
+ 'name' => 'cosmopet_buy_button',
+ 'string' => 'Buy',
+ 'translations' => [
+ 'ru' => 'Купить',
+ 'en' => 'Buy',
+ ],
+ 'group' => 'CosmoPet Theme Bestsellers',
+ ],
+ [
+ 'name' => 'cosmopet_all_products',
+ 'string' => 'All products',
+ 'translations' => [
+ 'ru' => 'Все товары',
+ 'en' => 'All products',
+ ],
+ 'group' => 'CosmoPet Theme Bestsellers',
+ ],
+ [
+ 'name' => 'cosmopet_no_products',
+ 'string' => 'No bestsellers found',
+ 'translations' => [
+ 'ru' => 'Бестселлеры не найдены',
+ 'en' => 'No bestsellers found',
+ ],
+ 'group' => 'CosmoPet Theme Bestsellers',
+ ],
+ [
+ 'name' => 'cosmopet_back_to_catalog',
+ 'string' => 'к каталогу',
+ 'translations' => [
+ 'ru' => 'к каталогу',
+ 'en' => 'to catalog',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_sale_tag',
+ 'string' => 'Распродажа %',
+ 'translations' => [
+ 'ru' => 'Распродажа %',
+ 'en' => 'Sale %',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_add_to_cart',
+ 'string' => 'Добавить в корзину',
+ 'translations' => [
+ 'ru' => 'Добавить в корзину',
+ 'en' => 'Add to cart',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_description',
+ 'string' => 'ОПИСАНИЕ',
+ 'translations' => [
+ 'ru' => 'ОПИСАНИЕ',
+ 'en' => 'DESCRIPTION',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_composition',
+ 'string' => 'СОСТАВ',
+ 'translations' => [
+ 'ru' => 'СОСТАВ',
+ 'en' => 'COMPOSITION',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_feeding_recommendations',
+ 'string' => 'РЕКОМЕНДАЦИИ ПО КОРМЛЕНИЮ',
+ 'translations' => [
+ 'ru' => 'РЕКОМЕНДАЦИИ ПО КОРМЛЕНИЮ',
+ 'en' => 'FEEDING RECOMMENDATIONS',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_nutritional_value',
+ 'string' => 'ПИЩЕВАЯ ЦЕННОСТЬ',
+ 'translations' => [
+ 'ru' => 'ПИЩЕВАЯ ЦЕННОСТЬ',
+ 'en' => 'NUTRITIONAL VALUE',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_vitamins_per_kg',
+ 'string' => 'ВИТАМИНЫ НА КГ',
+ 'translations' => [
+ 'ru' => 'ВИТАМИНЫ НА КГ',
+ 'en' => 'VITAMINS PER KG',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_nutritional_additives_per_kg',
+ 'string' => 'ПИТАТЕЛЬНЫЕ ДОБАВКИ НА КГ',
+ 'translations' => [
+ 'ru' => 'ПИТАТЕЛЬНЫЕ ДОБАВКИ НА КГ',
+ 'en' => 'NUTRITIONAL ADDITIVES PER KG',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_energy_value_per_100g',
+ 'string' => 'ЭНЕРГЕТИЧЕСКАЯ ЦЕННОСТЬ НА 100 ГРАММ',
+ 'translations' => [
+ 'ru' => 'ЭНЕРГЕТИЧЕСКАЯ ЦЕННОСТЬ НА 100 ГРАММ',
+ 'en' => 'ENERGY VALUE PER 100 GRAMS',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_important',
+ 'string' => 'Важно',
+ 'translations' => [
+ 'ru' => 'Важно',
+ 'en' => 'Important',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_you_may_also_like',
+ 'string' => 'вашему питомцу может понравиться',
+ 'translations' => [
+ 'ru' => 'вашему питомцу может понравиться',
+ 'en' => 'your pet may like',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_new_product',
+ 'string' => 'Новинка',
+ 'translations' => [
+ 'ru' => 'Новинка',
+ 'en' => 'New',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_buy',
+ 'string' => 'Купить',
+ 'translations' => [
+ 'ru' => 'Купить',
+ 'en' => 'Buy',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_volume',
+ 'string' => 'Объем',
+ 'translations' => [
+ 'ru' => 'Объем',
+ 'en' => 'Volume',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_quantity',
+ 'string' => 'Количество',
+ 'translations' => [
+ 'ru' => 'Количество',
+ 'en' => 'Quantity',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'cosmopet_details',
+ 'string' => 'Подробнее',
+ 'translations' => [
+ 'ru' => 'Подробнее',
+ 'en' => 'Details',
+ ],
+ 'group' => 'Product Detail',
+ ],
+ [
+ 'name' => 'reviews_title',
+ 'string' => 'Customer Reviews',
+ 'translations' => [
+ 'ru' => 'Отзывы клиентов',
+ 'en' => 'Customer Reviews',
+ ],
+ 'group' => 'Reviews Section',
+ ],
+ [
+ 'name' => 'show_more',
+ 'string' => 'Show more',
+ 'translations' => [
+ 'ru' => 'Показать больше',
+ 'en' => 'Show more',
+ ],
+ 'group' => 'Reviews Section',
+ ],
+ [
+ 'name' => 'default_reviewer_name',
+ 'string' => 'Anastasia',
+ 'translations' => [
+ 'ru' => 'Анастасия',
+ 'en' => 'Anastasia',
+ ],
+ 'group' => 'Reviews Section',
+ ],
+ [
+ 'name' => 'default_reviewer_role',
+ 'string' => 'dog owner',
+ 'translations' => [
+ 'ru' => 'владелец собаки',
+ 'en' => 'dog owner',
+ ],
+ 'group' => 'Reviews Section',
+ ],
+ [
+ 'name' => 'default_review_excerpt',
+ 'string' => 'Just wanted to say thank you - your treats are amazing!',
+ 'translations' => [
+ 'ru' => 'Хочу сказать спасибо - ваши лакомства потрясающие!',
+ 'en' => 'Just wanted to say thank you - your treats are amazing!',
+ ],
+ 'group' => 'Reviews Section',
+ ],
+ [
+ 'name' => 'default_review_full_1',
+ 'string' => 'She loves the lamb one - tasty, safe, and it even works great as a dental treat!',
+ 'translations' => [
+ 'ru' => 'Ей очень нравится с ягненком - вкусно, безопасно, и даже отлично подходит как лакомство для зубов!',
+ 'en' => 'She loves the lamb one - tasty, safe, and it even works great as a dental treat!',
+ ],
+ 'group' => 'Reviews Section',
+ ],
+ [
+ 'name' => 'default_review_full_2',
+ 'string' => 'And the salmon sandwich in the tube is our go-to. We never leave the house without it. Perfect for walks and training!',
+ 'translations' => [
+ 'ru' => 'А сэндвич с лососем в тюбике - наш фаворит. Мы не выходим из дома без него. Идеально для прогулок и тренировок!',
+ 'en' => 'And the salmon sandwich in the tube is our go-to. We never leave the house without it. Perfect for walks and training!',
+ ],
+ 'group' => 'Reviews Section',
+ ],
+ [
+ 'name' => 'default_review_full_3',
+ 'string' => 'So glad we found you!',
+ 'translations' => [
+ 'ru' => 'Так рады, что нашли вас!',
+ 'en' => 'So glad we found you!',
+ ],
+ 'group' => 'Reviews Section',
+ ],
+ [
+ 'name' => 'ВАША ЗАЯВКА ПРИНЯТА!',
+ 'string' => 'ВАША ЗАЯВКА ПРИНЯТА!',
+ 'translations' => [
+ 'ru' => 'ВАША ЗАЯВКА ПРИНЯТА!',
+ 'en' => 'YOUR REQUEST HAS BEEN RECEIVED!',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Спасибо! Сообщение успешно отправлено.',
+ 'string' => 'Спасибо! Сообщение успешно отправлено.',
+ 'translations' => [
+ 'ru' => 'Спасибо! Сообщение успешно отправлено.',
+ 'en' => 'Thank you! The message has been successfully sent.',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Наш менеджер скоро свяжемся с вами для уточнения деталей.',
+ 'string' => 'Наш менеджер скоро свяжемся с вами для уточнения деталей.',
+ 'translations' => [
+ 'ru' => 'Наш менеджер скоро свяжемся с вами для уточнения деталей.',
+ 'en' => 'Our manager will contact you soon to clarify the details.',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Вернуться на сайт',
+ 'string' => 'Вернуться на сайт',
+ 'translations' => [
+ 'ru' => 'Вернуться на сайт',
+ 'en' => 'Return to the site',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Link email',
+ 'string' => 'Link email',
+ 'translations' => [
+ 'ru' => 'Привязать email',
+ 'en' => 'Link email',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Linked accounts',
+ 'string' => 'Linked accounts',
+ 'translations' => [
+ 'ru' => 'Привязанные аккаунты',
+ 'en' => 'Linked accounts',
+ ],
+ 'group' => 'General',
+ ],
+ [
+ 'name' => 'Добавить питомца',
+ 'string' => 'Добавить питомца',
+ 'translations' => [
+ 'ru' => 'Добавить питомца',
+ 'en' => 'Add a pet',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Вид животного',
+ 'string' => 'Вид животного',
+ 'translations' => [
+ 'ru' => 'Вид животного',
+ 'en' => 'Type of animal',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Кошка',
+ 'string' => 'Кошка',
+ 'translations' => [
+ 'ru' => 'Кошка',
+ 'en' => 'Cat',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Собака',
+ 'string' => 'Собака',
+ 'translations' => [
+ 'ru' => 'Собака',
+ 'en' => 'Dog',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Стерелизован',
+ 'string' => 'Стерелизован',
+ 'translations' => [
+ 'ru' => 'Стерелизован',
+ 'en' => 'Sterilized',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Да',
+ 'string' => 'Да',
+ 'translations' => [
+ 'ru' => 'Да',
+ 'en' => 'Yes',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Нет',
+ 'string' => 'Нет',
+ 'translations' => [
+ 'ru' => 'Нет',
+ 'en' => 'No',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Имя',
+ 'string' => 'Имя',
+ 'translations' => [
+ 'ru' => 'Имя',
+ 'en' => 'Name',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Имя питомца',
+ 'string' => 'Имя питомца',
+ 'translations' => [
+ 'ru' => 'Имя питомца',
+ 'en' => 'Pet name',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Порода',
+ 'string' => 'Порода',
+ 'translations' => [
+ 'ru' => 'Порода',
+ 'en' => 'Breed',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Порода вашего питомца',
+ 'string' => 'Порода вашего питомца',
+ 'translations' => [
+ 'ru' => 'Порода вашего питомца',
+ 'en' => 'Your pet\'s breed',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Пол вашего питомца',
+ 'string' => 'Пол вашего питомца',
+ 'translations' => [
+ 'ru' => 'Пол вашего питомца',
+ 'en' => 'Your pet\'s gender',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Мальчик',
+ 'string' => 'Мальчик',
+ 'translations' => [
+ 'ru' => 'Мальчик',
+ 'en' => 'Male',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Девочка',
+ 'string' => 'Девочка',
+ 'translations' => [
+ 'ru' => 'Девочка',
+ 'en' => 'Female',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Вид активности',
+ 'string' => 'Вид активности',
+ 'translations' => [
+ 'ru' => 'Вид активности',
+ 'en' => 'Activity level',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Выберите из списка',
+ 'string' => 'Выберите из списка',
+ 'translations' => [
+ 'ru' => 'Выберите из списка',
+ 'en' => 'Select from list',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Низкая',
+ 'string' => 'Низкая',
+ 'translations' => [
+ 'ru' => 'Низкая',
+ 'en' => 'Low',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Средняя',
+ 'string' => 'Средняя',
+ 'translations' => [
+ 'ru' => 'Средняя',
+ 'en' => 'Moderate',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Высокая',
+ 'string' => 'Высокая',
+ 'translations' => [
+ 'ru' => 'Высокая',
+ 'en' => 'High',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Вес',
+ 'string' => 'Вес',
+ 'translations' => [
+ 'ru' => 'Вес',
+ 'en' => 'Weight',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '1-1.5 кг',
+ 'string' => '1-1.5 кг',
+ 'translations' => [
+ 'ru' => '1-1.5 кг',
+ 'en' => '1-1.5 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '1.5-3 кг',
+ 'string' => '1.5-3 кг',
+ 'translations' => [
+ 'ru' => '1.5-3 кг',
+ 'en' => '1.5-3 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '3-5 кг',
+ 'string' => '3-5 кг',
+ 'translations' => [
+ 'ru' => '3-5 кг',
+ 'en' => '3-5 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '5-8 кг',
+ 'string' => '5-8 кг',
+ 'translations' => [
+ 'ru' => '5-8 кг',
+ 'en' => '5-8 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '8-11 кг',
+ 'string' => '8-11 кг',
+ 'translations' => [
+ 'ru' => '8-11 кг',
+ 'en' => '8-11 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '11-15 кг',
+ 'string' => '11-15 кг',
+ 'translations' => [
+ 'ru' => '11-15 кг',
+ 'en' => '11-15 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '10-20кг',
+ 'string' => '10-20кг',
+ 'translations' => [
+ 'ru' => '10-20кг',
+ 'en' => '10-20 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '20-25кг',
+ 'string' => '20-25кг',
+ 'translations' => [
+ 'ru' => '20-25кг',
+ 'en' => '20-25 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '25-35 кг',
+ 'string' => '25-35 кг',
+ 'translations' => [
+ 'ru' => '25-35 кг',
+ 'en' => '25-35 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Более 35 кг',
+ 'string' => 'Более 35 кг',
+ 'translations' => [
+ 'ru' => 'Более 35 кг',
+ 'en' => 'More than 35 kg',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Возраст питомца',
+ 'string' => 'Возраст питомца',
+ 'translations' => [
+ 'ru' => 'Возраст питомца',
+ 'en' => 'Pet age',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Примерный',
+ 'string' => 'Примерный',
+ 'translations' => [
+ 'ru' => 'Примерный',
+ 'en' => 'Approximate',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Точный',
+ 'string' => 'Точный',
+ 'translations' => [
+ 'ru' => 'Точный',
+ 'en' => 'Exact',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Малыш',
+ 'string' => 'Малыш',
+ 'translations' => [
+ 'ru' => 'Малыш',
+ 'en' => 'Baby',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '(от 0 до 1 года)',
+ 'string' => '(от 0 до 1 года)',
+ 'translations' => [
+ 'ru' => '(от 0 до 1 года)',
+ 'en' => '(from 0 to 1 year)',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Взрослый',
+ 'string' => 'Взрослый',
+ 'translations' => [
+ 'ru' => 'Взрослый',
+ 'en' => 'Adult',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '(от 1 года до 7 лет)',
+ 'string' => '(от 1 года до 7 лет)',
+ 'translations' => [
+ 'ru' => '(от 1 года до 7 лет)',
+ 'en' => '(from 1 to 7 years)',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Пожилой',
+ 'string' => 'Пожилой',
+ 'translations' => [
+ 'ru' => 'Пожилой',
+ 'en' => 'Senior',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '(от 7 до 12 лет)',
+ 'string' => '(от 7 до 12 лет)',
+ 'translations' => [
+ 'ru' => '(от 7 до 12 лет)',
+ 'en' => '(from 7 to 12 years)',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Стареющий',
+ 'string' => 'Стареющий',
+ 'translations' => [
+ 'ru' => 'Стареющий',
+ 'en' => 'Aging',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => '(от 12 лет и старше)',
+ 'string' => '(от 12 лет и старше)',
+ 'translations' => [
+ 'ru' => '(от 12 лет и старше)',
+ 'en' => '(12 years and older)',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'День',
+ 'string' => 'День',
+ 'translations' => [
+ 'ru' => 'День',
+ 'en' => 'Day',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'ДД',
+ 'string' => 'ДД',
+ 'translations' => [
+ 'ru' => 'ДД',
+ 'en' => 'DD',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Месяц',
+ 'string' => 'Месяц',
+ 'translations' => [
+ 'ru' => 'Месяц',
+ 'en' => 'Month',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Январь',
+ 'string' => 'Январь',
+ 'translations' => [
+ 'ru' => 'Январь',
+ 'en' => 'January',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Февраль',
+ 'string' => 'Февраль',
+ 'translations' => [
+ 'ru' => 'Февраль',
+ 'en' => 'February',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Март',
+ 'string' => 'Март',
+ 'translations' => [
+ 'ru' => 'Март',
+ 'en' => 'March',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Апрель',
+ 'string' => 'Апрель',
+ 'translations' => [
+ 'ru' => 'Апрель',
+ 'en' => 'April',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Май',
+ 'string' => 'Май',
+ 'translations' => [
+ 'ru' => 'Май',
+ 'en' => 'May',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Июнь',
+ 'string' => 'Июнь',
+ 'translations' => [
+ 'ru' => 'Июнь',
+ 'en' => 'June',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Июль',
+ 'string' => 'Июль',
+ 'translations' => [
+ 'ru' => 'Июль',
+ 'en' => 'July',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Август',
+ 'string' => 'Август',
+ 'translations' => [
+ 'ru' => 'Август',
+ 'en' => 'August',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Сентябрь',
+ 'string' => 'Сентябрь',
+ 'translations' => [
+ 'ru' => 'Сентябрь',
+ 'en' => 'September',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Октябрь',
+ 'string' => 'Октябрь',
+ 'translations' => [
+ 'ru' => 'Октябрь',
+ 'en' => 'October',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Ноябрь',
+ 'string' => 'Ноябрь',
+ 'translations' => [
+ 'ru' => 'Ноябрь',
+ 'en' => 'November',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Декабрь',
+ 'string' => 'Декабрь',
+ 'translations' => [
+ 'ru' => 'Декабрь',
+ 'en' => 'December',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Год',
+ 'string' => 'Год',
+ 'translations' => [
+ 'ru' => 'Год',
+ 'en' => 'Year',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'ГГГГ',
+ 'string' => 'ГГГГ',
+ 'translations' => [
+ 'ru' => 'ГГГГ',
+ 'en' => 'YYYY',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Добавить',
+ 'string' => 'Добавить',
+ 'translations' => [
+ 'ru' => 'Добавить',
+ 'en' => 'Add',
+ ],
+ 'group' => 'Pet Form',
+ ],
+ [
+ 'name' => 'Подписка на корм',
+ 'string' => 'Подписка на корм',
+ 'translations' => [
+ 'ru' => 'Подписка на корм',
+ 'en' => 'Feed Subscription',
+ ],
+ 'group' => 'Subscription Form',
+ ],
+ [
+ 'name' => 'Спасибо за интерес к нашему новому виду услуг, данная функция находится в разработке, если вы хотите узнать первыми о запуске подпишитесь на рассылку.',
+ 'string' => 'Спасибо за интерес к нашему новому виду услуг, данная функция находится в разработке, если вы хотите узнать первыми о запуске подпишитесь на рассылку.',
+ 'translations' => [
+ 'ru' => 'Спасибо за интерес к нашему новому виду услуг, данная функция находится в разработке, если вы хотите узнать первыми о запуске подпишитесь на рассылку.',
+ 'en' => 'Thank you for your interest in our new service. This feature is under development; subscribe to our newsletter to be the first to know about its launch.',
+ ],
+ 'group' => 'Subscription Form',
+ ],
+ [
+ 'name' => 'Хочу попробовать первым!',
+ 'string' => 'Хочу попробовать первым!',
+ 'translations' => [
+ 'ru' => 'Хочу попробовать первым!',
+ 'en' => 'I want to try it first!',
+ ],
+ 'group' => 'Subscription Form',
+ ],
+ [
+ 'name' => 'Хочу быть первым!',
+ 'string' => 'Хочу быть первым!',
+ 'translations' => [
+ 'ru' => 'Хочу быть первым!',
+ 'en' => 'I want to be the first!',
+ ],
+ 'group' => 'Subscription Form',
+ ],
- pll_register_string('reviews_title', 'Customer Reviews', 'Reviews Section');
- pll_register_string('show_more', 'Show more', 'Reviews Section');
- pll_register_string('default_reviewer_name', 'Anastasia', 'Reviews Section');
- pll_register_string('default_reviewer_role', 'dog owner', 'Reviews Section');
- pll_register_string('default_review_excerpt', 'Just wanted to say thank you - your treats are amazing!', 'Reviews Section');
- pll_register_string('default_review_full_1', 'She loves the lamb one - tasty, safe, and it even works great as a dental treat!', 'Reviews Section');
- pll_register_string('default_review_full_2', 'And the salmon sandwich in the tube is our go-to. We never leave the house without it. Perfect for walks and training!', 'Reviews Section');
- pll_register_string('default_review_full_3', 'So glad we found you!', 'Reviews Section');
- pll_register_string ('ВАША ЗАЯВКА ПРИНЯТА!', 'ВАША ЗАЯВКА ПРИНЯТА!');
- pll_register_string ('Спасибо! Сообщение успешно отправлено.', 'Спасибо! Сообщение успешно отправлено.');
- pll_register_string ('Наш менеджер скоро свяжемся с вами для уточнения деталей.', 'Наш менеджер скоро свяжемся с вами для уточнения деталей.');
- pll_register_string ('Вернуться на сайт', 'Вернуться на сайт');
- pll_register_string( 'Link email', 'Link email');
-pll_register_string( 'Linked accounts', 'Linked accounts');
+ // User Edit Form Strings
+ [
+ 'name' => 'Изменить мои данные',
+ 'string' => 'Изменить мои данные',
+ 'translations' => [
+ 'ru' => 'Изменить мои данные',
+ 'en' => 'Edit My Data',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Имя',
+ 'string' => 'Имя',
+ 'translations' => [
+ 'ru' => 'Имя',
+ 'en' => 'Name',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Ваше имя',
+ 'string' => 'Ваше имя',
+ 'translations' => [
+ 'ru' => 'Ваше имя',
+ 'en' => 'Your name',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Имя введено неверно',
+ 'string' => 'Имя введено неверно',
+ 'translations' => [
+ 'ru' => 'Имя введено неверно',
+ 'en' => 'Name entered incorrectly',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Фамилия',
+ 'string' => 'Фамилия',
+ 'translations' => [
+ 'ru' => 'Фамилия',
+ 'en' => 'Last Name',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Ваша фамилия',
+ 'string' => 'Ваша фамилия',
+ 'translations' => [
+ 'ru' => 'Ваша фамилия',
+ 'en' => 'Your last name',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Фамилия введена неверно',
+ 'string' => 'Фамилия введена неверно',
+ 'translations' => [
+ 'ru' => 'Фамилия введена неверно',
+ 'en' => 'Last name entered incorrectly',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Телефон',
+ 'string' => 'Телефон',
+ 'translations' => [
+ 'ru' => 'Телефон',
+ 'en' => 'Phone',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Номер введён неверно',
+ 'string' => 'Номер введён неверно',
+ 'translations' => [
+ 'ru' => 'Номер введён неверно',
+ 'en' => 'Phone number entered incorrectly',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Сохранить',
+ 'string' => 'Сохранить',
+ 'translations' => [
+ 'ru' => 'Сохранить',
+ 'en' => 'Save',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ [
+ 'name' => 'Отмена',
+ 'string' => 'Отмена',
+ 'translations' => [
+ 'ru' => 'Отмена',
+ 'en' => 'Cancel',
+ ],
+ 'group' => 'User Edit Form',
+ ],
+ ];
+ // Регистрация строк
+ foreach ($strings as $string) {
+ pll_register_string($string['name'], $string['string'], $string['group']);
+ }
-
-});
+ // Добавление переводов через фильтр
+ add_filter('pll_translations', function ($translations) use ($strings) {
+ foreach ($strings as $string) {
+ $translations[$string['name']] = $string['translations'];
+ }
+ return $translations;
+ });
+ }
+ pll_register_string('Подписка от', 'Подписка от', 'Theme');
+ pll_register_string('Сумма:', 'Сумма:', 'Theme');
+ pll_register_string('Следующий платеж:', 'Следующий платеж:', 'Theme');
+ pll_register_string('Нет', 'Нет', 'Theme');
+ pll_register_string('Детали подписки', 'Детали подписки', 'Theme');
+ pll_register_string('Детали недоступны', 'Детали недоступны', 'Theme');
+ pll_register_string('У вас нет активных подписок.', 'У вас нет активных подписок.', 'Theme');
+ pll_register_string('Перейти в профиль', 'Перейти в профиль', 'Theme');
+ pll_register_string('Заказы', 'Заказы', 'Theme');
+ pll_register_string('Подписки', 'Подписки', 'Theme');
+ pll_register_string('Подписка №', 'Подписка №', 'Theme');
+ pll_register_string('Статус', 'Статус', 'Theme');
+ pll_register_string('Дата подписки', 'Дата подписки', 'Theme');
+ pll_register_string('Дата последнего заказа', 'Дата последнего заказа', 'Theme');
+ pll_register_string('Следующий платеж', 'Следующий платеж', 'Theme');
+ pll_register_string('Способ оплаты', 'Способ оплаты', 'Theme');
+ pll_register_string('Товары:', 'Товары:', 'Theme');
+ pll_register_string('Сумма', 'Сумма', 'Theme');
+ pll_register_string('месяц', 'месяц', 'Theme');
+ pll_register_string('Доставка', 'Доставка', 'Theme');
+ pll_register_string('Бесплатно', 'Бесплатно', 'Theme');
+ pll_register_string('Итого', 'Итого', 'Theme');
+ pll_register_string('Доставка:', 'Доставка:', 'Theme');
+ pll_register_string('Адрес доставки', 'дрес доставки', 'Theme');
+ pll_register_string('Начните вводить адрес', 'ачните вводить адрес', 'Theme');
+ pll_register_string('Адрес введен неверно', 'Адрес введен неверно', 'Theme');
+ pll_register_string('Комментарий для доставки', 'Комментарий для доставки', 'Theme');
+ pll_register_string('Для службы доставки', 'Для службы доставки', 'Theme');
+ pll_register_string('Комментарий введен неверно', 'Комментарий введен неверно', 'Theme');
+ pll_register_string('Отменить подписку', 'Отменить подписку', 'Theme');
+ pll_register_string('Подписка не найдена.', 'Подписка не найдена.', 'Theme');
+ pll_register_string('Перейти в профиль', 'Перейти в профиль', 'Theme');
+ pll_register_string('Заказы', 'Заказы', 'Theme');
+ pll_register_string('Подписки', 'Подписки', 'Theme');
+ pll_register_string('Не указан', 'Не указан', 'Theme');
+ pll_register_string('месяц', 'месяц', 'Theme');
+});
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/global-functions/multisite-functions.php b/wp-content/themes/cosmopet/global-functions/multisite-functions.php
index f15043f..2152328 100644
--- a/wp-content/themes/cosmopet/global-functions/multisite-functions.php
+++ b/wp-content/themes/cosmopet/global-functions/multisite-functions.php
@@ -19,3 +19,22 @@ add_filter('timber/context', function($context) {
});
+// Отключаем канонические ссылки и hreflang от Yoast SEO
+add_filter('wpseo_canonical', '__return_false');
+add_filter('wpseo_opengraph_url', '__return_false'); // Отключаем OG URL
+add_filter('wpseo_add_x_default_hreflang', '__return_false'); // Отключаем hreflang от Yoast
+add_filter('wpseo_disable_adjacent_rel_links', '__return_true'); // Отключаем соседние rel-ссылки
+
+// Добавляем каноническую ссылку
+add_action('wp_head', 'custom_canonical_url', 5);
+function custom_canonical_url() {
+ // Защищаем от дублирования
+ static $canonical_added = false;
+ if ($canonical_added) {
+ return;
+ }
+ $canonical_added = true;
+
+ $current_url = home_url(add_query_arg('', $_SERVER['REQUEST_URI']));
+ echo ' ' . "\n";
+}
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css b/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css
index e766f05..f02a7b9 100644
--- a/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css
+++ b/wp-content/themes/cosmopet/modules/footer/assets/css/gp-style-desktop.css
@@ -200,3 +200,7 @@
width: 32px;
aspect-ratio: 1;
}
+
+.login_btn {
+ margin-bottom: 24px;
+}
diff --git a/wp-content/themes/cosmopet/modules/footer/module-controller.php b/wp-content/themes/cosmopet/modules/footer/module-controller.php
index 9c1c818..e1d0f4a 100644
--- a/wp-content/themes/cosmopet/modules/footer/module-controller.php
+++ b/wp-content/themes/cosmopet/modules/footer/module-controller.php
@@ -9,7 +9,7 @@ add_filter('timber/context', function($context) {
return $context;
});
-define('BOT_USERNAME', 'cosmopetbot_bot');
+define('BOT_USERNAME', 'cosmopet_test_AE_bot');
function getTelegramUserData() {
diff --git a/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css b/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css
index d1a5d6b..89e55c4 100644
--- a/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css
+++ b/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css
@@ -2062,3 +2062,14 @@ textarea{
.wc-block-checkout__form.wc-block-components-form .wc-blocks-components-select .wc-blocks-components-select__select{
border-radius: 10px;
}
+
+.mt-m-3{
+ margin-top: -3rem;
+}
+
+@media (max-width: 768px) {
+ .mt-m-3{
+ margin-top: 1rem;
+}
+}
+
diff --git a/wp-content/themes/cosmopet/modules/layout/assets/js/gp-cabinet.js b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-cabinet.js
deleted file mode 100644
index 1b485f7..0000000
--- a/wp-content/themes/cosmopet/modules/layout/assets/js/gp-cabinet.js
+++ /dev/null
@@ -1,67 +0,0 @@
-// 'use strict';
-
-// import * as fun from './_gp-function.js';
-
-// let widthPhoneCabinet = 1200;
-
-// fun.toggleOpenX('.cabinet-card__order', '.cabinet-card-order__open-detail', '.cabinet-card-order__detail', '.cabinet-card-order__block-detail');
-// fun.modalFormOpen('.form-open');
-
-// fun.closeModalForm('.modal-form__close');
-// fun.closeModalForm('.modal-form__button-close');
-
-// controlCabinet('.cabinet-control__button', '.cabinet', widthPhoneCabinet);
-
-// function controlCabinet(buttons, main, minWidth){
-// let thisWidth = window.innerWidth;
-// let thisMain = document.querySelector(main);
-
-// let thisButtons = document.querySelectorAll(buttons);
-
-// thisButtons.forEach(e => {
-// e.onclick = function (element){
-// let thisContent = document.querySelector(`.cabinet__${e.dataset.cabinet}`);
-// let newHeight = thisContent.clientHeight + 48;
-// let thisButton = element.target;
-
-// thisMain.style.height = `${newHeight}px`
-
-// if (!thisContent.classList.contains('active')) {
-// thisMain.querySelector('.active').classList.remove('active');
-// thisContent.classList.add('active');
-
-// setTimeout(() => {
-// thisMain.style.height = 'auto';
-
-// if (thisMain.querySelector('.hide')) {
-// thisMain.querySelector('.hide').classList.remove('hide');
-// }
-
-// thisMain.querySelector('.active').classList.add('hide');
-// }, 200);
-// }
-
-// thisButtons.forEach(e => {
-// e.classList.remove('active');
-// })
-// thisButton.classList.add('active');
-// }
-// })
-
-// }
-
-// let modal = document.querySelector('.modal');
-// modal.onclick = function (eventModal) {
-// let thisTarget = eventModal.target;
-
-// if (thisTarget.classList.contains('modal')) {
-// thisTarget.classList.remove('active');
-
-// if (!thisTarget.querySelector('.modal-map.active')) {
-// thisTarget.querySelector('.modal-form.active').classList.remove('active');
-// }else{
-// thisTarget.querySelector('.modal-map.active').classList.remove('active');
-// }
-// }
-// }
-
diff --git a/wp-content/themes/cosmopet/modules/profile/assets/css/profile.css b/wp-content/themes/cosmopet/modules/profile/assets/css/profile.css
index 765b806..227b7b1 100644
--- a/wp-content/themes/cosmopet/modules/profile/assets/css/profile.css
+++ b/wp-content/themes/cosmopet/modules/profile/assets/css/profile.css
@@ -8,7 +8,6 @@ justify-content: space-between;
.cabinet__control{
margin: 24px;
margin-bottom: 0;
-
display: none;
}
.cabinet-control__button{
@@ -741,7 +740,7 @@ padding-left: 0 !important;
bottom: 48px;
}
.cabinet-card-order-detail-short__item{
- margin-left: -27px;
+ margin-left: 10px;
}
.cabinet-card-order-detail-short__item:first-child{
margin-left: 0;
@@ -3085,4 +3084,157 @@ padding-left: 5px;
position: relative;
top: 112px;
z-index: 100;
-}
\ No newline at end of file
+}
+
+.cabinet__control--column {
+ flex-direction: column;
+}
+
+.form-input__tabs--white{
+ padding: 3px;
+ border: 1px solid var(--text-3);
+ background: var(--white);
+ width: 100%;
+}
+.form-input__tabs--white .form-input-tabs__button.active{
+ background: var(--gradient-turquoise);
+}
+
+.form-input-tabs__button {
+ width: 100%;
+ padding: 10px;
+ font-family: var(--font-family);
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 120%;
+ color: var(--text-black);
+ text-align: center;
+ border-radius: 18px;
+ z-index: 2;
+ transition: background-color .2s ease-out;
+}
+@media (max-width: 1200px) {
+ .cabinet__profile .form-input__tabs{
+ display: none;
+}
+
+}
+
+
+
+.subscription{
+ margin-top: 12px;
+
+}
+.subscription__item{
+ padding: 12px 0;
+ display: flex;
+ justify-content: space-between;
+ border-bottom: 1px solid #999;
+}
+.subscription__item{
+ font-size: 20px;
+}
+.subscription__add{
+ color: var(--text-black);
+}
+.subscription__add-header{
+
+}
+.subscription__add-title{
+ font-size: 24px;
+}
+.subscription__add-content{
+ padding: 24px 0 12px 0;
+}
+.subscription__add-product{
+ align-items: start;
+}
+.subscription__add-product > *:nth-child(3){
+ margin-left: auto;
+ align-items: center;
+}
+.subscription__add .cabinet-card-order-detail-main-product-description__what {
+ font-size: 16px;
+ line-height: 125%;
+}
+.subscription__add .cabinet-card-order-detail-main-product-description__with-what {
+ font-weight: 500;
+ font-size: 16px;
+}
+.subscription__add .cabinet-card-order-detail-main-product__count{
+ font-weight: 700;
+ font-size: 16px;
+ line-height: 100%;
+}
+.subscription__add .cabinet-card-order-detail-main-product__price{
+ font-weight: 500;
+ font-size: 20px;
+ line-height: 120%;
+}
+.subscription__add{
+ width: 100%;
+}
+
+@media only screen and (max-width: 720px) {
+ .subscription__item{
+ flex-direction: column;
+ }
+
+ .subscription__item > p:first-child{
+ font-size: 16px;
+ color: var(--text-6);
+ }
+ .subscription__item > p:last-child{
+ margin-top: 6px;
+ }
+
+ .subscription__add-title {
+ font-size: 20px;
+ }
+
+ .subscription__add-product{
+ flex-wrap: wrap;
+ }
+
+ .subscription__add-product > *:not(:first-child){
+ padding-top: 0;
+ }
+ .subscription__add-product .cabinet-card-order-detail-main-product__img{
+ width: 73px;
+ height: 66px;
+ }
+ .subscription__add-product .cabinet-card-order-detail-main-product-description__what{
+ font-size: 12px;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ }
+ .subscription__add-product .cabinet-card-order-detail-main-product-description__with-what{
+ margin-top: 8px;
+
+ font-size: 12px;
+ }
+ .subscription__add-product .cabinet-card-order-detail-main-product__description {
+ width: calc(100% - 73px);
+ }
+ .subscription__add-product .cabinet-card-order-detail-main-product__content{
+ position: static;
+ margin-top: -10px;
+ margin-left: auto;
+ width: calc(100% - 73px);
+
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+ .subscription__add-product .cabinet-card-order-detail-main-product__count{
+ position: static;
+ font-size: 12px;
+ }
+ .subscription__add-product .cabinet-card-order-detail-main-product__price{
+ position: static;
+ font-size: 16px;
+ }
+}
diff --git a/wp-content/themes/cosmopet/modules/profile/assets/js/profile.js b/wp-content/themes/cosmopet/modules/profile/assets/js/profile.js
index b7ea97a..0033817 100644
--- a/wp-content/themes/cosmopet/modules/profile/assets/js/profile.js
+++ b/wp-content/themes/cosmopet/modules/profile/assets/js/profile.js
@@ -4,141 +4,6 @@
let widthPhoneCabinet = 1200;
toggleOpenX('.cabinet-card__order', '.cabinet-card-order__open-detail', '.cabinet-card-order__detail', '.cabinet-card-order__block-detail');
-// modalFormOpen('.form-open');
-
-// closeModalForm('.modal-form__close');
-// closeModalForm('.modal-form__button-close');
-
-controlCabinet('.cabinet-control__button', '.cabinet', widthPhoneCabinet);
-
-function controlCabinet(buttons, main, minWidth){
- let thisWidth = window.innerWidth;
- let thisMain = document.querySelector(main);
-
- let thisButtons = document.querySelectorAll(buttons);
-
- thisButtons.forEach(e => {
- e.onclick = function (element){
- let thisContent = document.querySelector(`.cabinet__${e.dataset.cabinet}`);
- let newHeight = thisContent.clientHeight + 48;
- let thisButton = element.target;
-
- thisMain.style.height = `${newHeight}px`
-
- if (!thisContent.classList.contains('active')) {
- thisMain.querySelector('.active').classList.remove('active');
- thisContent.classList.add('active');
-
- setTimeout(() => {
- thisMain.style.height = 'auto';
-
- if (thisMain.querySelector('.hide')) {
- thisMain.querySelector('.hide').classList.remove('hide');
- }
-
- thisMain.querySelector('.active').classList.add('hide');
- }, 200);
- }
-
- thisButtons.forEach(e => {
- e.classList.remove('active');
- })
- thisButton.classList.add('active');
- }
- })
-
-}
-
-// let modal = document.querySelector('.modal');
-// modal.onclick = function (eventModal) {
-// let thisTarget = eventModal.target;
-
-// if (thisTarget.classList.contains('modal')) {
-// thisTarget.classList.remove('active');
-
-// if (!thisTarget.querySelector('.modal-map.active')) {
-// thisTarget.querySelector('.modal-form.active').classList.remove('active');
-// }else{
-// thisTarget.querySelector('.modal-map.active').classList.remove('active');
-// }
-// }
-// }
-
-// function modalOpen(buttonElement, contentElement){
-// let modal = document.querySelector('.modal'),
-// aside = document.querySelector('.modal__aside'),
-// elements = document.querySelectorAll(buttonElement),
-// device = window.screen.width;
-
-// elements.forEach(e => {
-// let thisContentElement = document.querySelector(contentElement);
-
-// e.onclick = function () {
-// modal.classList.add('active');
-// thisContentElement.classList.add('active');
-
-// let width = thisContentElement.clientWidth;
-
-// setTimeout(() => {
-// if (device <= 720) {
-// aside.style.width = `${device}px`;
-// thisContentElement.style.opacity = 1;
-// thisContentElement.style.filter = 'blur(0px)';
-// }else{
-// aside.style.width = `${width}px`;
-// thisContentElement.style.opacity = 1;
-// thisContentElement.style.filter = 'blur(0px)';
-// }
-// }, 10);
-// }
-// })
-// }
-
-// function modalClose(buttonElement) {
-// let modal = document.querySelector('.modal'),
-// aside = document.querySelector('.modal__aside'),
-// asideItems = document.querySelectorAll('.modal__item'),
-// elements = document.querySelectorAll(buttonElement);
-
-// elements.forEach(e => {
-// e.onclick = function () {
-// aside.style.width = '0px';
-
-// asideItems.forEach(e => {
-// if (e.classList.contains('active')) {
-// e.style.filter = 'blur(10px)';
-// }
-// });
-
-// setTimeout(() => {
-// asideItems.forEach(e => {
-// if (e.classList.contains('active')) {
-// e.classList.remove('active');
-// }
-// });
-
-// modal.classList.remove('active');
-// }, 300);
-// }
-// })
-// }
-
-// function closeModalForm(close){
-// let buttons = document.querySelectorAll(close),
-// modal = document.querySelector('.modal');
-
-// buttons.forEach(button => {
-// button.onclick = function (buttonEvent) {
-// modal.classList.remove('active');
-
-// if (!modal.querySelector('.modal-map.active')) {
-// modal.querySelector('.modal-form.active').classList.remove('active');
-// }else{
-// modal.querySelector('.modal-map.active').classList.remove('active');
-// }
-// }
-// })
-// }
function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement, close) {
let elements = document.querySelectorAll(mainElement);
@@ -148,8 +13,8 @@ function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement,
thisButtonElement = e.querySelector(buttonElement),
thisHeightElement = e.querySelector(heightElement),
thisContentElement = e.querySelector(contentElement);
-
- thisButtonElement.onclick = function (e) {
+ if (thisButtonElement){
+thisButtonElement.onclick = function (e) {
let height = thisHeightElement.clientHeight;
if (close == true && !thisMainElement.classList.contains('active')) {
@@ -169,137 +34,12 @@ function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement,
thisMainElement.classList.remove('active');
}
}
+ }
+
});
}
-// function toggleHeader(button, content, blockheight, removeBlock, removeClass) {
-// let thisButton = document.querySelector(button),
-// thisContent = document.querySelector(content),
-// thisRemoveBlock = document.querySelector(removeBlock) || '',
-// thisBlockheight = document.querySelector(blockheight);
-
-// thisButton.onclick = function () {
-// let height = thisBlockheight.clientHeight;
-
-// if (!thisContent.classList .contains('open')) {
-// thisContent.style.height = `${height}px`;
-// thisContent.classList .add('open');
-
-// if (removeBlock) {
-// thisRemoveBlock.classList.remove(removeClass);
-// }
-// }else{
-// thisContent.style.height = null;
-// thisContent.classList .remove('open');
-
-// if (removeBlock) {
-// if (window.scrollY <= 25) {
-// thisRemoveBlock.classList.add(removeClass);
-// }
-// }
-// }
-// }
-// }
-
-// function modalFormOpen(formOrNotification) {
-// let buttons = document.querySelectorAll(formOrNotification),
-// modal = document.querySelector('.modal');
-
-// buttons.forEach(button => {
-// button.onclick = function (eventButton) {
-// let classOpenForm = button.dataset.form,
-// form = modal.querySelector(`.${classOpenForm}`);
-
-// form.classList.add('active');
-// modal.classList.add('active');
-// }
-// })
-// }
-
-
-// function
-
-
-// export function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement, close) {
-// let elements = document.querySelectorAll(mainElement);
-
-// elements.forEach(e => {
-// let thisMainElement = e,
-// thisButtonElement = e.querySelector(buttonElement),
-// thisHeightElement = e.querySelector(heightElement),
-// thisContentElement = e.querySelector(contentElement);
-
-// thisButtonElement.onclick = function (e) {
-// let height = thisHeightElement.clientHeight;
-
-// if (close == true && !thisMainElement.classList.contains('active')) {
-// elements.forEach(e => {
-// if (e.classList.contains('active')) {
-// e.classList.remove('active');
-// e.querySelector(contentElement).style.height = null
-// }
-// })
-// }
-
-// if (!thisMainElement.classList.contains('active')) {
-// thisContentElement.style.height = `${height}px`;
-// thisMainElement.classList.add('active');
-// }else{
-// thisContentElement.style.height = null;
-// thisMainElement.classList.remove('active');
-// }
-// }
-
-// });
-// }
-
-// export function toggleHeader(button, content, blockheight, removeBlock, removeClass) {
-// let thisButton = document.querySelector(button),
-// thisContent = document.querySelector(content),
-// thisRemoveBlock = document.querySelector(removeBlock) || '',
-// thisBlockheight = document.querySelector(blockheight);
-
-// thisButton.onclick = function () {
-// let height = thisBlockheight.clientHeight;
-
-// if (!thisContent.classList .contains('open')) {
-// thisContent.style.height = `${height}px`;
-// thisContent.classList .add('open');
-
-// if (removeBlock) {
-// thisRemoveBlock.classList.remove(removeClass);
-// }
-// }else{
-// thisContent.style.height = null;
-// thisContent.classList .remove('open');
-
-// if (removeBlock) {
-// if (window.scrollY <= 25) {
-// thisRemoveBlock.classList.add(removeClass);
-// }
-// }
-// }
-// }
-// }
-
-// export function modalFormOpen(formOrNotification) {
-// let buttons = document.querySelectorAll(formOrNotification),
-// modal = document.querySelector('.modal');
-
-// buttons.forEach(button => {
-// button.onclick = function (eventButton) {
-// let classOpenForm = button.dataset.form,
-// form = modal.querySelector(`.${classOpenForm}`);
-
-// form.classList.add('active');
-// modal.classList.add('active');
-// }
-// })
-// }
-// function
-
-
jQuery('.cabinet-card__button').on('click', function(){
var id = jQuery(this).data('edit')
jQuery(`#pet_edit_` + id).addClass('active')
@@ -317,3 +57,40 @@ jQuery('.cabinet-card__block-add-pets').on('click', function(){
jQuery(`#pet_add_form`).addClass('active')
})
+
+jQuery(document).ready(function ($) {
+ $('.subscription-address-form').on('submit', function (e) {
+ e.preventDefault();
+
+ var $form = $(this);
+ var $message = $form.find('.form-message');
+ var subscriptionId = $form.data('subscription-id');
+ var address = $form.find('input[name="address"]').val();
+ var comment = $form.find('textarea[name="comment"]').val();
+ var nonce = $form.find('input[name="address_nonce"]').val();
+
+ $message.hide().removeClass('success error').empty();
+
+ $.ajax({
+ url: '/wp-admin/admin-ajax.php', // Defined in wp_localize_script
+ type: 'POST',
+ data: {
+ action: 'update_subscription_address',
+ subscription_id: subscriptionId,
+ address: address,
+ comment: comment,
+ address_nonce: nonce
+ },
+ success: function (response) {
+ if (response.success) {
+ $message.addClass('success').text(response.data.message).show();
+ } else {
+ $message.addClass('error').text(response.data.message).show();
+ }
+ },
+ error: function () {
+
+ }
+ });
+ });
+});
diff --git a/wp-content/themes/cosmopet/modules/profile/components/profile/component-controller.php b/wp-content/themes/cosmopet/modules/profile/components/profile/component-controller.php
index cd8e0a5..5a40939 100644
--- a/wp-content/themes/cosmopet/modules/profile/components/profile/component-controller.php
+++ b/wp-content/themes/cosmopet/modules/profile/components/profile/component-controller.php
@@ -183,6 +183,11 @@ $context['months'] = [
];
+if ($orders_pg){
+Timber::render('profile/profile-orders.twig', $context);
+}
+else{
+Timber::render('profile/profile.twig', $context);
+}
-Timber::render('templates/profile/profile.twig', $context);
?>
diff --git a/wp-content/themes/cosmopet/modules/profile/components/subscription_single/component-controller.php b/wp-content/themes/cosmopet/modules/profile/components/subscription_single/component-controller.php
new file mode 100644
index 0000000..ed0fc4f
--- /dev/null
+++ b/wp-content/themes/cosmopet/modules/profile/components/subscription_single/component-controller.php
@@ -0,0 +1,143 @@
+ function ($attachment_id, $size = 'thumbnail', $icon = false) {
+ $image = wp_get_attachment_image_src($attachment_id, $size, $icon);
+ return $image ? $image[0] : ''; // Return the URL or empty string
+ },
+ ];
+ return $filters;
+});
+add_filter('timber/twig/functions', function ($functions) {
+ $functions['wc_get_page_permalink'] = [
+ 'callable' => 'wc_get_page_permalink',
+ ];
+ $functions['wc_get_endpoint_url'] = [
+ 'callable' => 'wc_get_endpoint_url',
+ ];
+ $functions['is_wc_endpoint_url'] = [
+ 'callable' => 'is_wc_endpoint_url',
+ ];
+ $functions['get_permalink'] = [
+ 'callable' => 'get_permalink',
+ ];
+ $functions['get_the_ID'] = [
+ 'callable' => 'get_the_ID',
+ ];
+ $functions['pll_e'] = [
+ 'callable' => 'pll_e',
+ ];
+ return $functions;
+});
+
+// Get subscription ID from URL (e.g., /my-account/view-subscription/7632/)
+
+ $request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
+ if (preg_match('/view-subscription\/(\d+)/', $request_uri, $matches)) {
+ $subscription_id = absint($matches[1]);
+ }
+
+
+$subscription = $subscription_id ? wcs_get_subscription($subscription_id) : null;
+
+if (!$subscription || !wcs_is_subscription($subscription) || $subscription->get_user_id() !== get_current_user_id()) {
+ error_log('Invalid or inaccessible subscription ID: ' . $subscription_id);
+ $subscription = null;
+} else {
+ error_log('Subscription ID: ' . $subscription->get_id() . ' | Status: ' . $subscription->get_status());
+
+ $items = array_map(function ($item) {
+ $product_id = $item->get_product_id();
+ $variation_id = $item->get_variation_id();
+ $wc_product = $product_id ? wc_get_product($variation_id ?: $product_id) : null;
+ $product_name = $wc_product ? $wc_product->get_name() : 'Unknown Product';
+ $image_id = $wc_product ? $wc_product->get_image_id() : 0;
+ $status = $product_id ? get_post_status($product_id) : 'N/A';
+ $permalink = $wc_product && $wc_product->is_visible() ? get_permalink($product_id) : '';
+ $variation_details = $variation_id ? wc_get_formatted_variation($wc_product, true) : '';
+ error_log('Item ID: ' . $item->get_id() . ' | Product ID: ' . $product_id . ' | Variation ID: ' . $variation_id . ' | Name: ' . $product_name . ' | Permalink: ' . $permalink . ' | Status: ' . $status);
+
+ return [
+ 'product' => [
+ 'id' => $product_id ?: 0,
+ 'name' => $product_name,
+ 'image_id' => $image_id,
+ 'variation_details' => $variation_details,
+ ],
+ 'quantity' => $item->get_quantity(),
+ 'total' => $item->get_total(),
+ ];
+ }, $subscription->get_items());
+
+
+ $cancel_url = '';
+ if ($subscription->can_be_updated_to('cancelled')) {
+ $cancel_url = add_query_arg(
+ [
+ 'subscription_id' => $subscription->get_id(),
+ 'change_subscription_to' => 'cancelled',
+ '_wpnonce' => wp_create_nonce('wcs_switch_request'),
+ ],
+ wc_get_endpoint_url('view-subscription', $subscription->get_id(), wc_get_page_permalink('myaccount'))
+ );
+ }
+
+ $subscription_data = [
+ 'id' => $subscription->get_id(),
+ 'status' => $subscription->get_status(),
+ 'date_created' => $subscription->get_date_created(),
+ 'last_order_date' => $subscription->get_date('last_order_date_created'),
+ 'next_payment_date' => $subscription->get_date('next_payment'),
+ 'payment_method_title' => $subscription->get_payment_method_title(),
+ 'total' => $subscription->get_total(),
+ 'currency' => $subscription->get_currency(),
+ 'items' => $items,
+ 'cancel_url' => $cancel_url,
+ 'shipping_address' => $subscription->get_formatted_shipping_address(),
+ 'shipping_comment' => $subscription->get_customer_note(),
+ ];
+}
+
+// Timber context
+$context = Timber::context();
+
+$current_user = wp_get_current_user();
+$context['current_user'] = $current_user;
+$context['first_name'] = $current_user->user_firstname;
+$context['last_name'] = $current_user->user_lastname;
+$context['email'] = $current_user->user_email;
+$context['phone'] = get_user_meta($current_user->ID, 'billing_phone', true);
+$context['tg_account'] = get_user_meta($current_user->ID, 'tg_account', true);
+
+// ACF поля для пользователя
+$context['activated'] = get_field('activated', 'user_' . get_current_user_id());
+$context['uuid'] = get_field('uuid', 'user_' . get_current_user_id());
+
+// Запрос для питомцев
+$current_user_id = get_current_user_id();
+if ($current_user_id) {
+ $args = [
+ 'post_type' => 'pets',
+ 'meta_query' => [
+ [
+ 'key' => 'user',
+ 'value' => $current_user_id,
+ 'compare' => '='
+ ]
+ ]
+ ];
+ $context['pets'] = Timber::get_posts($args);
+}
+$context['bot_username'] = defined('BOT_USERNAME') ? BOT_USERNAME : '';
+$context['subscription'] = $subscription_data;
+
+// Debug: Log subscription data
+error_log('Subscription Data: ' . print_r($subscription_data, true));
+
+// Render the Twig template
+Timber::render('profile/profile-subs-single.twig', $context);
+?>
diff --git a/wp-content/themes/cosmopet/modules/profile/components/subscriptions/component-controller.php b/wp-content/themes/cosmopet/modules/profile/components/subscriptions/component-controller.php
new file mode 100644
index 0000000..b31fc70
--- /dev/null
+++ b/wp-content/themes/cosmopet/modules/profile/components/subscriptions/component-controller.php
@@ -0,0 +1,107 @@
+ function ($attachment_id, $size = 'thumbnail', $icon = false) {
+ $image = wp_get_attachment_image_src($attachment_id, $size, $icon);
+ return $image ? $image[0] : ''; // Return the URL or empty string
+ },
+ ];
+ return $filters;
+});
+
+
+use Timber\Timber;
+
+
+$context = Timber::context();
+if (!class_exists('WC_Subscriptions')) {
+ error_log('WooCommerce Subscriptions plugin is not active.');
+ return;
+}
+
+// Get the current user’s subscriptions
+$user_id = get_current_user_id();
+$subscriptions = wcs_get_users_subscriptions($user_id);
+
+$subscription_data = [];
+foreach ($subscriptions as $subscription) {
+ $view_url = $subscription->get_view_order_url();
+ // Debug: Log the view_url to check its value
+ error_log('Subscription ID: ' . $subscription->get_id() . ' | View URL: ' . $view_url);
+
+ $subscription_data[] = [
+ 'id' => $subscription->get_id(),
+ 'date_created' => $subscription->get_date_created(),
+ 'total' => $subscription->get_total(),
+ 'currency' => $subscription->get_currency(),
+ 'billing_period' => $subscription->get_billing_period(),
+ 'next_payment_date' => $subscription->get_date('next_payment'),
+ 'view_url' => esc_url($view_url), // Ensure URL is escaped for safety
+ 'items' => array_map(function ($item) {
+ $product = $item->get_product();
+ return [
+ 'product' => [
+ 'name' => $product->get_name(),
+ 'image_id' => $product->get_image_id(),
+ ],
+ ];
+ }, $subscription->get_items()),
+ ];
+}
+
+$context['subscriptions'] = $subscription_data;
+
+// Debug: Log the entire subscriptions array
+error_log('Subscriptions Data: ' . print_r($subscription_data, true));
+
+// Render the Twig template
+
+$current_user = wp_get_current_user();
+$context['current_user'] = $current_user;
+$context['first_name'] = $current_user->user_firstname;
+$context['last_name'] = $current_user->user_lastname;
+$context['email'] = $current_user->user_email;
+$context['phone'] = get_user_meta($current_user->ID, 'billing_phone', true);
+$context['tg_account'] = get_user_meta($current_user->ID, 'tg_account', true);
+
+// ACF поля для пользователя
+$context['activated'] = get_field('activated', 'user_' . get_current_user_id());
+$context['uuid'] = get_field('uuid', 'user_' . get_current_user_id());
+$context['bot_username'] = defined('BOT_USERNAME') ? BOT_USERNAME : '';
+// Запрос для питомцев
+$current_user_id = get_current_user_id();
+if ($current_user_id) {
+ $args = [
+ 'post_type' => 'pets',
+ 'meta_query' => [
+ [
+ 'key' => 'user',
+ 'value' => $current_user_id,
+ 'compare' => '='
+ ]
+ ]
+ ];
+ $context['pets'] = Timber::get_posts($args);
+}
+
+// Месяцы для локализации
+$context['months'] = [
+ __('january', 'woodmart'),
+ __('february', 'woodmart'),
+ __('march', 'woodmart'),
+ __('april', 'woodmart'),
+ __('may', 'woodmart'),
+ __('june', 'woodmart'),
+ __('july', 'woodmart'),
+ __('august', 'woodmart'),
+ __('september', 'woodmart'),
+ __('october', 'woodmart'),
+ __('november', 'woodmart'),
+ __('december', 'woodmart'),
+];
+
+Timber::render('profile/profile-subs.twig', $context);
+?>
diff --git a/wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php b/wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php
index 5eb183a..6d9fde9 100644
--- a/wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php
+++ b/wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php
@@ -131,3 +131,4 @@ function ajax_edit_pet() {
}
add_action('wp_ajax_edit_pet', 'ajax_edit_pet');
add_action('wp_ajax_nopriv_edit_pet', 'ajax_edit_pet');
+
diff --git a/wp-content/themes/cosmopet/modules/profile/module-controller.php b/wp-content/themes/cosmopet/modules/profile/module-controller.php
index dc84e23..9f8d04f 100644
--- a/wp-content/themes/cosmopet/modules/profile/module-controller.php
+++ b/wp-content/themes/cosmopet/modules/profile/module-controller.php
@@ -1 +1,2 @@
item.key !== element.key);
+ localStorage.setItem(removedItemsStorageKey, JSON.stringify(updatedItems));
+ }
+ // Обрабатываем следующий элемент
+ processNextItem();
+ },
+ error: function() {
+ // Продолжаем даже при ошибке
+ processNextItem();
+ }
+ });
}
- const element = itemsToRemove.shift(); // Берем первый элемент
+ // Начинаем обработку
+ processNextItem();
+ }
+
+ // Инициализация при загрузке
+ restoreRemovedItems();
+
+ // Функция удаления товара с возможностью восстановления
+ function removeItem(key) {
+ const $item = $(`[data-key="${key}"]`);
+ const productId = $item.data('product_id');
+ const variationId = $item.data('variation_id') || 0;
+ const quantity = parseInt($item.find('.counter__input').val());
+
+ // Сохраняем во временное хранилище
+ const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || [];
+ removedItems.push({ product_id: productId, variation_id: variationId, quantity: quantity, key: key });
+ localStorage.setItem(removedItemsStorageKey, JSON.stringify(removedItems));
+ // Показываем кнопку восстановления
+ $item.html(`
+
+ Removing an item from the cart: 5 с
+
+
+
+ ${woocommerce_params.i18n_restore_item || 'Restore'}
+
+
+ `);
+
+ // Проверяем количество товаров в корзине
$.ajax({
type: 'POST',
url: woocommerce_params.ajax_url,
data: {
- action: 'remove_cart_item',
- cart_item_key: element.key
+ action: 'check_cart_count'
},
success: function(response) {
- if (response.success) {
- // Обновляем localStorage, удаляя только что обработанный элемент
- const currentItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || [];
- const updatedItems = currentItems.filter(item => item.key !== element.key);
- localStorage.setItem(removedItemsStorageKey, JSON.stringify(updatedItems));
+ if (response.success && response.data.count <= 1) {
+ // Если после удаления корзина станет пустой (1 товар сейчас, удаляем его)
+ $('.proceed-to-checkout').css('display', 'none');
}
- // Обрабатываем следующий элемент
- processNextItem();
- },
- error: function() {
- // Продолжаем даже при ошибке
- processNextItem();
}
});
- }
-
- // Начинаем обработку
- processNextItem();
-}
-
- // Инициализация при загрузке
- restoreRemovedItems();
-
- // Функция удаления товара с возможностью восстановления
-function removeItem(key) {
- const $item = $(`[data-key="${key}"]`);
- const productId = $item.data('product_id');
- const variationId = $item.data('variation_id') || 0;
- const quantity = parseInt($item.find('.counter__input').val());
-
- // Сохраняем во временное хранилище
- const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || [];
- removedItems.push({ product_id: productId, variation_id: variationId, quantity: quantity, key: key });
- localStorage.setItem(removedItemsStorageKey, JSON.stringify(removedItems));
-
- // Показываем кнопку восстановления
- $item.html(`
-
- Removing an item from the cart: 5 с
-
-
-
- ${woocommerce_params.i18n_restore_item || 'Restore'}
-
-
- `);
-
- // Проверяем количество товаров в корзине
- $.ajax({
- type: 'POST',
- url: woocommerce_params.ajax_url,
- data: {
- action: 'check_cart_count'
- },
- success: function(response) {
- if (response.success && response.data.count <= 1) {
- // Если после удаления корзина станет пустой (1 товар сейчас, удаляем его)
- $('.proceed-to-checkout').css('display', 'none');
- }
- }
- });
-
- // Удаляем через 5 секунд, если не восстановили
- const removeTimeout = setTimeout(() => {
- permanentRemoveItem(key, productId, variationId);
- }, 5000);
+
+ // Удаляем через 5 секунд, если не восстановили
+ const removeTimeout = setTimeout(() => {
+ permanentRemoveItem(key, productId, variationId);
+ }, 5000);
- const product_remove_timer = setInterval(() => {
- let number = Number($(`#${key}_timer`).html()) - 1;
- $(`#${key}_timer`).html(number);
- }, 1000);
-
- // Обработчик восстановления
- $(document).off('click', `[data-key="${key}"] .modal-basket-item__return`).on('click', `[data-key="${key}"] .modal-basket-item__return`, function(e) {
- e.preventDefault();
- clearTimeout(removeTimeout);
- clearInterval(product_remove_timer); // Очищаем интервал
- restoreItem(key, productId, variationId, quantity);
- });
-}
+ const product_remove_timer = setInterval(() => {
+ let number = Number($(`#${key}_timer`).html()) - 1;
+ $(`#${key}_timer`).html(number);
+ }, 1000);
+
+ // Обработчик восстановления
+ $(document).off('click', `[data-key="${key}"] .modal-basket-item__return`).on('click', `[data-key="${key}"] .modal-basket-item__return`, function(e) {
+ e.preventDefault();
+ clearTimeout(removeTimeout);
+ clearInterval(product_remove_timer); // Очищаем интервал
+ restoreItem(key, productId, variationId, quantity);
+ });
+ }
// Полное удаление товара
function permanentRemoveItem(key, productId, variationId) {
@@ -197,39 +198,39 @@ function removeItem(key) {
});
}
- // Восстановление товара
-function restoreItem(key, productId, variationId, quantity) {
- $('#modal-basket').addClass('loading');
-
- $.ajax({
- type: 'POST',
- url: woocommerce_params.ajax_url,
- data: {
- action: 'restore_cart_item',
- product_id: productId,
- variation_id: variationId,
- quantity: quantity
- },
- complete: function() {
- $('#modal-basket').removeClass('loading');
- },
- success: function(response) {
- if (response.success) {
- // Удаляем из временного хранилища
- const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || [];
- const updatedItems = removedItems.filter(item =>
- !(item.product_id === productId && item.variation_id === variationId)
- );
- localStorage.setItem(removedItemsStorageKey, JSON.stringify(updatedItems));
-
- // Показываем кнопку Proceed to checkout
- $('.proceed-to-checkout').css('display', '');
-
- updateCartFragment();
+ // Восстановление товара
+ function restoreItem(key, productId, variationId, quantity) {
+ $('#modal-basket').addClass('loading');
+
+ $.ajax({
+ type: 'POST',
+ url: woocommerce_params.ajax_url,
+ data: {
+ action: 'restore_cart_item',
+ product_id: productId,
+ variation_id: variationId,
+ quantity: quantity
+ },
+ complete: function() {
+ $('#modal-basket').removeClass('loading');
+ },
+ success: function(response) {
+ if (response.success) {
+ // Удаляем из временного хранилища
+ const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || [];
+ const updatedItems = removedItems.filter(item =>
+ !(item.product_id === productId && item.variation_id === variationId)
+ );
+ localStorage.setItem(removedItemsStorageKey, JSON.stringify(updatedItems));
+
+ // Показываем кнопку Proceed to checkout
+ $('.proceed-to-checkout').css('display', '');
+
+ updateCartFragment();
+ }
}
- }
- });
-}
+ });
+ }
// --- Работа с cookie ---
function setCookie(name, value, days) {
@@ -322,39 +323,39 @@ function restoreItem(key, productId, variationId, quantity) {
}
// Обновление фрагментов корзины
-function updateCartFragment() {
- $.ajax({
- type: 'POST',
- url: woocommerce_params.ajax_url,
- data: {
- action: 'get_cart_fragment'
- },
- beforeSend: function() {
- $('#modal-basket').addClass('loading');
- },
- complete: function() {
- $('#modal-basket').removeClass('loading');
- },
- success: function(response) {
- console.log(response);
- if (response.success) {
- $('#modal-basket-content').html(response.data.contents);
- $('.modal-block-price__price').html(response.data.total);
- $('.mini-profile__button--counter').text(response.data.count);
- if (response.data.count > 0) {
- $('.mini-profile__button--counter').removeClass('disabled');
- $('.proceed-to-checkout').css('display', ''); // Показываем кнопку, если есть товары
- } else {
- $('.mini-profile__button--counter').addClass('disabled');
- $('.proceed-to-checkout').css('display', 'none'); // Скрываем кнопку, если корзина пуста
+ function updateCartFragment() {
+ $.ajax({
+ type: 'POST',
+ url: woocommerce_params.ajax_url,
+ data: {
+ action: 'get_cart_fragment'
+ },
+ beforeSend: function() {
+ $('#modal-basket').addClass('loading');
+ },
+ complete: function() {
+ $('#modal-basket').removeClass('loading');
+ },
+ success: function(response) {
+ console.log(response);
+ if (response.success) {
+ $('#modal-basket-content').html(response.data.contents);
+ $('.modal-block-price__price').html(response.data.total);
+ $('.mini-profile__button--counter').text(response.data.count);
+ if (response.data.count > 0) {
+ $('.mini-profile__button--counter').removeClass('disabled');
+ $('.proceed-to-checkout').css('display', ''); // Показываем кнопку, если есть товары
+ } else {
+ $('.mini-profile__button--counter').addClass('disabled');
+ $('.proceed-to-checkout').css('display', 'none'); // Скрываем кнопку, если корзина пуста
+ }
}
+ },
+ error: function(xhr, status, error) {
+ console.error('AJAX error:', error);
}
- },
- error: function(xhr, status, error) {
- console.error('AJAX error:', error);
- }
- });
-}
+ });
+ }
// Добавляем спиннер на кнопку 'Добавить в корзину' в корзине
$('body').on('click', '.add_to_cart_button', function() {
@@ -377,6 +378,4 @@ function updateCartFragment() {
}
}
});
-});
-
-
+});
\ 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/modules/shop/components/single-product/component-template.twig
index 25ad8b8..5dfbb56 100644
--- a/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig
+++ b/wp-content/themes/cosmopet/modules/shop/components/single-product/component-template.twig
@@ -56,9 +56,9 @@
{% endif %}
-
+
{{ product.get_title }}
-
+
diff --git a/wp-content/themes/cosmopet/page.php b/wp-content/themes/cosmopet/page.php
index 9ef9917..747165d 100644
--- a/wp-content/themes/cosmopet/page.php
+++ b/wp-content/themes/cosmopet/page.php
@@ -6,12 +6,25 @@
*/
-if (is_account_page()){
+if (is_account_page() && !is_wc_endpoint_url()){
include_module('profile');
+ $orders_pg = false;
include_component('profile', 'profile');
}
+else if (is_account_page() && isset($wp->query_vars['orders'])){
+ include_module('profile');
+ $orders_pg = true;
+ include_component('profile', 'profile');
+}
+elseif (is_account_page() && isset($wp->query_vars['subscriptions'])){
+ include_module('profile');
+ include_component('profile', 'subscriptions');
+}
-
+elseif (is_account_page() && isset($wp->query_vars['view-subscription'])){
+ include_module('profile');
+ include_component('profile', 'subscription_single');
+}
$context = Timber::context();
$context['post'] = Timber::get_post();
diff --git a/wp-content/themes/cosmopet/static/assets/js/telegram-auth.js b/wp-content/themes/cosmopet/static/assets/js/telegram-auth.js
new file mode 100644
index 0000000..41b8512
--- /dev/null
+++ b/wp-content/themes/cosmopet/static/assets/js/telegram-auth.js
@@ -0,0 +1,55 @@
+jQuery(document).ready(function($) {
+ window.onTelegramAuth = function(user) {
+ $.ajax({
+ type: 'POST',
+ url: telegram_auth_params.ajax_url,
+ data: {
+ action: 'ontelegramauth',
+ userid: user.id,
+ username: user.username || '',
+ fname: user.first_name || '',
+ lname: user.last_name || '',
+ photo_url: user.photo_url || '',
+ auth_date: user.auth_date,
+ hash: user.hash
+ },
+ success: function(response) {
+ if (response.success) {
+ window.location.href = telegram_auth_params.my_account_url;
+ } else {
+ alert(telegram_auth_params.i18n_error + ': ' + (response.data.message || 'Unknown error'));
+ }
+ },
+ error: function() {
+ alert(telegram_auth_params.i18n_error);
+ }
+ });
+ };
+
+ window.linkTelegram = function(user) {
+ $.ajax({
+ type: 'POST',
+ url: telegram_auth_params.ajax_url,
+ data: {
+ action: 'linktelegram',
+ userid: user.id,
+ username: user.username || '',
+ fname: user.first_name || '',
+ lname: user.last_name || '',
+ photo_url: user.photo_url || '',
+ auth_date: user.auth_date,
+ hash: user.hash
+ },
+ success: function(response) {
+ if (response.success) {
+ $('.cabinet-accounts').html('
');
+ } else {
+ alert(telegram_auth_params.i18n_error_link + ': ' + (response.data.message || 'Unknown error'));
+ }
+ },
+ error: function() {
+ alert(telegram_auth_params.i18n_error_link);
+ }
+ });
+ };
+});
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/static/front-page/css/style.css b/wp-content/themes/cosmopet/static/front-page/css/style.css
index 6f02d2c..61cc78b 100644
--- a/wp-content/themes/cosmopet/static/front-page/css/style.css
+++ b/wp-content/themes/cosmopet/static/front-page/css/style.css
@@ -4276,4 +4276,8 @@ color: #f4f1f0;
.reviews-plus{
overflow: hidden;
+}
+
+.invisible {
+ visibility: hidden;
}
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/static/img/pet/mini-cat.png b/wp-content/themes/cosmopet/static/img/pet/mini-cat.png
new file mode 100644
index 0000000000000000000000000000000000000000..49233dd6498fd82b9abd119ce6c0b7c5fadca4c8
GIT binary patch
literal 1872
zcmV-W2e0^vP)
|KaG|Iz`0BDNxGs}K;qrOc5ve~r^
z(6j%6T28&Xx++2}%PK23OQzKU0EXiU5I8m70aU=2SzKHcxi(udm(LeA>eDwa*oESB
zI-Qn}p$I3>=ksNyl{3Nsa5dyPyvIJcOIZuR5eJz}hVt3$f7=3ZegCHgMh!DY*$Pl@
zuyB|g6DL$ttGL(o@SRZth3R=7)u&SAF_@K=72?4CV_N`qb#=dIRx|1O`FSyKiUk-Y
z;mY5YQLd?LX(~VfB5vd0gmSjPzr(}Bx3>i_Ha2Fvo_ld-c9zoVWpRa4s0P*$`M3t9
zXIZNlDg|M|xw$#Y7Ydgs43*jdFxZd(2vP|X_b??~!c)_yG04e%W-VsgnWK2v$sFmC8?plL6ifSQVvUT`5t;OHrBs$3xsa?#&O-B
z`KqCUfK-UxkE#}JYy{KDsig))qGa;P;Rc*m0@yG4p24v-zuZcXvDFKv&WVOps*Usi
zkm4^zFseB*Int4mAY{LkvaajM6dCvgi&=?3iw-)bcl-P0evSJ*07Ul$
z3!rYm8sGt>BlgI>CR
zCM-H0TYv-62+BR;D@{#xY@r(rV3V$@L}Xjmdn`Dr8d0TOwc0L<6i#P`C-tQ$6<_Eb
ze1Dxac{H+HPE^yi3BdmS`#u^XzOZU%Y1udnZP
zO#q#poo6{{F7v4(n!c{QvegnLQhGzzsDD6`b`>BL00n}tukgS0000<
KMNUMnLSTZIP<}1|
literal 0
HcmV?d00001
diff --git a/wp-content/themes/cosmopet/templates/front-page/front-page.twig b/wp-content/themes/cosmopet/templates/front-page/front-page.twig
index 687251e..98865e0 100644
--- a/wp-content/themes/cosmopet/templates/front-page/front-page.twig
+++ b/wp-content/themes/cosmopet/templates/front-page/front-page.twig
@@ -6,14 +6,15 @@
{% block content %}
+ FOOD OF THE FUTURE FOR YOUR PET
-
+
{% for slide in slider %}
-
{{ slide.slide_title }}
+
{{ slide.slide_title }}
{{ slide.slide_description }}
{{ slide.btn_text }}
@@ -41,7 +42,7 @@
alt="">
-
{{about_title}}
+
{{about_title}}
{{about_desc}}
@@ -546,7 +547,7 @@
-
{{ post.meta('cosmopet_x_blocktitle') }}
+
{{ post.meta('cosmopet_x_blocktitle') }}
{% for slide in post.meta('cosmopet_x_slider') %}
@@ -577,7 +578,7 @@
-
{{ function('pll_e', 'Наш блог') }}
+ {{ function('pll_e', 'Наш блог') }}
{{ function('pll_e', 'Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных') }}
diff --git a/wp-content/themes/cosmopet/templates/pet-card.twig b/wp-content/themes/cosmopet/templates/pet-card.twig
index 77cc349..43d7fa3 100644
--- a/wp-content/themes/cosmopet/templates/pet-card.twig
+++ b/wp-content/themes/cosmopet/templates/pet-card.twig
@@ -34,7 +34,7 @@
-
+
{{ function('get_the_title', pet_id) }}
diff --git a/wp-content/themes/cosmopet/templates/profile/profile-base.twig b/wp-content/themes/cosmopet/templates/profile/profile-base.twig
new file mode 100644
index 0000000..45e31c5
--- /dev/null
+++ b/wp-content/themes/cosmopet/templates/profile/profile-base.twig
@@ -0,0 +1,611 @@
+
+
+
+
+ {{ function('pll_e', 'Feed subscription') }}
+
+
+
{{ function('pll_e', 'Weekly food delivery for your pet') }}
+
+
+
+ {{ function('pll_e', 'Get details') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if first_name or last_name %}
+ {{ first_name }} {{ last_name }}
+ {% else %}
+ {{ function('pll_e', 'Name is not set') }}
+ {% endif %}
+
+
+
+
+
{{ function('pll_e', 'Phone') }}:
+
+ {% if phone %}
+ {{ phone }}
+ {% else %}
+ {{ function('pll_e', 'Not filled') }}
+ {% endif %}
+
+
+
+
+
{{ function('pll_e', 'Email') }}:
+ {% if email %}
+
{{ email }}
+ {% if activated %}
+
{{ function('pll_e', 'Email is verified') }}
+ {% else %}
+
{{ function('pll_e', 'Email is not verified') }}
+
+ {% if uuid %}
+
{{ function('pll_e', 'Email with verification link is sent to your email.') }}
+ {% endif %}
+ {% endif %}
+ {% else %}
+
+ {% endif %}
+
+
+
+
{{ function('pll_e', 'Linked accounts') }}:
+
+ {% if tg_account %}
+
+
+
+
+
+
+
+
+ {% else %}
+
+ {% endif %}
+
+
+
+
+
+
+
+ {% if pets %}
+ {% for pet in pets %}
+ {% include 'pet-card.twig' with { 'item': pet } %}
+ {% endfor %}
+ {% endif %}
+
+
+
+
+
+
+
+ {{ function('pll_e', 'Add a pet') }}
+
+
+
+
+
+
+ {% block profile_content %}
+
+ {% endblock %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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
new file mode 100644
index 0000000..791538a
--- /dev/null
+++ b/wp-content/themes/cosmopet/templates/profile/profile-orders.twig
@@ -0,0 +1,106 @@
+{% extends 'profile/profile-base.twig' %}
+
+{% block profile_content%}
+
+
+
+
{{ function('pll_e', 'Feed subscription') }}
+
+
{{ function('pll_e', 'Weekly food delivery for your pet') }}
+
+
+ {{ function('pll_e', 'Get details') }}
+
+
+
+ {% if customer_orders %}
+ {% for order in customer_orders %}
+ {% set meta_data = order.meta_data.order_data %}
+ {% set shipping_address = order.get_address('shipping') %}
+
+
+
+
+
+
+ {% 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.quantity }}
+
{{ item.total }} {{ function('get_woocommerce_currency_symbol', code) }}
+
+
+ {% endfor %}
+
+
+
+
+
+
{{ function('pll_e', 'Order details') }}
+
+
+ {% 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 %}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/templates/profile/profile-subs-single.twig b/wp-content/themes/cosmopet/templates/profile/profile-subs-single.twig
new file mode 100644
index 0000000..ff1f0ee
--- /dev/null
+++ b/wp-content/themes/cosmopet/templates/profile/profile-subs-single.twig
@@ -0,0 +1,133 @@
+{% extends 'profile/profile-base.twig' %}
+
+{% block profile_content %}
+
+
+ {% if subscription %}
+
+
+
+
+
+
+
+
+
{{ fn('pll_e', 'Статус') }}
+
{{ subscription.status | capitalize }}
+
+
+
{{ fn('pll_e', 'Дата подписки') }}
+
{{ subscription.date_created | date('d.m.Y') }}
+
+
+
{{ fn('pll_e', 'Дата последнего заказа') }}
+
{{ subscription.last_order_date | date('d.m.Y') }}
+
+
+
{{ fn('pll_e', 'Следующий платеж') }}
+
{{ subscription.next_payment_date | date('d.m.Y')}}
+
+
+
{{ fn('pll_e', 'Способ оплаты') }}
+
{{ subscription.payment_method_title}}
+
+
+
+
+
+ {% for item in subscription.items %}
+ {% set product = item.product %}
+ {% set image_id = product.image_id %}
+ {% set product_permalink = product.id ? fn('get_permalink', product.id) : '' %}
+ {# Debug: Display product ID and permalink for testing #}
+
Product ID: {{ product.id | default('null') }} | Permalink: {{ product_permalink | default('none') }}
+
+ {% if product.id and product_permalink and product_permalink != fn('get_permalink', fn('get_the_ID')) %}
+
+
+
+ {% else %}
+
+ {% endif %}
+
+
{{ product.name }}
+
{{ product.variation_details | default('') }}
+
+
+
{{ item.quantity }}
+
{{ item.total }}
+
+
+ {% endfor %}
+
+
+
+
+
{{ fn('pll_e', 'Сумма') }}
+
{{ subscription.total }} {{ subscription.currency }} / {{ fn('pll_e', 'месяц') }}
+
+
+
{{ fn('pll_e', 'Доставка') }}
+
{{ fn('pll_e', 'Бесплатно') }}
+
+
+
{{ fn('pll_e', 'Итого') }}
+
{{ subscription.total }} {{ subscription.currency }} / {{ fn('pll_e', 'месяц') }}
+
+
+
+
+
+ {{ fn('pll_e', 'Отменить подписку') }}
+
+
+
+ {% else %}
+
+
{{ fn('pll_e', 'Подписка не найдена.') }}
+
+ {% endif %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/templates/profile/profile-subs.twig b/wp-content/themes/cosmopet/templates/profile/profile-subs.twig
new file mode 100644
index 0000000..99e0427
--- /dev/null
+++ b/wp-content/themes/cosmopet/templates/profile/profile-subs.twig
@@ -0,0 +1,78 @@
+{% extends 'profile/profile-base.twig' %}
+
+{% block profile_content %}
+
+ {% for subscription in subscriptions %}
+
+
+
+
+
+
+
+
+ {{ fn('pll_e', 'Следующий платеж:') }}
+
+
+ {{ subscription.next_payment_date | date('d.m.Y') }}
+
+
+
+
+
+
+
+ {% for item in subscription.items %}
+ {% set product = item.product %}
+ {% set image_id = product.image_id %}
+ {% if product.permalink %}
+
+
+
+ {% else %}
+
+ {% endif %}
+ {% endfor %}
+
+
+
+
+
+ {% else %}
+
{{ fn('pll_e', 'У вас нет активных подписок.') }}
+ {% endfor %}
+
+{% 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 641c708..340fe3a 100644
--- a/wp-content/themes/cosmopet/templates/profile/profile.twig
+++ b/wp-content/themes/cosmopet/templates/profile/profile.twig
@@ -1,125 +1,9 @@
-
-
-
-
- {{ function('pll_e', 'Feed subscription') }}
-
-
-
{{ function('pll_e', 'Weekly food delivery for your pet') }}
-
-
-
- {{ function('pll_e', 'Get details') }}
-
-
-
-
-
-
- {{ function('pll_e', 'Orders') }}
- {{ function('pll_e', 'Profile') }}
-
-
-
-
-
-
-
-
- {% if first_name or last_name %}
- {{ first_name }} {{ last_name }}
- {% else %}
- {{ function('pll_e', 'Name is not set') }}
- {% endif %}
-
-
-
-
-
{{ function('pll_e', 'Phone') }}:
-
- {% if phone %}
- {{ phone }}
- {% else %}
- {{ function('pll_e', 'Not filled') }}
- {% endif %}
-
-
-
-
-
{{ function('pll_e', 'Email') }}:
- {% if email %}
-
{{ email }}
- {% if activated %}
-
{{ function('pll_e', 'Email is verified') }}
- {% else %}
-
{{ function('pll_e', 'Email is not verified') }}
-
- {% if uuid %}
-
{{ function('pll_e', 'Email with verification link is sent to your email.') }}
- {% endif %}
- {% endif %}
- {% else %}
-
- {% endif %}
-
-
-
-
{{ function('pll_e', 'Linked accounts') }}:
-
- {% if tg_account %}
-
-
-
-
-
-
-
-
- {% else %}
-
- {% endif %}
-
-
+{% set profile_pg = 1 %}
-
-
-
-
- {% if pets %}
- {% for pet in pets %}
- {% include 'pet-card.twig' with { 'item': pet } %}
- {% endfor %}
- {% endif %}
-
-
-
-
-
-
-
- {{ function('pll_e', 'Add a pet') }}
-
-
-
-
+{% extends 'profile/profile-base.twig' %}
-
+{% block profile_content%}
+
{{ function('pll_e', 'Feed subscription') }}
@@ -131,8 +15,7 @@
-
- {% if customer_orders %}
+ {% if customer_orders %}
{% for order in customer_orders %}
{% set meta_data = order.meta_data.order_data %}
{% set shipping_address = order.get_address('shipping') %}
@@ -222,307 +105,4 @@
{% endif %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+{% endblock %}
\ No newline at end of file
diff --git a/wp-content/themes/cosmopet/templates/shop/bestsellers.twig b/wp-content/themes/cosmopet/templates/shop/bestsellers.twig
index 3b54d11..435c949 100644
--- a/wp-content/themes/cosmopet/templates/shop/bestsellers.twig
+++ b/wp-content/themes/cosmopet/templates/shop/bestsellers.twig
@@ -8,7 +8,7 @@
-
{{ function('pll_e', 'BESTSELLERS') }}
+
{{ function('pll_e', 'BESTSELLERS') }}
@@ -26,7 +26,7 @@
{% set product = function('wc_get_product', product_id) %}
{% if product %}
{% set thumbnail = product.get_image_id() ? function('wp_get_attachment_image_url', product.get_image_id(), 'medium') : function('wc_placeholder_img_src') %}
- {% set price = product.get_price_html() %}
+ {% set price = product.get_price() ~ ' ' ~ fn('get_woocommerce_currency_symbol') %}
{% set has_sale = product.is_on_sale() %}
{% set regular_price = product.get_regular_price() %}
{% set sale_price = product.get_sale_price() %}
@@ -49,17 +49,7 @@
{{ price|raw }}
-
- {% if has_sale and regular_price and sale_price %}
-
-
- {{ regular_price }} {{ currency }}
-
-
- -{{ (1 - (sale_price / regular_price)) * 100|round }}%
-
-
- {% endif %}
+
diff --git a/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product.twig b/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product.twig
index b4943e4..de02e8d 100644
--- a/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product.twig
+++ b/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product.twig
@@ -21,13 +21,13 @@