Compare commits

...

167 Commits

Author SHA1 Message Date
Максим Максимов 0beadbf723 Andrei | правки после натяжки новой карточки товара 1 hour ago
Максим Максимов c732040f75 Andrei | изменил логику конструктора товаров. Исключил дубли при двойном значении аттрибута, добавил проверку по полному совпадению категорий 1 day ago
Максим Максимов f88fd2b39f Andrei | исправления после натяжки single страницы 1 day ago
Максим Максимов ad2f1f4268 Andrei | добавил попап для отображения всех характеристик товара 1 day ago
Максим Максимов 3d0813989b TAsk 7783 | Доработка карточки товара (добавил попап для ингридиентов) 1 day ago
Максим Максимов a9f298cbc9 Andrei | рефакторинг - заменил в карточке товара все вызовы функций на методы класса CosmopetProduct 1 day ago
Максим Максимов f062cbf11f Andrei | wip: refacting module shop 1 day ago
Максим Максимов d6ae2ec32f Task 7719 | натяжка верстки single страницы товара 1 day ago
Максим Максимов 8a26495373 Task 7719 | натяжка верстки single товара. 1 day ago
Максим Максимов 69a3325070 Task 7719 | натяжка верстки single страницы товара 1 day ago
Максим Максимов fb27b4b04c Andrei | зафиксировал изменения по рефакторингу 1 day ago
Максим Максимов 5c7182812d Task 7775 | изменил robots.txt добавил в гÐgitignore 1 day ago
Максим Максимов 3077d7ee75 Task 7715 | добавил динамическое разбиение цены доставки на цена + НДС 1 day ago
Максим Максимов 893472a4b9 Task 7715 | исправлено отображение цен доставки на цену с учетом НДС 1 day ago
Максим Максимов cbc6e74957 Task 7721 | Доработки бота отправки заказов 1 day ago
Максим Максимов a83df458dc Andrei | fix texts lang in static pages 1 day ago
Максим Максимов c3e02ed8fc Task 7719 | fix product class definition 7 days ago
Максим Максимов 8cbe7e8aaa Task 7719 | fix пути в main page 7 days ago
Максим Максимов 8e354cb729 Task 7719 | натяжка верстки single товара. 1 week ago
Максим Максимов 7499a8aa24 Task 7719 | натяжка верстки single страницы товара 1 week ago
Максим Максимов 6e2a763cb7 Andrei | зафиксировал изменения по рефакторингу 1 week ago
Максим Максимов 377cabf3cc Task 7515 | правки по верстке (добавил к слайдерам буллеты и стрелочки, изменил главный экран на телефоне и ширину карточек товара в блоке рекоммендуемые, пофиксил кнопку читать подробный отзыв) 2 weeks ago
Максим Максимов 36fda393f6 Task 7515 | верстка отдельной страницы товара 2 weeks ago
Максим Максимов b241ce250b Andrei | fix comment template path recursive 2 weeks ago
Максим Максимов 1f2bfa9fbb Andrei | fix blog featured slider styles 2 weeks ago
Максим Максимов 1fa876ba0a Andrei | fix old tempalte main page style path 2 weeks ago
Максим Максимов e196205d2a Andrei | fix sitemode variable in twig templates didnt work 2 weeks ago
Максим Максимов f49c8e2741 Andrei | fixes of styles conflicts overlay 2 weeks ago
Максим Максимов c4fcf438a4 Andrei | fix style includes for new main page 3 weeks ago
Максим Максимов de3c9caf0f Task 7497 | добавил превью изображение для блока сноска для текста 3 weeks ago
Максим Максимов 8cff3ba603 Task 7497 | добавил новый тип блока в блог (сноска для текста) 3 weeks ago
Andrei-10 70a18a58bc добавил новый тип блока в блог (сноска для текста) 3 weeks ago
Andrei-10 199f7c0966 добавил новый тип блока в блог (сноска для текста) 3 weeks ago
Максим Максимов 8db8383be6 Task 7401 | change text limit to reviews with large photo 3 weeks ago
Максим Максимов 3169f4525d Task 7401 | обновил файл с AFC полями в корне проекта 3 weeks ago
Your Name 2cc35d864d Andrei | восстановил необходимую функцию get_page_type для pixel 3 weeks ago
Максим Максимов 921d807a6f Andrei | фикс синтаксической ошибки посли мерджа коммитов 3 weeks ago
Your Name a482be1ebd fix conflict 3 weeks ago
Антон 56c91ed705 merge conflict 3 weeks ago
Антон f68430e841 Alexandr | change photos in ae photo slider main page 3 weeks ago
Максим Максимов c7354c5d1a Task 7401 | post release small fixes new main page 3 weeks ago
Максим Максимов 3957d0520e Task 7405 | layout improve and bug fixes 3 weeks ago
Максим Максимов 50a330a42b Task 7453 | layout fixes and add read more button to reviews 4 weeks ago
Максим Максимов 692f1d6bf4 Task 7453 | удалил лишний код из multisite functions 4 weeks ago
Максим Максимов c6eac1d1d7 Task 7453 | натяжка верстки главной страницы 4 weeks ago
Your Name e854446fb9 Task:7359 | Разделение функции пикселя в отдельный файл 4 weeks ago
Максим Максимов 841f458e86 git ignore changes 4 weeks ago
Максим Максимов c102505f73 Add ACF json 4 weeks ago
Максим Максимов e2215af90a add AFC export file 4 weeks ago
Your Name ad66d75abb Task:7359 | Добавил проверку теста в класс 4 weeks ago
Your Name 4098b3c7b9 Добавлен тестовый режим метрик 4 weeks ago
Максим Максимов 2bc9c1b0b7 Task 7201 | мобильная верстка новой главной 1 month ago
Максим Максимов be5b10a8cf Task 7199 | пк верстка новой главной страницы 1 month ago
Антон e3f48095fb Maks | formating files and add TO_DO 1 month ago
Антон 3c41995cb6 Maks | Ðнеизвестно кто правил Description на стрÐ. About 1 month ago
Максим Максимов 1590d344e0 Правки главной. Блоки слайдеров. Мобайл 1 month ago
Максим Максимов 4748913e93 Правки верстки новой страницы 1 month ago
Максим Максимов 48fccdc5e4 Fix скрипта слайдера новой страницы 1 month ago
Максим Максимов 3d7dbe3012 Task:7199 | Верстка главной. Слайдеры, галерея 1 month ago
Максим Максимов 17e478c24b Task:7199 | Верстка главной. Блог 1 month ago
Максим Максимов 81845f1271 Task:7199 | Верстка главной. Галерея, квиз, cosmopetx 1 month ago
Максим Максимов e11d03d512 Andrei | fix missspelling in forms 1 month ago
Антон 559fc35e07 Andrei | fix free delivery tab 1 month ago
Антон c0b10e8a0e Merge branch 'master' of https://git.good-production.xyz/Good-Production/cosmopet-architecture 1 month ago
Антон 692bd3e30c Andrei | fix upsales setting 1 month ago
Максим Максимов 0af3851332 Task:7199 | Верстка главно страницы 1 month ago
Антон 361b806265 Andrei | fix bitrix CRM functions in ae site 1 month ago
Максим Максимов 269d8e2e67 Task:7199 | Вёрстка главной страницы 1 month ago
Your Name d6ccf00fe0 Andrei | фикс стилей в карточке товара (мобилка) 1 month ago
Your Name 256e5764e3 Andrei | добавил в каталог плашку not found 1 month ago
Максим Максимов 3d891c588c Andrei | b24 integration fixex 1 month ago
Максим Максимов 2e4273165f remove debug info 1 month ago
Максим Максимов fb31f44bc1 Andrei | fix in catalog 1 month ago
Максим Максимов a85ae6afb6 Andrei | blog module fixes 1 month ago
Максим Максимов 3b2f8a1a15 Andrei | fix order notification hook 1 month ago
Максим Максимов 2fe50948c4 Andrei | fix tg username on production sites 1 month ago
Максим Максимов 746a0eb02e Task:6985 | Правки слайдера главного экрана 1 month ago
Максим Максимов 604248157b Task:6241 | исправил работу кнопки Войдите в комментариях вынес шаблон комментариев в отдельный компонент и twig template 1 month ago
Максим Максимов 9faa1f1fe6 Task 7035 | рефакторинг контроллера чекаута 1 month ago
Максим Максимов fa4ec3fa53 Task:6935 | Правки планшетных стилей в блоге и о нас 1 month ago
Максим Максимов 85dd86e3e2 Task 7177 | выровнял слайды в рекоммендованных товарах 2 months ago
Максим Максимов 56f20aa21d Task:7177 | Изменил регулярку для проверки номера телефона в форме 2 months ago
Максим Максимов f4fe03c18d Task 7177 | Исправлена ajax подгрузка в категориях блога 2 months ago
Максим Максимов 48678b81ce Task:7037 | Вывел самые читаемые посты по категориям 2 months ago
Your Name 0b359d7a1c Task:7039 | Зарегистрировал pll_e функции для Production и Wtb. Поправил верстку 2 months ago
Your Name 3bb1ce349b Task:7039 | Добавил переменные pll_e на страницу production 2 months ago
Максим Максимов b8cb48f3d2 Andrei | правки стилей в блоге 2 months ago
Максим Максимов 91404373f8 Task 7049 | изменил условие вывода выбора языковой версии на наличие 2 и более зарегестрированных языков на сайте 2 months ago
Максим Максимов acdc49c6a0 Task 7031 | Перевод количества дней доставки в CDEK 2 months ago
Максим Максимов 2770ed3e9b Task 6991 | Правки Оформления заказа от 25.06.2025 2 months ago
Максим Максимов fcf828c11b Maks | вывел соц.сети в футере и некоторые пометки TO_DO добавил 2 months ago
Максим Максимов 9033526c00 Task 6991 | Скрыл блок подписки 2 months ago
Максим Максимов de7d2f0bd0 Task 6991 | Вывод инфо об отслеживании в заказах 2 months ago
Максим Максимов bb66bcdacf Task 6991 | Добавлен чекбокс для регистрации в процессе заказа исправлен домен для вывода username бота на ru стенде 2 months ago
Максим Максимов 309c963515 Task 6991 | исправлена логика переводов и вовода ошибок в чекауте 2 months ago
Максим Максимов 5aa925b201 Task:6987 | Правки страницы политики 2 months ago
Максим Максимов 591dfd541b Task:6985 | Правки слайдера на главной 2 months ago
Максим Максимов 855f5f8abc Task:6993 | Правки СЕО 2 months ago
Максим Максимов de3195c897 Task 6989 | исправил логику открытия модальных окон (не открывались в ajax загруженных карточках), дописал и проверил логику отправки в b24 2 months ago
Максим Максимов e1e7a5e718 Task:6987 | Правки контента 2 months ago
Максим Максимов ec954cd75a Task 6977 | кастомизировал js логику cdek widget для отображения выбранного пункта ПВЗ. Добавил в файлы темы перезаписанную версию скрипта (защита от обновления и переустановки плагина) 2 months ago
Максим Максимов 826fd48617 Task 6951 | Рефакторинг модулей Form и Popup 2 months ago
Максим Максимов f56f54c0c0 Task:6949 | Смена порядка блоков на главной.Правки стилей 2 months ago
Максим Максимов 7e5f294615 Task:6937 | Изменение стилей главной страницы и хедера 2 months ago
Максим Максимов 94d77f84da Task:6939 | Правки планшетных стилей 3 2 months ago
Максим Максимов 5a5752f118 Task:6939 | Правки планшетных стилей 2 2 months ago
Максим Максимов 96e2acb7c1 Task:6939 | Правки планшетных стилей 2 months ago
Максим Максимов 0b290a02e7 task 6953 | удалил все упоминания старой логики с SITE_DOMAIN 2 months ago
Максим Максимов 9c4bc3136a Task 6875 | delete menu logic include 2 months ago
Максим Максимов 111292abe4 Task 6875 | вынес меню в отдельный модуль 2 months ago
Максим Максимов 6edee6712d Andrei | удалил лишний закоменченный js 2 months ago
Максим Максимов 963bc398c0 Task 6899 | Добавил редирект с /cart/ на /checkout (если корзина пуста - на главную) 2 months ago
Максим Максимов 3f5eebe9e7 Task 6929 | рефактор кода в формах 2 months ago
Максим Максимов 4096f8a8d5 Andrei | фикс бага js при первом добавлении товара с открытием корзины 2 months ago
Максим Максимов 60bcacea61 Task 6883 | удалил лишний неиспользуемый код, разнес на отдельные файлы по их функциональному назначению 2 months ago
Максим Максимов c37295ba6a Task 6875 | Перенес логику меню в отдельный модуль 2 months ago
Максим Максимов e266a8ece7 Task 6875 | Все меню передал с использованием twig (удалил Walkers и лишние данные для context) 2 months ago
Максим Максимов f157d03109 Task 6945 | исправлены стили на странице успешного заказа 2 months ago
Максим Максимов 9c447b5020 Andrei | отправка форм и заказов в TG 2 months ago
Your Name 13626b84a1 Task:6873 | Исправление стилей на странице чекаут (mobile) 2 months ago
Your Name b60ab41c86 Task:6873 | Исправление стилей на странице чекаут 2 months ago
Максим Максимов 9be19c3d72 Убрал ошбку в module-controller форм 2 months ago
Максим Максимов 3dfad90868 Task 6879 | правки переводов в англ версии checkout 2 months ago
Your Name b1c16bb1ea Task:6887 | Изменение логики авторизации. Правки стилей и верстки поп-ап 2 months ago
Максим Максимов db11843fca Task 6875 | пересобрал меню и его вывод с помощью WP_nav_menu 2 months ago
Максим Максимов b7312ebf1b Task 6913 | Исправил вывод вариантов в карточке товара. Добавил доп поле для кастомного размера не связанное с "Вес" 2 months ago
Максим Максимов 4faac3ec34 Task 6899 | поправил стили корзины на странице чекаута 2 months ago
Максим Максимов 1c412ad8ab Task 6875 | Регистрация динамического меню 2 months ago
Максим Максимов edb33e1bad Task 6885 | исправил name у поля формы подписки что бы срабатывал 2 months ago
Максим Максимов 41c397c76c Task:6871 | Правки поп-ап Предложите статью 2 months ago
Максим Максимов a06af1ecc3 Maks | слегка отрефакторил файлы мультиязычности и мультисайтовости, решая вопрос по передаче событий покупки в метрику и Pixel 2 months ago
Максим Максимов beffd44cb9 Task 5453 | вывел в админке выпадающий список с выбором ед.измерения, которая при заполнении выводится вместо КГ на подробной странице и в листинге товаров 2 months ago
Максим Максимов 413728f3d9 Правки админ панели и карточки товара 2 months ago
Максим Максимов 4e6a703392 Task 6881 | исправил карточку товара 2 months ago
Максим Максимов 0584522ccf Andrei | восстановлена логика входа в систему 2 months ago
Максим Максимов 9423d3a89a Task 5453 | wif: разнес функции админки в отдельный файл 2 months ago
Your Name 1c2dedb195 Task:6815 | Правки верстки и стилей WTB 2 months ago
Максим Максимов b0ac036409 Task:6815 | Правки верстки и стилей Production 2 months ago
Максим Максимов cf832954c1 Task:6815 | Правки верстки и стилей About 2 months ago
Максим Максимов 702f0b40cc Task:6813 | Правки блока home и отступов 2 months ago
Максим Максимов 44df07bb39 task 6809 | правка сетки каталога в адаптиве 2 months ago
Your Name cbdd4df073 Task 6809 | исправлена работа формы изменения адреса подписки 2 months ago
Максим Максимов ccd7754fb5 Task 6811 | доп строки для перевода 2 months ago
Максим Максимов 4298d9af6e Task 6811 | правки стилей (очистил лишние и удалил символ валюты из after) 2 months ago
Максим Максимов d8718b02d9 Task 6811 | удалил лишние стили (модальных форм из profile) 2 months ago
Максим Максимов cfd53e815f Task 6811 | восстановлена работоспособность функции редактирования питомца 2 months ago
Максим Максимов 52e70c2d80 Task 6811 | вынес дублирующийся код в отдельный подключаемый файл 2 months ago
Максим Максимов 1c123d364c Task 6811 | вывод символа валюты в списке заказов 2 months ago
Максим Максимов b2c2975247 Task 6811 | фикс стилей в выпадающих списках 2 months ago
Максим Максимов a61b574967 Task 6811 | исправлен вывод имени в форме редактирования 2 months ago
Максим Максимов eb4a95e533 Task 6811 | добавлены строковые переводы в профиль 2 months ago
Максим Максимов dc3b95de9e Task 6811 | исправлен баг с неправильным порядком вызова элементов и рендера шаблонов 2 months ago
Максим Максимов 1aaeea3cfb task 6809 | фикс бага с выводом аттрибутов в рекоммендуемых товарах (на вход функции необходимо дать Timber а не WC объект) 2 months ago
Максим Максимов 16e38a78b4 task 6809 | очистил лишние стили в single-product.css 2 months ago
Максим Максимов 4411f0bd01 task 6809 | удалены лишние файлы WC (остались части шаблонов в php файлах woocommerce (в основном кастомизированные блоки для доставки - завел подзадачу на перенос шаблонов в twig в беклог) ) 2 months ago
Максим Максимов dddac1236f task 6809 | вынес выбор опции подписки в отдельный twig шаблон 2 months ago
Максим Максимов 0189c54e03 task 6809 | перенес assets из папки woocommerce, изменил размер вывода миниатюры в карточке товара на medium-size 2 months ago
Максим Максимов 7e5e4b0cb0 Task:6813 | Правки верстки и стилей на странице статьи в блоге 2 months ago
Максим Максимов 63184c1a8e Task:6813 | Правки стилей и верстки архива блога 2 months ago
Максим Максимов fe80024cc3 Task 6807 | добавил перевод для фразы пустой корзины 2 months ago
Максим Максимов 29cb32aa2e Task 6807 | фикс багов при добавлении в корзину 2 months ago
Максим Максимов 37e3008e51 Task 6831 | убрал greyscale у товаров не в наличии 2 months ago
Максим Максимов 00760ed6aa Task 6807 | фикс стилей корзины ширина не соответствовала 2 months ago
Your Name e00a96eaa7 Task 6809 | правки каталога AE исправил добавление подписочных товаров в корзину 2 months ago
Your Name 2f70bc5a50 Task 6809 | вывод цены подписочного товара как One-time Purschare 2 months ago
Your Name 38f9f05bf8 Task 6809 | правки каталога AE - добавил регистрацию непереведенных строк 2 months ago
Andrei-10 348c9bbf68 Task 6807, 6831 | фикс багов в каталоге и странице чекаута 2 months ago
  1. 4
      .gitignore
  2. BIN
      .tmb/l1_d3AtY29udGVudC90aGVtZXMvY29zbW9wZXQtdGltYmVyL3NjcmVlbnNob3QucG5n1744272629.png
  3. 1
      .well-known/apple-developer-merchantid-domain-association
  4. 8147
      afc_fields.json
  5. 14
      robots.txt
  6. 9
      wp-content/ai1wm-backups/.htaccess
  7. 1
      wp-content/ai1wm-backups/index.html
  8. 1
      wp-content/ai1wm-backups/index.php
  9. 3
      wp-content/ai1wm-backups/robots.txt
  10. 13
      wp-content/ai1wm-backups/web.config
  11. 2
      wp-content/themes/cosmopet/404.php
  12. 49
      wp-content/themes/cosmopet/assets/modules/shop/css/cart-loading.css
  13. 746
      wp-content/themes/cosmopet/assets/modules/shop/css/checkout.css
  14. 515
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-core.css
  15. 565
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-desktop.css
  16. 0
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-mobile.css
  17. 0
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-order.css
  18. 4
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-tablet.css
  19. 0
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-ultra.css
  20. 901
      wp-content/themes/cosmopet/assets/modules/shop/css/product-style.css
  21. 219
      wp-content/themes/cosmopet/comments.php
  22. 21
      wp-content/themes/cosmopet/functions.php
  23. 263
      wp-content/themes/cosmopet/global-functions/core-functions.php
  24. 11
      wp-content/themes/cosmopet/global-functions/global-constaints.php
  25. 380
      wp-content/themes/cosmopet/global-functions/metrics-functions.php
  26. 358
      wp-content/themes/cosmopet/global-functions/multilang-functions.php
  27. 302
      wp-content/themes/cosmopet/global-functions/multisite-functions.php
  28. 16
      wp-content/themes/cosmopet/global-functions/plugin-override-functions.php
  29. 25
      wp-content/themes/cosmopet/global-functions/post-types-functions.php
  30. 31
      wp-content/themes/cosmopet/global-functions/redirect-functions.php
  31. 18
      wp-content/themes/cosmopet/global-functions/seo-functions.php
  32. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-1.png
  33. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-1.png.webp
  34. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-2.png
  35. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-2.png.webp
  36. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-3.png
  37. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-3.png.webp
  38. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-4.png
  39. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-4.png.webp
  40. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-5.png
  41. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-5.png.webp
  42. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-main-card.png
  43. BIN
      wp-content/themes/cosmopet/modules/author/assets/img/author-main-card.png.webp
  44. 11
      wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-desktop.css
  45. 50
      wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-mobile.css
  46. 12
      wp-content/themes/cosmopet/modules/blog/assets/css/gp-style-tablet.css
  47. 8
      wp-content/themes/cosmopet/modules/blog/components/archive/component-controller.php
  48. 1
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/css/style.css
  49. BIN
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/img/author-card-mb.png
  50. BIN
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/img/author-card-mb.png.webp
  51. BIN
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/img/author-card.png
  52. BIN
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/img/author-card.png.webp
  53. BIN
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/img/star-1.png
  54. BIN
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/img/star-1.png.webp
  55. BIN
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/img/star-2.png
  56. BIN
      wp-content/themes/cosmopet/modules/blog/components/author-banner/assets/img/star-2.png.webp
  57. 53
      wp-content/themes/cosmopet/modules/blog/components/comments/component-controller.php
  58. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/discount-bg-sm.png
  59. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/discount-bg-sm.png.webp
  60. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/discount-bg.png
  61. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/discount-bg.png.webp
  62. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/editorial-card.png
  63. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/editorial-card.png.webp
  64. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/editorial-head-icon.png
  65. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/editorial-head-icon.png.webp
  66. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/editorial-head-star.png
  67. BIN
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/img/editorial-head-star.png.webp
  68. 6
      wp-content/themes/cosmopet/modules/blog/components/featured-slider/assets/css/gp-style-desktop.css
  69. 23
      wp-content/themes/cosmopet/modules/blog/components/main-page-block/assets/js/main-page-blog.js
  70. 25
      wp-content/themes/cosmopet/modules/blog/components/main-page-block/component-controller.php
  71. 38
      wp-content/themes/cosmopet/modules/blog/components/most-read/component-controller.php
  72. 28
      wp-content/themes/cosmopet/modules/blog/components/most-read/component-template.twig
  73. 19
      wp-content/themes/cosmopet/modules/blog/components/single/assets/css/gp-style-desktop.css
  74. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/accent/assets/img/preview.png
  75. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/accent/assets/img/preview.png.webp
  76. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/alerts/assets/img/preview.png
  77. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/alerts/assets/img/preview.png.webp
  78. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/block_img/assets/img/preview.png
  79. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/block_img/assets/img/preview.png.webp
  80. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/button_block/assets/img/preview.png
  81. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/button_block/assets/img/preview.png.webp
  82. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/image/assets/img/preview.png
  83. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/image/assets/img/preview.png.webp
  84. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/assets/img/preview.png
  85. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v1/assets/img/preview.png.webp
  86. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/assets/img/preview.png
  87. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/list_v2/assets/img/preview.png.webp
  88. 7
      wp-content/themes/cosmopet/modules/blog/editor-blocks/notice/assets/css/style.css
  89. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/notice/assets/img/preview.png
  90. 48
      wp-content/themes/cosmopet/modules/blog/editor-blocks/notice/editor-block-controller.php
  91. 4
      wp-content/themes/cosmopet/modules/blog/editor-blocks/notice/editor-block-template.twig
  92. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/swiper/assets/img/preview.png
  93. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/swiper/assets/img/preview.png.webp
  94. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/img/preview.png
  95. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/table/assets/img/preview.png.webp
  96. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/img/preview.png
  97. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/texts/assets/img/preview.png.webp
  98. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/video/assets/img/preview.png
  99. BIN
      wp-content/themes/cosmopet/modules/blog/editor-blocks/video/assets/img/preview.png.webp
  100. 53
      wp-content/themes/cosmopet/modules/blog/module-ajax-controller.php
  101. Some files were not shown because too many files have changed in this diff Show More

4
.gitignore vendored

@ -3,7 +3,7 @@
# GP | SEO
sitemap*.xml
!robots.txt
robots.txt
yandex_*.html
google_*.html
yandex_turbo.xml
@ -71,6 +71,7 @@ wp-content/plugins/*
*.tbk
*.csv
*.json
!afc_fields.json
*.BAK
# GP | Dirs & files
@ -84,6 +85,7 @@ timthumb_cache/
webstat/
.idea/
.tmb/
.well-known/
.csscomb.json
sftp-config.json
bower.json

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -15,12 +15,7 @@ Disallow: */embed
Disallow: */wlwmanifest.xml
Disallow: /xmlrpc.php
Allow: */uploads
<<<<<<< HEAD
Sitemap: https://cosmopet.ru/sitemap_index.xml
=======
Sitemap: https://cosmopet.ae/sitemap_index.xml
>>>>>>> 2323f31 (Fix | bug fix)
User-agent: GoogleBot
Disallow: /cgi-bin
Disallow: /?
@ -51,12 +46,7 @@ Allow: /wp-*.jpg
Allow: /wp-*.jpeg
Allow: /wp-*.gif
Allow: /wp-admin/admin-ajax.php
<<<<<<< HEAD
Sitemap: https://cosmopet.ru/sitemap_index.xml
=======
Sitemap: https://cosmopet.ae/sitemap_index.xml
>>>>>>> 2323f31 (Fix | bug fix)
User-agent: Yandex
Disallow: /cgi-bin
Disallow: /?
@ -81,11 +71,7 @@ Allow: /wp-*.jpg
Allow: /wp-*.jpeg
Allow: /wp-*.gif
Allow: /wp-admin/admin-ajax.php
<<<<<<< HEAD
Sitemap: https://cosmopet.ru/sitemap_index.xml
=======
Sitemap: https://cosmopet.ae/sitemap_index.xml
>>>>>>> 2323f31 (Fix | bug fix)
Clean-Param: utm_source&utm_medium&utm_campaign&etext&add-to-cart&per_page&per_row&from&attribute_pa_weight&attribute_pa_ves-upakovki
Clean-Param: openstat

@ -1,9 +0,0 @@
<IfModule mod_mime.c>
AddType application/octet-stream .wpress
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>

@ -1 +0,0 @@
Kangaroos cannot jump here

@ -1 +0,0 @@
Kangaroos cannot jump here

@ -1,3 +0,0 @@
User-agent: *
Disallow: /ai1wm-backups/
Disallow: /wp-content/ai1wm-backups/

@ -1,13 +0,0 @@
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".wpress" mimeType="application/octet-stream" />
</staticContent>
<defaultDocument>
<files>
<add value="index.php" />
</files>
</defaultDocument>
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>

@ -6,4 +6,4 @@
$context = Timber::get_context();
Timber::render('templates/404.twig', $context);
?>
?>

@ -0,0 +1,49 @@
/* Стили для загрузки корзины на single странице */
.product-incart__wrap.loading {
position: relative;
pointer-events: none;
opacity: 0.7;
}
.product-incart__wrap.loading::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.8);
z-index: 10;
}
.product-incart__wrap.loading::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 20px;
height: 20px;
margin: -10px 0 0 -10px;
border: 2px solid #f3f3f3;
border-top: 2px solid #3498db;
border-radius: 50%;
animation: spin 1s linear infinite;
z-index: 11;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Стили для кнопок во время загрузки */
.product-incart__wrap.loading .product-incart__btn {
opacity: 0.5;
pointer-events: none;
}
/* Стили для счетчика во время загрузки */
.product-incart__wrap.loading .product-incart__count {
opacity: 0.5;
}

@ -0,0 +1,746 @@
.order{
display: flex;
}
.order__title{
font-family: var(--font-family);
font-weight: 700;
font-size: 24px;
line-height: 117%;
text-transform: uppercase;
color: var(--text-black);
}
.order__contacts{
width: calc(50% - 0.5px);
padding: 24px;
border-right: 1px solid #121212;
}
.order-contacts__header{
display: flex;
justify-content: space-between;
align-items: center;
}
.order-contacts__form{
margin-top: 24px;
}
.order-contacts__delivery{
margin-top: 47.5px;
padding-top: 48px;
border-top: 1px solid var(--background-grey);
}
.order-contacts-deliver__item{
margin-top: 24px;
}
.order-contacts-deliver__date{
padding: 8px;
border-radius: 24px;
background: var(--background-grey);
}
.order-contacts-deliver__date .form-input-radio__item{
margin-top: 24px;
}
.order-contacts-deliver__date .form-input-radio__item:first-child{
margin-top: 0;
}
.order__your{
width: calc(50% - 0.5px);
padding: 24px 24px 24px 48px;
background: var(--background-grey);
}
.order-your__products{
margin-top: 48px;
}
.order-your-products__item{
margin-top: 16px;
display: flex;
justify-content: space-between;
}
.order-your-products__left{
display: flex;
align-items: center;
}
.order-your-products__img{
width: 40px;
aspect-ratio: 1;
border-radius: 16px;
}
.order-your-products__content{
margin-left: 16px;
}
.order-your-products__name{
font-family: var(--font-family);
font-weight: 500;
font-size: 12px;
line-height: 133%;
color: var(--text-black);
text-decoration: none;
}
.order-your-products__description{
margin-top: 8px;
font-family: var(--font-family);
font-weight: 500;
font-size: 12px;
line-height: 133%;
color: var(--text-6);
}
.order-your-products__description span{
font-weight: 700;
}
.order-your-products__description span::before{
margin-left: 3px;
content: 'x ';
}
.order-your-products__right{
display: flex;
}
.order-your-products__count{
font-family: var(--font-family);
font-weight: 700;
font-size: 12px;
line-height: 133%;
text-align: right;
color: var(--text-6);
}
.order-your-products__count::before{
content: 'x';
}
.order-your-products__price{
margin-left: 16px;
font-family: var(--font-family);
font-weight: 700;
font-size: 12px;
line-height: 133%;
text-align: right;
color: var(--text-black);
}
.order-your__calculation{
margin-top: 48px;
}
.order-your__promo{
display: flex;
}
.order-your-promo__button{
margin-left: 8px;
}
.order-your-calculation__item{
margin-top: 24px;
display: flex;
justify-content: space-between;
align-items: center;
}
.order-your-calculation__title{
font-family: var(--font-family);
font-weight: 500;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
}
.order-your-calculation__value{
font-family: var(--font-family);
font-weight: 700;
font-size: 20px;
line-height: 200%;
text-transform: uppercase;
text-align: right;
color: var(--text-black);
}
.order-your-calculation__value--discount{
background: var(--gradient-red);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.order-your-calculation__description{
font-family: var(--font-family);
font-weight: 500;
font-size: 12px;
line-height: 133%;
text-align: right;
color: var(--text-9);
}
.order-your-calculation__line{
margin-top: 23px;
border: 1px solid var(--background-9);
}
.order-your-calculation__result{
font-family: var(--font-family);
font-weight: 700;
font-size: 24px;
line-height: 117%;
text-transform: uppercase;
color: var(--text-black);
}
.order-your-calculation__submit{
margin-top: 48px;
}
@media only screen and (max-width: 1200px) {
.order{
display: block;
}
.order__contacts, .order__your{
border: none;
width: 100%;
}
}
@media only screen and (max-width: 720px) {
.order__title{
max-width: 181px;
font-size: 20px;
line-height: 120%;
}
.order__your{
margin-top: 16px;
}
.order__contacts{
padding: 24px 16px;
}
.order__your{
padding: 40px 16px 9px 16px;
}
.order-your__promo{
display: block;
}
.order-your-promo__button{
margin-left: 0;
margin-top: 24px;
width: 100%;
}
.order-your-products__content{
max-width: 164px;
}
.order-your-products__count, .order-your-products__price{
flex-shrink: 0;
}
}
/* toggle */
.toggle{
padding-top: 26px;
padding-bottom: 25px;
border-bottom: 1px solid var(--text-3);
position: relative;
}
.toggle::after{
content: '';
position: absolute;
top: 24px;
right: 0;
width: 24px;
aspect-ratio: 1;
background-image: url(../img/svg/main/black-x.svg);
transform: rotate(45deg);
transition: transform .2s;
pointer-events: none;
}
.toggle.active::after{
transform: rotate(0deg);
}
.toggle__title{
padding-right: 30px;
font-family: var(--font-family);
font-weight: 700;
font-size: 16px;
line-height: 125%;
color: var(--text-black);
cursor: pointer;
}
.toggle__block-content{
height: 0;
overflow: hidden;
transition: height .2s ease-out;
}
.toggle__content{
padding-top: 24px;
}
.toggle-content__item{
margin: 12px -12px -12px -12px;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.toggle-content__item:first-child{
margin-top: 0;
}
.toggle-content__element{
margin: 12px;
}
.toggle-content__element--width-perc-100{
width: 100%;
}
.toggle-content__element--width-perc-50{
width: calc(50% - 24px);
}
.toggle__text{
font-family: var(--font-family);
font-weight: 400;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
}
/* toggle */
/* checkbox */
.checkbox{
display: flex;
align-items: center;
cursor: pointer;
}
.checkbox__state{
border-radius: 4px;
width: 18px;
height: 18px;
border: 2px solid var(--background-black);
background: var(--background-white);
flex-shrink: 0;
}
.checkbox.active .checkbox__state{
background-color: var(--background-black);
background-image: url(../img/svg/main/arrow-selected-white.svg);
background-repeat: no-repeat;
background-position: center;
}
.checkbox__input{
display: none;
}
.checkbox__label{
padding-left: 8px;
font-family: var(--font-family);
font-weight: 400;
font-size: 20px;
line-height: 120%;
color: var(--text-dark);
cursor: pointer;
}
.checkbox__label a{
color: #76ce75;
text-decoration: none;
}
.checkbox--small{
margin-top: 24px;
}
.checkbox--small .checkbox__label{
padding-left: 24px;
font-weight: 500;
font-size: 12px;
line-height: 133%;
}
/* checkbox */
@media (max-width: 720px) {
.modal-map__control{
flex-wrap: wrap;
}
.modal-map-control__item{
width: calc(100% - 24px);
}
.form__full-mobile{
width: 100%;
border-radius: 0;
border: none;
}
}
.container{
max-width: 100% !important;
padding: 0;
}
.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-20_0, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-auto, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-20_0, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto, .col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-20_0, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-auto{
padding: 0;
}
.page-title{
display: none;
}
.modal-map-control-item__input{
display: none;
}
.page .main-page-wrapper{
background: #fff !important;
}
.modal-map-control-item__content{
width: 100%;
}
.woocommerce-shipping-methods{
display: flex;
}
.visually-hidden {
position: absolute !important;
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
padding: 0 !important;
border: 0 !important;
height: 1px !important;
width: 1px !important;
overflow: hidden;
}
.modal-map-control__item{
display: flex;
flex-direction: column;
}
.modal-map-control__item > label {
flex-grow: 1;
display: flex;
flex-direction: column;
position: relative;
}
.modal-map-control__item > label > *{
flex-grow: 1;
}
.modal-map-control__item:nth-child(n){
margin: 12px;
margin-bottom: 12px;
}
.modal-map-control-item__title{
text-align: left;
}
.modal-map-control__item > label{
margin-bottom: 0;
}
.open-pvz-btn{
position: absolute !important;
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
padding: 0 !important;
border: 0 !important;
height: 1px !important;
width: 1px !important;
overflow: hidden;
}
.order-contacts__delivery.loading{
position: relative;
min-height: 110px;
}
.order-contacts__delivery.loading::before{
content: '';
z-index: 150;
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba(255,255,255, .6);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' width='200' height='200' style='shape-rendering: auto; display: block; background: transparent;'%3E%3Cg%3E%3Ccircle stroke-dasharray='164.93361431346415 56.97787143782138' r='35' stroke-width='10' stroke='%23000000' fill='none' cy='50' cx='50'%3E%3CanimateTransform keyTimes='0;1' values='0 50 50;360 50 50' dur='1s' repeatCount='indefinite' type='rotate' attributeName='transform'/%3E%3C/circle%3E%3Cg/%3E%3C/g%3E%3C!-- %5Bldio%5D generated by https://loading.io --%3E%3C/svg%3E");
background-size: 48px;
background-position: center;
background-repeat: no-repeat;
}
.shop_table .woocommerce-shipping-totals{
display:none;
}
.amount{
color: inherit;
}
.order-your-products__item{
align-items: center;
}
.wc_payment_methods.payment_methods.methods{
display: none;
}
.woocommerce-terms-and-conditions-wrapper{
}
.woocommerce-privacy-policy-text p{
color: #121212 !important;
font-size: 14px;
}
.woocommerce-privacy-policy-text a{
color: #121212 !important;
font-size: 14px;
text-decoration: underline;
}
.woocommerce-terms-and-conditions-checkbox-text a{
color: #121212 !important;
font-size: 14px;
text-decoration: underline;
}
.woocommerce-checkout.processing {
position: relative;
opacity: 0.5;
pointer-events: none;
}
.woocommerce-checkout .blockUI.blockOverlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(242, 242, 242, 0.7) !important;
z-index: 9999;
}
.woocommerce-checkout .blockUI-message {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10000;
font-size: 16px;
color: #333;
}
.cabinet-card__button{
padding: 8px 8px 6px 0;
font-family: var(--font-family);
font-weight: 600;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
background: none;
border: none;
position: relative;
text-decoration: none;
}
.cabinet-card__button::before{
content: '';
position: absolute;
bottom: 6px;
width: calc(100% - 8px);
height: 1px;
background: var(--text-black);
transition: opacity .2s ease-out;
}
.cabinet-card__button:hover{
opacity: .8;
}
.form-agreement{
display: flex;
}
.form-agreement__check{
display: flex;
align-items: center;
margin-top: 1rem;
}
.form-agreement__square{
width: 18px;
aspect-ratio: 1;
border-radius: 4px;
border: 2px solid var(--background-black);
}
.form-agreement__label{
margin-left: 8px;
font-family: var(--font-family);
font-weight: 400;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
}
.form-agreement__input{
display: none;
}
.form-agreement__input:checked + .form-agreement__square{
border: none;
background: var(--gradient-blue);
position: relative;
}
.form-agreement__input:checked + .form-agreement__square::after{
content: '';
position: absolute;
top: 1px;
left: 1px;
width: 16px;
aspect-ratio: 1;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.50681 0.784901C9.86151 1.14024 9.86101 1.71584 9.50567 2.07055L4.35112 7.216C3.99601 7.57049 3.42085 7.57024 3.06604 7.21544L0.493317 4.64271C0.138295 4.28769 0.138295 3.71208 0.493317 3.35706C0.848339 3.00204 1.42394 3.00204 1.77897 3.35706L3.70944 5.28753L8.22116 0.783766C8.57649 0.429057 9.1521 0.429565 9.50681 0.784901Z' fill='white'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: center;
}
.modal-map__control--delivery > p{
color: #121212;
padding-left: 1rem;
}
.form-agreement__label a{
color: #121212;
text-decoration: underline;
}
.form-input__error.active{
display: block;
}
.order-your__promo{
position: relative;
}
.woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout{
display: none;
}
.woocommerce-terms-and-conditions-wrapper, .woocommerce-message{
display: none;
}
.woocommerce-checkout-review-order-table tr{
border: none !important;
}
.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-20_0, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-auto, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-20_0, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto, .col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-20_0, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-auto {
padding-right: 0 !important;
padding-left: 0 !important;
}
.cdek-office-info{
display: none;
}
.quantity-control {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}
.quantity-decrease, .quantity-increase {
background: #f0f0f0;
border: none;
padding: 5px 10px;
cursor: pointer;
font-size: 16px;
border-radius: 4px;
}
.quantity-decrease:hover, .quantity-increase:hover {
background: #e0e0e0;
}
.quantity-input {
width: 50px;
text-align: center;
border: 1px solid #ccc;
border-radius: 4px;
padding: 5px;
}
.form-row{
margin-top: 1rem;
}
.woocommerce-order-overview{
}
.woocommerce .woocommerce-customer-details .woocommerce-column__title, .woocommerce-order-details__title{
margin-bottom: .5em;
margin-top: 1em;
}
.woocommerce ul.order_details{
margin: 3rem 0;
}
.woocommerce .woocommerce-customer-details address p{
margin-top: .5em;
}
.woocommerce .woocommerce-customer-details .woocommerce-customer-details--email::before,
.woocommerce .woocommerce-customer-details .woocommerce-customer-details--phone::before {
margin-top: -.25em;
}
.woocommerce-order-overview__order.order{
display: flex;
flex-direction: column;
}
.woocommerce-order{
max-width: calc(100% - 30px);
margin-right: auto;
margin-left: auto;
}
@media (max-width: 640px) {
.woocommerce ul.order_details li {
margin-right:0em;
font-size: .715em;
line-height: 1.3;
border-right: none;
border-bottom: 1px dashed #cfc8d8;
padding-right: 2em;
width: 100%;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
}

@ -0,0 +1,515 @@
/* breadcrumbs */
.breadcrumbs{
margin: 24px;
display: flex;
align-items: center;
}
.breadcrumbs__item{
display: block;
padding: 0px 16px;
font-family: var(--font-family);
font-weight: 700;
font-size: 16px;
line-height: 125%;
color: var(--text-6);
text-decoration: none;
position: relative;
}
.breadcrumbs__item:first-child{
padding-left: 0;
}
.breadcrumbs__item:nth-child(n+2)::before{
content: '';
position: absolute;
top: -2px;
left: -12px;
width: 24px;
aspect-ratio: 1;
background-image: url(../img/svg/main/arrow-breadcrumbs.svg);
background-repeat: no-repeat;
background-size: contain;
}
/* breadcrumbs */
/* compound */
.compound{
margin: -5px;
min-height: 33.95px;
display: flex;
align-items: start;
flex-wrap: wrap;
}
.compound__item{
margin: 5px;
padding: 4px 8px;
font-family: var(--font-family);
font-weight: 700;
font-size: 12px;
line-height: 133%;
color: var(--text-black);
border-radius: 16px;
background-color: var(--background-white);
display: block;
text-decoration: none;
}
.compound__item:first-child{
margin-left: 0;
}
.product__footer{
margin: 48px 24px 24px;
display: flex;
justify-content: center;
}
.product__footer--error{
margin: 45px 0;
}
/* compound */
/* button */
.button{
font-family: var(--font-family);
font-weight: 600;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
border-radius: 20px;
cursor: pointer;
}
.button--100-perc{
width: 100%;
}
.button--white{
padding: 11px 24px;
text-align: center;
background-color: var(--background-white);
border: 1px solid var(--background-black);
transition: opacity .2s ease-out;
}
.button--white:hover{
opacity: .8;
}
.button--white.active{
background: var(--background-black);
color: var(--background-white);
}
.button--gradient{
background: var(--gradient-turquoise);
border: none;
transition: opacity .2s ease-out;
}
.button--gradient:hover{
opacity: .8;
}
.button--base{
padding: 12px 24px;
}
.button--high{
height: 56px;
padding: 16px 24px 24px 24px;
font-weight: 700;
text-align: center;
position: relative;
}
.button--high-46{
padding: 12px 24px;
font-size: 20px;
font-weight: 700;
line-height: 24px;
}
.button--icon{
padding-right: 56px;
text-align: start;
}
.button--filter::after{
content: '';
position: absolute;
top: 16px;
right: 24px;
width: 24px;
aspect-ratio: 1;
background-image: url(../img/svg/main/filter.svg);
background-repeat: no-repeat;
background-size: contain;
}
.button--black{
padding: 7px 15px;
font-family: var(--font-family);
font-weight: 500;
font-size: 24px;
line-height: 133%;
color: var(--text-white);
background: var(--background-black);
border: 1px solid var(--text-white);
}
.button--link{
text-decoration: none;
}
.button--red-48-px{
border-radius: 48px;
}
.to-know{
/* width: 100%; */
border: none;
transition: opacity .2s ease-out;
text-decoration: none;
text-transform: uppercase;
}
.product__item .to-know{
margin-right: auto;
margin-left: auto;
width: auto;
display: flex;
}
.to-know--start{
justify-content: start;
padding-left: 0;
}
.to-know:hover{
opacity: .8;
}
.to-know p{
padding-bottom: 4px;
font-family: var(--font-family);
font-weight: 700;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
border-bottom: 1px var(--text-black) solid;
cursor: pointer;
}
.to-know--background-none{
background: none;
}
.back{
margin-top: 16px;
margin-left: 16px;
padding: 8px;
padding-left: 32px;
background: none;
border: none;
font-family: var(--font-family);
font-weight: 600;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
text-decoration: none;
position: relative;
}
.back::before{
content: '';
position: absolute;
top: 8px;
left: 0;
margin-right: 8px;
width: 24px;
height: 24px;
background-image: url(../img/svg/main/arrow-back.svg);
}
.back::after{
content: '';
position: absolute;
bottom: 6px;
left: 0;
width: calc(100% - 8px);
height: 1px;
background: var(--text-black);
}
/* button */
.subscription{
}
.subscription__item{
display: flex;
color: var(--text-black);
font-family: var(--font-family);
font-weight: 500;
line-height: 120%;
}
.subscription__item:nth-last-child(n + 2){
border-bottom: 1px solid var(--background-9);
}
.subscription__item span{
font-weight: 700;
}
.subscription__item span small{
font-size: 16px;
}
.subscription__status{
color: var(--text-black);
}
.subscription__status--close{
color: var(--text-red);
}
.subscription__status--end{
color: var(--text-green);
}
.subscription__add{
width: 100%;
}
.subscription__add-header{
}
.subscription__add-product{
align-items: start;
}
.subscription__add-product > *:not(:first-child){
padding-top: 14px;
}
.subscription__add-title{
font-family: var(--font-family);
font-weight: 600;
line-height: 133%;
}
.subscription__add-content{
}
.tabs__buttons{
margin: -12px;
display: flex;
flex-wrap: wrap;
}
.tabs__content-wrap{
margin-top: 24px;
}
.tabs__content{
display: none;
}
.tabs__content.active{
display: block;
}
.wcsatt-add-to-subscription-wrapper,
form.cart .quantity,
.detail__content .in-stock,
.wcsatt-options-prompt-label-subscription,
.wcsatt-options-product-dropdown {
display: none;
}
.wcsatt-options-product-wrapper {
display: block!important;
}
form.cart .single_add_to_cart_button {
margin: 8px 0;
width: 345.89px;
max-width: 100%;
height: 56px;
padding: 16px 24px 16px 24px;
font-weight: 700;
text-align: center;
position: relative;
background: var(--gradient-turquoise);
border: none;
transition: opacity .2s ease-out;
font-family: var(--font-family);
font-size: 20px;
line-height: 120%;
color: var(--text-black);
border-radius: 20px;
text-transform: none;
cursor: pointer;
}
form.cart .single_add_to_cart_button:hover {
opacity: 0.8;
}
.subscription-option-details span {
color: #000;
cursor: pointer;
}
ul.wcsatt-options-product, .wcsatt-options-product-dropdown {
margin: 0;
}
.wcsatt-options-wrapper input, .wcsatt-add-to-subscription-wrapper input {
width: 18px;
aspect-ratio: 1;
accent-color: var(--background-black);
cursor: pointer;
}
.subscription-option label {
display: flex;
align-items: center;
gap: 5px;
}
form.cart {
margin: 25px 0 -48px;
}
ul.wcsatt-options-product--hidden, .wcsatt-options-product-dropdown--hidden {
display: block!important;
}
.detail-block__form{
margin-top: 48px;
display: flex;
flex-direction: column;
}
.wcsatt-options-prompt-text{
font-family: 'Craftwork Grotesk';
font-style: normal;
font-weight: 700;
font-size: 20px;
line-height: 24px;
text-transform: uppercase;
color: #000000;
}
.subscription-option-details, .wcsatt-options-prompt-action, .subs-text-title{
font-size: 20px;
line-height: 24px;
display:flex;
gap: 12px;
align-items: center;
}
.subs-text{
max-width: 322px;
font-family: 'Craftwork Grotesk';
font-style: normal;
font-weight: 500;
font-size: 16px;
line-height: 20px;
margin-bottom: 20px;
}
@media (max-width: 640px) {
.subscription-option-details, .wcsatt-options-prompt-action, .subs-text-title{
font-size: 18px;
line-height: 22px;
display:flex;
gap: 12px;
align-items: center;
}
}
input:checked + .subscription-option-details::before, input:checked + .wcsatt-options-prompt-action::before{
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10Z' fill='white'/%3E%3Cpath d='M1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10Z' stroke='url(%23paint0_radial_11890_46040)' stroke-width='2'/%3E%3Ccircle cx='10' cy='10' r='6' fill='url(%23paint1_radial_11890_46040)'/%3E%3Cdefs%3E%3CradialGradient id='paint0_radial_11890_46040' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(19 1) rotate(135) scale(25.4558 34.7538)'%3E%3Cstop stop-color='%23188892'/%3E%3Cstop offset='0.45' stop-color='%231EA49C'/%3E%3Cstop offset='0.9' stop-color='%2376CE75'/%3E%3Cstop offset='1' stop-color='%23BBE38D'/%3E%3C/radialGradient%3E%3CradialGradient id='paint1_radial_11890_46040' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(16 4) rotate(135) scale(16.9706 23.1692)'%3E%3Cstop stop-color='%23188892'/%3E%3Cstop offset='0.45' stop-color='%231EA49C'/%3E%3Cstop offset='0.9' stop-color='%2376CE75'/%3E%3Cstop offset='1' stop-color='%23BBE38D'/%3E%3C/radialGradient%3E%3C/defs%3E%3C/svg%3E");
}
.subscription-option-details::before, .wcsatt-options-prompt-action::before{
content: '';
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10Z' fill='white'/%3E%3Cpath d='M1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10Z' stroke='%23121212' stroke-width='2'/%3E%3C/svg%3E");
height: 20px; width: 20px;
flex-shrink: 0;
}
.wcsatt-options-wrapper input, .wcsatt-add-to-subscription-wrapper input {
aspect-ratio: 1;
accent-color: var(--background-black);
cursor: pointer;
height: 0;
width: 0;
position: absolute;
opacity: 0;
}
.subscription-option .amount {
color: #1A1A1A;
font-weight: 600;
}
.subscription-option del .amount {
color: #bbb;
font-weight: 400;
font-size: .8em;
}
.subscription-option del .woocommerce-Price-amount.amount, .subscription-option del .woocommerce-Price-currencySymbol{
text-decoration: line-through !important;
}
.woocommerce-Price-amount.amount{
font-size: 1.15em;
}
.detail #wc-stripe-express-checkout-element{
display: none !important;
}
.detail-block-form__item--radio{
display: flex;
gap: 10px;
}
.amount {
color: #1A1A1A;
font-weight: 600;
}
.detail__wrapper-catalot .swiper-slide {
height: auto;
display: flex;
flex-direction: column;
}
.detail__wrapper-catalot .swiper-wrapper {
display: flex;
align-items: stretch;
}
.detail__catalot .product__item{
flex-grow: 1;
}
.toggle__title{
text-transform: uppercase;
}
.toggle__text p:not(:last-child) {
margin-bottom: 1em;
}

@ -1,304 +1,13 @@
/* Основные стили для компьютера */
/* header start */
.header{
position: relative;
background-color: var(--background-white);
position: fixed;
left: 0;
top: 0;
right: 0;
z-index: 200;
}
.header__content::after{
content: '';
position: absolute;
left: auto;
right: auto;
bottom: 0;
width: calc(100% - 48px);
max-width: 1552px;
height: 1px;
background: var(--text-3);
}
.header__content{
height: 72px;
padding: 14px 24px;
display: flex;
justify-content: space-between;
align-items: center;
}
.header__open-menu{
display: none;
width: 24px;
aspect-ratio: 1;
position: relative;
border: none;
background: none;
}
.header__open-menu::before{
content: '';
position: absolute;
top: 8px;
left: 4px;
width: 16px;
height: 2px;
background: var(--background-black);
border-radius: 1px;
}
.header__open-menu::after{
content: '';
position: absolute;
left: 4px;
bottom: 8px;
width: 16px;
height: 2px;
background: var(--background-black);
border-radius: 1px;
}
.header__logo{
width: 182px;
height: 40px;
}
.header__logo-black,
.header__logo-white{
width: 100%;
height: 100%;
}
.header__logo-white{
display: none;
}
.header__menu-block{
position: absolute;
top: 72px;
left: 0;
width: 100%;
height: 0;
overflow: hidden;
transition: height .2s ease-out;
background-color: var(--background-white);
z-index: 100;
}
.header__pc-menu{
padding: 40px 46px;
display: flex;
justify-content: center;
position: relative;
}
.header__pc-menu::before{
content: '';
position: absolute;
top: 0;
left: 46px;
width: 330px;
height: 248px;
background-image: url(../img/pet/cat.png);
background-repeat: no-repeat;
}
.header__pc-menu::after{
content: '';
position: absolute;
top: 0;
right: 46px;
width: 330px;
height: 248px;
background-image: url(../img/pet/dog.png);
background-repeat: no-repeat;
}
.header-pc-menu__content{
width: 600px;
display: flex;
justify-content: space-between;
}
.header-pc-menu__item{
}
.header-pc-menu__title{
font-family: var(--font-family);
font-weight: 700;
font-size: 26px;
line-height: 123%;
text-transform: uppercase;
color: var(--text-black);
text-decoration: none;
}
.header-pc-menu__list{
margin-top: 16px;
list-style-type: none;
}
.header-pc-menu__list-li{
margin-top: 25px;
}
.header-pc-menu__list-li:first-child{
margin-top: 0;
}
.header-pc-menu__list-li a{
font-family: var(--font-family);
font-weight: 600;
font-size: 20px;
line-height: 120%;
color: var(--text-0);
text-decoration: none;
}
.header__phone-menu{
display: none;
padding: 24px 16px;
height: calc(100vh - 56px);
overflow-x: auto;
}
.header-phone-menu__item{
padding: 16px 0;
border-top: 1px solid #f4f1f0;
border-bottom: 1px solid #f4f1f0;
display: flex;
flex-direction: column;
}
.header-phone-menu__item:first-child{
border-top: 0;
}
.header-phone-menu__item:last-child{
border-bottom: 0;
}
.header-phone-menu__title{
font-family: var(--font-family);
font-weight: 700;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
text-decoration: none;
}
.header-phone-menu__title--gradient{
background: var(--gradient-blue);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.header-phone-menu__category{
margin-top: 16px;
font-family: var(--font-family);
font-weight: 500;
font-size: 18px;
line-height: 133%;
color: var(--text-black);
text-decoration: none;
}
.header-phone-menu__list{
margin-top: 24px;
padding-left: 32px;
list-style-type: none;
}
.header-phone-menu__list-item{
margin-top: 16px;
}
.header-phone-menu__list-item:first-child{
margin-top: 0;
}
.header-phone-menu__list-item a{
font-family: var(--font-family);
font-weight: 500;
font-size: 16px;
line-height: 125%;
color: #121212;
color: var(--text-black);
text-decoration: none;
}
.header.white{
background: none;
}
.header.white .header__logo-black{
display: none;
}
.header.white .header__logo-white{
display: block;
}
.header.white .main-menu__link{
color: var(--text-white);
}
.header.white .main-menu__button{
background: var(--background-white);
}
.header.white .lang__open{
color: var(--text-white);
}
.header.white .header__content::after{
background: var(--background-white);
}
.header.white .lang-open__black{
display: none;
}
.header.white .lang-open__white{
display: block;
}
.header.white .mini-profile__icon.white{
display: block;
}
.header.white .mini-profile__icon.black{
display: none;
}
.header.white .header__open-menu::before,
.header.white .header__open-menu::after{
background: var(--background-white);
.detail .product__main{
width: 100%;
}
.header__phone-menu::-webkit-scrollbar {
width: 0px;
.detail-block-form__items{
margin: 25px 0 0;
}
main{
padding-top: 72px;
}
/* header end */
/* product */
.product{
padding: 24px;
@ -310,7 +19,7 @@ main{
}
.product__tag{
margin: 36px -12px -12px -12px;
display: flex;
align-items: center;
flex-wrap: wrap;
@ -319,19 +28,19 @@ main{
margin: 12px;
padding: 1px;
border-radius: 16px;
background: var(--gradient-blue);
border: none;
}
.product-tag-item__content{
padding: 3px 11px;
background: var(--background-white);
border-radius: 15px;
display: flex;
align-items: center;
}
@ -347,13 +56,13 @@ main{
}
.product-tag-item__button{
margin: 2px 0 2px 4px;
width: 20px;
aspect-ratio: 1;
background: none;
border: none;
background-image: url(../img/svg/main/gradient-x.svg);
background-repeat: no-repeat;
background-position: center;
@ -396,18 +105,18 @@ main{
}
.product__main{
margin: 36px -12px -12px;
/* width: 100%; */
display: flex;
align-items: stretch;
flex-wrap: wrap;
}
.product__item{
margin: 12px;
width: calc(25% - 24px);
display: flex;
flex-direction: column;
justify-content: space-between;
@ -431,7 +140,7 @@ main{
border: 1px solid #000;
border-radius: 24px;
pointer-events: none;
transition: opacity .2s ease-out;
@ -462,7 +171,7 @@ main{
}
.product-item-label__tag{
margin: 2px;
padding: 4px 8px;
font-family: var(--font-family);
@ -506,7 +215,7 @@ main{
}
.product-item__product-card{
height: 274px;
display: flex;
justify-content: center;
align-items: center;
@ -520,7 +229,7 @@ main{
}
.product-item__title{
margin-top: 8px;
font-family: var(--font-family);
font-weight: 500;
font-size: 20px;
@ -535,7 +244,7 @@ main{
}
.product-item__price{
margin-top: 8px;
display: flex;
align-items: center;
}
@ -545,12 +254,11 @@ main{
font-size: 20px;
line-height: 200%;
text-transform: uppercase;
color: var(--text-black);
}
/* .product-item__price p::after{
content: '₽';
.product-item__price p::after{
padding-left: 5px;
} */
}
.product-item__price span{
margin-left: 9px;
font-family: var(--font-family);
@ -571,7 +279,7 @@ main{
color: var(--text-6);
}
.product-item__price del::after{
content: '₽';
}
.product-item__price span::before{
content: '-';
@ -582,11 +290,8 @@ main{
.product-item__bye{
margin-top: 8px;
}
.product__item.hiding .product-item__images{
filter: grayscale(1)
}
.product__item.hiding .product-item__price{
color: var(--text-grey);
.product__item.hiding .product-item__price p{
color: #999;
}
.product-item__overlay{
position: absolute;
@ -662,7 +367,7 @@ main{
color: var(--text-black);
}
.product-item-overlay__price::after{
content: 'AED';
}
.product-item-overlay__block-button{
margin-top: 32px;
@ -674,7 +379,7 @@ main{
margin-top: 0;
}
.product-item-overlay__input-block{
}
.product-item-overlay__field{
margin-top: 24px;
@ -704,6 +409,8 @@ main{
} */
/* modal */
/* detail */
.detail{
margin: 48px 24px 24px 24px;
@ -734,6 +441,7 @@ main{
}
.detail__image--width-perc-100{
width: calc(100% - 24px);
height: 600px;
}
@ -763,6 +471,12 @@ main{
display: flex;
align-items: center;
}
.detail__label-wrap {
display: flex;
flex-wrap: wrap;
gap: 5px;
align-items: center;
}
.detail__label .product-item-label__tag:last-child{
margin-left: auto;
}
@ -791,10 +505,9 @@ main{
font-size: 36px;
line-height: 111%;
text-transform: uppercase;
color: #121212;
}
.detail-block-price__price::after{
content: '₽';
}
.detail-block-price__sale{
margin-left: 22px;
@ -812,7 +525,7 @@ main{
color: var(--text-6);
}
.detail-block-price-sale__text::after{
content: '₽';
}
.detail-block-price-sale__perc{
margin-left: 9px;
@ -947,6 +660,12 @@ main{
.detail__catalot .product__item{
width: calc(100% - 24px);
}
@media (max-width: 640px) {
.detail__catalot .product__item{
width: calc(100%);
}
}
.detail__images-phone{
display: none;
}
@ -963,13 +682,13 @@ main{
margin-top: 0;
}
.toggle__table--three .toggle-table__block:nth-child(1){
width: 40%;
width: 33%;
}
.toggle__table--three .toggle-table__block:nth-child(2){
width: 40%;
width: 33%;
}
.toggle__table--three .toggle-table__block:nth-child(3){
width: 20%;
width: 33%;
}
.toggle__table--two .toggle-table__block{
width: calc(50% - 20px);
@ -1033,11 +752,19 @@ main{
opacity: .6;
}
/* End | Toggle */
.radio-button{
}
.radio-button__input{
display: none;
}
/* detail */
/* gallery */
@ -1177,7 +904,7 @@ main{
margin-left: 8px;
padding: 12px 16px;
font-family: var(--font-family);
font-weight: 500;
font-size: 20px;
@ -1533,7 +1260,7 @@ main{
}
.cabinet-card-pet-icon__content{
margin: 1px;
width: calc(100% - 2px);
aspect-ratio: 1;
@ -1611,7 +1338,10 @@ main{
}
.cabinet-card-order-payment__price::after{
margin-left: 5px;
content: '₽';
}
.cabinet-card-order-payment__price--add::after{
display: none;
}
.cabinet-card-order__content{
margin-top: 24px;
@ -1626,7 +1356,7 @@ main{
font-weight: 500;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
color: var(--text-black);
}
.cabinet-card-order-status__pointer{
margin-left: 12px;
@ -1635,7 +1365,7 @@ main{
font-weight: 500;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
color: var(--text-black);
}
.cabinet-card-order-status__pointer--grey{
color: var(--text-6);
@ -1661,7 +1391,7 @@ main{
font-weight: 500;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
color: var(--text-black);
}
.cabinet-card-order-detail-address__text{
margin-top: 16px;
@ -1670,7 +1400,7 @@ main{
font-weight: 400;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
color: var(--text-black);
}
.cabinet-card-order-detail__main{
margin-top: 24px;
@ -1810,6 +1540,17 @@ main{
.cabinet-card__order.active .cabinet-card-order__open-detail::after{
transform: rotate(180deg);
}
.cabinet-card-order__payment-add{
display: flex;
flex-direction: column;
align-items: start;
}
.cabinet-card-order__sub-title{
font-size: 14px;
}
.cabinet-card-order__date{
font-size: 16px;
}
/* .cabinet-card-no-orders__ */
.cabinet__subscription-pc{
}
@ -1826,7 +1567,7 @@ main{
.product__item{
margin: 12px;
width: calc(33.3% - 24px);
}
@ -1843,49 +1584,123 @@ main{
.gallery__wrapper{
max-width: 100%;
}
}
.active-filters {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 20px;
margin-top: 20px;
.subscription{
margin-top: 12px;
}
.active-filter-tag {
padding: 6px 12px;
border: 1px solid #3EC2A6;
border-radius: 16px;
color: #3EC2A6;
font-weight: 400;
font-size: 20px;
line-height: 120%;
white-space: nowrap;
cursor: default;
transition: all 0.2s;
text-transform: uppercase;
.subscription__item{
padding: 12px 0;
justify-content: space-between;
}
.active-filter-tag:hover {
background-color: #e8f8f5;
cursor: pointer;
.subscription__item{
font-size: 20px;
}
.active-filters__clear.button--white {
padding: 6px 12px;
height: 38px;
margin-top: 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%;
}
/* Стили для лептопов */
/* @media only screen and (min-width: 992px) and (max-width: 1400px) {
} */
.toggle__table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
}
.toggle__table th,
.toggle__table td {
width: 33.33%;
vertical-align: top;
padding: 8px;
text-align: left;
}
.toggle-table__title {
font-weight: bold;
font-size: 16px;
}
.toggle-table__item {
position: relative;
padding-bottom: 10px;
}
.toggle-table__item p {
display: inline-block;
margin: 0;
background: #fff; /* подложка, если нужно перекрыть линию */
padding-right: 4px;
z-index: 1;
position: relative;
}
/* Линия-многоточие */
.toggle-table-item__line {
position: absolute;
left: 0;
bottom: 4px;
width: 100%;
border-bottom: 1px dotted #aaa;
z-index: 0;
}
/* Адаптив */
@media (max-width: 768px) {
.toggle__table th,
.toggle__table td {
font-size: 14px;
padding: 6px;
}
}
/* Maks */
.toggle__table tbody,
.toggle__table thead,
.toggle__table thead tr{
width: 100%;
}
.toggle__table thead tr{
display:flex;
}
.toggle__table tbody tr{
display: flex;
gap: 8px;
}

@ -1,5 +1,9 @@
/* Стили для планшетов */
@media only screen and (max-width: 1200px) {
.product__main{
margin: 36px 0 0;
}
/* header */
main{
padding-top: 64px;

@ -0,0 +1,901 @@
/* breadcrumbs */
.breadcrumbs{
margin: 24px 0px;
display: flex;
align-items: center;
}
.breadcrumbs__item{
display: block;
padding: 0px 16px;
font-family: var(--font-family);
font-weight: 700;
font-size: 16px;
line-height: 125%;
color: var(--text-6);
text-decoration: none;
position: relative;
}
.breadcrumbs__item:first-child{
padding-left: 0;
}
.breadcrumbs__item:nth-child(n+2)::before{
content: '';
position: absolute;
top: -2px;
left: -12px;
width: 24px;
aspect-ratio: 1;
background-image: url(../img/svg/main/arrow-breadcrumbs.svg);
background-repeat: no-repeat;
background-size: contain;
}
/* breadcrumbs */
/* product */
.product_main{
display: flex;
padding: 30px;
border-radius: 30px;
min-height: 766px;
margin-top: 30px;
justify-content: space-between;
background-color: var(--bg-color);
}
.product_main.--food-fish{
--bg-color: #C1DDE6;
--accent-color: #48c1ed;
}
.product_main.--food-lamb{
--bg-color: #E6D7C1;
--accent-color: #863300;
}
.product_main.--food-turkey{
--bg-color: #F3D7D2;
--accent-color: #CD0003;
}
.product_main.--food-beef{
--bg-color: #E6C1D7;
--accent-color: #7e0092;
}
.product_main.--food-salmon{
--bg-color: #F3D7C1;
--accent-color: #ff6b35;
}
.product_main.--food-rabbit{
--bg-color: #E6D7C1;
--accent-color: #8b4513;
}
.product_main.--food-duck{
--bg-color: #F3E6D7;
--accent-color: #d2691e;
}
.product_main.--treats-lamb{
--bg-color: #E6D7F3;
--accent-color: #44006c;
}
.product_main.--treats-rabbit{
--bg-color: #F3D7E6;
--accent-color: #601094;
}
.product_main.--treats-beef{
--bg-color: #D7F3E6;
--accent-color: #004c31;
}
.product_main.--treats-salmon{
--bg-color: #F3D7F3;
--accent-color: #7c007a;
}
.product_main.--treats-duck{
--bg-color: #D7F3F3;
--accent-color: #326e70;
}
.product_main.--treats-fish{
--bg-color: #D7E6F3;
--accent-color: #0066cc;
}
.product_main.--treats-turkey{
--bg-color: #F3E6D7;
--accent-color: #cc3300;
}
/* product info */
.product-info{
width: 364px;
flex-direction: column;
justify-content: space-between;
display: flex;
padding-right: 30px;
}
.product-title{
font-weight: 700;
font-size: 24px;
text-transform: uppercase;
color: #121212;
}
.product-contains{
margin-top: 30px;
}
.product-block-title{
font-weight: 700;
font-size: 20px;
line-height: 100%;
color: #121212;
text-transform: uppercase;
}
.product-contains-text{
font-weight: 400;
font-size: 14px;
line-height: 150%;
color: #121212;
margin-top: 20px;
}
.product-values{
margin-top: 30px;
}
.product-values-list{
display: flex;
flex-wrap: wrap;
margin-top: 10px;
gap: 4px;
}
.product-values-item{
border: 1px solid rgba(18, 18, 18, 0.1);
border-radius: 100px;
padding: 4px 4px 4px 10px;
height: 48px;
display: flex;
align-items: center;
font-weight: 700;
font-size: 14px;
line-height: 143%;
color: #121212;
gap: 10px;
}
.product-values-item-val{
border: 1px solid #000;
border-radius: 100px;
min-width: 40px;
padding-left: 5px;
padding-right: 5px;
height: 40px;
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
}
.product-values-title{
font-weight: 700;
font-size: 16px;
line-height: 125%;
color: #121212;
}
.product-vitamins{
border: 1px solid rgba(18, 18, 18, 0.1);
border-radius: 20px;
padding: 10px;
width: 100%;
font-weight: 700;
font-size: 14px;
line-height: 143%;
color: #121212;
margin-top: 4px;
}
.product-vitamins-list{
margin-top: 10px;
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.product-vitamins-item{
border: 1px solid #000;
border-radius: 100px;
padding: 10px;
}
/* product info */
/* product constructor */
.product-constructor{
width: 395px;
}
.product-constructor__block{
margin-bottom: 1.5rem;
}
.product-constructor__block-title{
font-size: 16px;
line-height: 125%;
color: #121212;
font-weight: 700;
}
.product-constructor__block-list{
display: flex;
margin-top: 10px;
border-radius: 100px;
padding: 5px;
height: 60px;
width: 100%;
background-color: #fff;
}
.product-constructor__block-item{
flex-grow: 1;
padding: 2px 6px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 50px;
font-weight: 700;
font-size: 14px;
color: rgba(18, 18, 18, 0.75);
border-radius: 100px;
}
.product-constructor__block-item svg, .product-constructor__block-item path{
fill: rgba(18, 18, 18, 0.75);
fill-opacity: 1;
}
.product-constructor__block-item.active{
color: #fff;
background-color: var(--accent-color);
}
.product-constructor__block-item.active svg, .product-constructor__block-item.active path{
fill: #fff;
}
.product-constructor__block-item img, .product-constructor__block-item svg{
height: 22px;
width: 22px;
}
/* product constructor */
/* product price */
.product-price{
display: flex;
gap: 10px;
align-items: center;
}
.product-price-main{
border-radius: 100px;
padding: 14px 15px;
width: 135px;
background-color: #fff;
font-size: 24px;
text-transform: uppercase;
text-align: center;
color: #4d4d4d;
font-weight: 700;
}
.product-price-old{
font-weight: 700;
font-size: 16px;
line-height: 150%;
text-transform: uppercase;
text-decoration: line-through;
color: #666;
}
.product-price-percent{
font-weight: 500;
font-size: 12px;
line-height: 133%;
color: #fa0505;
margin-top: 8px;
}
.product-btn, .button{
border: 2px solid #fff;
border-radius: 100px;
padding: 12px 16px;
width: 100%;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 900;
font-size: 12px;
text-align: center;
color: #fff;
margin-top: 20px;
background-color: var(--accent-color);
}
.button::before{
display: none;
}
.to-know{
font-size: 24px;
text-transform: uppercase;
font-weight: 700;
margin-top: 20px;
text-decoration: underline;
}
/* product price */
/* product gallery */
.product-gallery{
width: 390px;
margin-right: 20px;
border: 2px solid #fff;
border-radius: 30px;
}
/* product gallery */
.product-constructor, .product-gallery, .product-info{
flex-grow: 1;
}
.product-gallery{
padding-top: 30px;
padding-bottom: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
overflow: hidden;
}
.product-gallery-item{
background-color: #fff;
border-radius: 24px;
display: flex;
justify-content: center;
align-items: center;
height: auto;
aspect-ratio: 1/1;
}
.product-gallery-slider{
margin-left: 10px;
margin-right: 10px;
position: relative;
}
.product-gallery-slider .swiper-wrapper{
}
.product-gallery__thumbsSlider::before{
background: linear-gradient(270deg, rgba(193, 221, 230, 0) 0%, var(--bg-color) 100%);
height: 120%;
position: absolute;
left: -10px;
top: -10%;
width: 65px;
content: '';
z-index: 2;
pointer-events: none;
}
.product-gallery__thumbsSlider::after{
background: linear-gradient(270deg, rgba(193, 221, 230, 0) 0%, var(--bg-color) 100%);
height: 120%;
position: absolute;
right: -10px;
top: -10%;
width: 65px;
content: '';
transform: scaleX(-1);
z-index: 2;
pointer-events: none;
}
.product-gallery-item img{
height: 100%;
width: 100%;
object-fit: contain;
padding: 10px;
}
/* product */
.product-gallery-arrow{
border-radius: 100px;
background-color: var(--accent-color);
border: 1px solid #fff;
height: 44px;
width: 44px;
pointer-events: all;
background-image: url("data:image/svg+xml,%3Csvg width='8' height='14' viewBox='0 0 8 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L1 13' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' /%3E%3C/svg%3E");
background-position: center;
background-repeat: no-repeat;
}
.product-gallery-arrows{
width: calc(100% - 10px);
position: absolute;
top: 50%;
left: 5px;
transform: translateY(-50%);
justify-content: space-between;
pointer-events: none;
z-index: 3;
display: flex;
}
.product-gallery-prev{
transform: scaleX(-1);
}
.swiper-slide-active.product-gallery-item{
outline: 4px solid #48c1ed;
}
.product_main .swiper-slide {
display: flex;
justify-content: center;
align-items: center;
}
.product_main .swiper-slide img {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
}
.product_main .swiper {
width: 100%;
margin-left: auto;
margin-right: auto;
}
.product_main .swiper-slide {
background-size: cover;
background-position: center;
}
.product-gallery__mainSlider {
height: 80%;
width: 100%;
}
.product-gallery__thumbsSlider {
height: 20%;
box-sizing: border-box;
padding: 10px;
height: 110px;
}
.product-gallery__thumbsSlider .swiper-slide {
width: 90px;
height: 90px;
background-color: #fff;
border-radius: 24px;
padding: 10px 20px;
position: relative;
}
.product-gallery__thumbsSlider .swiper-slide-thumb-active {
outline: 4px solid var(--accent-color);
}
.product_main .swiper-slide img {
display: block;
width: calc(100% - 10px);
height: calc(100% - 10px);
object-fit: contain;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.product-desc{
margin-top: 55px;
}
.product-desc-text{
font-weight: 400;
font-size: 16px;
line-height: 150%;
color: #121212;
margin-top: 20px;
}
.product-reviews{
margin-top: 140px;
}
.product-similar{
margin-top: 140px;
}
.main-food_reviews-slide{
box-shadow: 0 20px 40px 0 rgba(0, 0, 0, 0.12);
background: var(--color);
/* width: 395px; */
border-radius: 40px !important;
}
.product-reviews-slider {
overflow: visible !important;
margin-top: 40px;
}
.product-reviews{
overflow: hidden;
padding-bottom: 60px;
margin-bottom: -60px;
}
.product-similar-slider{
margin-top: 40px;
}
.main-food_products-card-slider .swiper-slide{
align-self: center;
}
.product-similar{
overflow: hidden;
}
.product-single{
padding-bottom: 90px;
}
.product-similar-slider .swiper-wrapper{
align-items: stretch;
}
.product-similar-slider .swiper-slide{
height: auto;
display: flex;
flex-direction: column;
}
.product-title.--m{
display: none;
}
@media (max-width: 1150px) {
.product_main {
flex-direction: column;
}
.product-gallery{
order: 0;
}
.product-info{
order: 3;
}
.product-info, .product-gallery, .product-constructor{
width: 100%;
margin-right: auto;
margin-left: 0;
margin-top: 20px;
}
.product-gallery__thumbsSlider{
display: none;
}
.product-gallery__mainSlider{
width: 100%;
height: auto;
aspect-ratio: 1 / 1.25;
max-height: 540px;
}
.breadcrumbs{
display: none;
}
.product_main{
margin-top: 0;
width: calc(48px + 100%);
margin-left: -24px;
border-radius: 0;
padding: 5px 20px 40px;
}
.product-title.--m{
display: block;
font-size: 18px;
margin-top: 20px;
margin-top: 32px;
margin-bottom: 14px;
}
.product-title.--pc{
display: none;
}
.product-constructor__block-title{
font-size: 14px;
line-height: 143%;
}
.product-constructor__block-item-name{
font-size: 12px;
}
.product-info{
padding-right: 0;
}
.product-desc-text{
font-size: 14px;
}
.product-reviews{
margin-top: 66px;
}
.main-food_reviews-slide{
padding-left: 20px !important;
padding-right: 20px !important;
}
.main-food_products-card{
min-width: 0 !important;
}
.main-food_products-card-img img{
height: 40vw;
}
}
.product-show{
display: flex;
flex-grow: 1;
flex-direction: column;
}
@media (max-width: 576px) {
.product_main {
margin-left: -10px;
width: calc(20px + 100%);
}
.product-show{
flex-direction: column;
min-height: calc(100vh - 80px);
}
.product-gallery{
flex-grow: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: 30px;
position: relative;
}
.product-gallery-bullets{
position: absolute;
display: flex;
bottom: 35px !important;
top: unset !important;
width: 100%;
padding-left: 20px;
padding-right: 20px;
gap: 12px;
justify-content: center;
}
.product-gallery-bullets__item{
height: 12px;
width: 12px;
border-radius: 50%;
background-color: #fff;
}
.product-gallery-bullets__item.--active{
background-color: var(--accent-color);
}
}
.product-block-arrows--m{
display: none;
}
.product-similar__head, .product-reviews__head{
display: flex;
justify-content: space-between;
align-items: center;
}
.product-block-arrows{
display: flex;
gap: 20px;
}
@media (max-width: 980px) {
.product-block-arrows--m{
display: flex;
gap: 10px;
margin-top: 20px;
padding-right: 10px;
padding-left: 10px;
}
.product-block-arrows{
display: none;
}
.product-reviews-slider{
padding-right: 10px;
padding-left: 10px;
}
.product-similar{
margin-top: 60px;
}
}
.stock, .quantity{
display: none;
}
.product-incart__wrap{
display: flex;
align-items: center;
gap: 10px;
margin-top: 20px;
}
.product-incart__btn{
height: 50px;
width: 50px;
position: relative;
border-radius: 50%;
background-color: var(--accent-color);
}
.product-incart__btn--minus::before{
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 16px;
height: 2px;
background-color: #fff;
}
.product-incart__btn--plus::before{
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 16px;
height: 2px;
background-color: #fff;
}
.product-incart__btn--plus::after{
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
height: 16px;
width: 2px;
background-color: #fff;
}
.product-incart{
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
padding: 23px 5px;
gap: 10px;
margin: 0 auto;
width: 159px;
height: 60px;
background: color-mix(in srgb, var(--accent-color) 25%, transparent);
border: 2px solid #FFFFFF;
border-radius: 100px;
flex: none;
order: 0;
flex-grow: 0;
font-weight: 900;
font-size: 12px;
color: #fff;
}
.product-incart__label{
border: 2px solid #fff;
border-radius: 100px;
padding: 12px 16px;
width: 100%;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 900;
font-size: 12px;
text-align: center;
color: #fff;
background-color: var(--accent-color);
}
.product-incart-btn{
}
/* Стили для загрузки корзины на single странице */
.product-incart__wrap.loading {
position: relative;
pointer-events: none;
opacity: 0.7;
}
.product-incart__wrap.loading::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--bg-color);
opacity: .7;
z-index: 10;
}
.product-incart__wrap.loading::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 20px;
height: 20px;
margin: -10px 0 0 -10px;
border: 2px solid #f3f3f3;
border-top: 2px solid #3498db;
border-radius: 50%;
animation: spin 1s linear infinite;
z-index: 11;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Стили для кнопок во время загрузки */
.product-incart__wrap.loading .product-incart__btn {
opacity: 0.5;
pointer-events: none;
}
/* Стили для счетчика во время загрузки */
.product-incart__wrap.loading .product-incart__count {
opacity: 0.5;
}

@ -1,211 +1,10 @@
<?php
if (!defined('ABSPATH')) {
exit;
}
function count_nested_replies($comment_id) {
$count = 0;
$replies = get_comments(array(
'post_id' => get_the_ID(),
'status' => 'approve',
'parent' => $comment_id,
'order' => 'ASC'
));
if ($replies) {
$count += count($replies);
foreach ($replies as $reply) {
$count += count_nested_replies($reply->comment_ID);
}
}
return $count;
}
if (post_password_required()) {
return;
}
if (!is_user_logged_in()) {
?>
<div class="comment-block">
<p class="comment-block_text">
<a href="#modal"><?php pll_e('Войдите'); ?></a>, <?php pll_e('чтобы оставлять комментарии'); ?>
</p>
</div>
<?php
}
$top_level_comments = get_comments(array(
'post_id' => get_the_ID(),
'status' => 'approve',
'parent' => 0,
'order' => 'ASC'
));
if ($top_level_comments) {
echo '<div class="comment-block_wrapper">';
foreach ($top_level_comments as $comment) {
?>
<div class="comment-block" id="comment-<?php echo $comment->comment_ID; ?>">
<div class="comment-user">
<?php echo get_avatar($comment, 50); ?>
<div class="comment-user_text">
<h6><?php echo get_comment_author($comment); ?></h6>
<span><?php echo get_comment_date('d F Y', $comment); ?></span>
</div>
</div>
<p><?php echo get_comment_text($comment); ?></p>
<div class="comment-btns">
<button class="reply-to-comment" data-comment-id="<?php echo $comment->comment_ID; ?>" data-post-id="<?php echo get_the_ID(); ?>" data-reply-to="<?php echo esc_attr(get_comment_author($comment)); ?>">
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.5 3H3.25C2.00736 3 1 4.00736 1 5.25V5.25C1 6.49264 2.00736 7.5 3.25 7.5H3.5" stroke="#666666"></path>
<path d="M7 0.5L9.5 3L7 5.5" stroke="#666666"></path>
</svg>
<?php pll_e('Ответить'); ?>
</button>
<button class="comment-like-btn<?php echo is_user_liked_comment($comment->comment_ID) ? ' active' : ''; ?>" data-comment-id="<?php echo $comment->comment_ID; ?>">
<svg width="15" height="13" viewBox="0 0 15 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.7745 1C8.67239 1 7.7426 2.5355 7.54047 3.30325C7.39224 2.5355 6.49748 1 4.10427 1C1.11276 1 -0.221288 4.85199 2.40639 8.14801C4.50853 10.7848 6.705 11.8147 7.54047 12C8.47026 11.8279 10.8311 10.761 12.8363 7.87004C15.3427 4.25632 13.4022 1 10.7745 1Z" <?php echo is_user_liked_comment($comment->comment_ID) ? 'stroke="#ff0000" fill="rgba(255, 0, 0, 0.7)"' : 'stroke="#666666"'; ?>></path>
</svg>
<?php echo get_comment_likes_count($comment->comment_ID); ?>
</button>
<?php
comment_reply_link(array(
'reply_text' => pll__('Ответить'),
'depth' => 1,
'max_depth' => get_option('thread_comments_depth'),
'before' => '<span style="display:none;">',
'after' => '</span>',
), $comment->comment_ID, get_the_ID());
?>
</div>
<div class="reply-form-container" id="reply-form-<?php echo $comment->comment_ID; ?>" style="display: none;"></div>
</div>
<?php
$all_nested_replies = get_all_nested_replies($comment->comment_ID);
if (!empty($all_nested_replies)) {
$total_reply_count = count($all_nested_replies);
?>
<button class="answer-btn">
<svg width="15" height="10" viewBox="0 0 15 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 1.41406L7.5 7.91406L1 1.41406" stroke="#76CE75" stroke-width="2"></path>
</svg>
<?php echo $total_reply_count; ?>
<span>
<?php echo ($total_reply_count == 1) ? pll__('ответ') : pll__('ответа'); ?>
</span>
</button>
<?php
foreach ($all_nested_replies as $reply) {
?>
<div class="comment-block answer-block" id="comment-<?php echo $reply->comment_ID; ?>">
<div class="comment-user">
<?php echo get_avatar($reply, 50); ?>
<div class="comment-user_text">
<h6><?php echo get_comment_author($reply); ?></h6>
<span><?php echo get_comment_date('d F Y', $reply); ?></span>
</div>
</div>
<p><?php echo get_comment_text($reply); ?></p>
<div class="comment-btns">
<button class="reply-to-comment" data-comment-id="<?php echo $reply->comment_ID; ?>" data-post-id="<?php echo get_the_ID(); ?>" data-reply-to="<?php echo esc_attr(get_comment_author($reply)); ?>">
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.5 3H3.25C2.00736 3 1 4.00736 1 5.25V5.25C1 6.49264 2.00736 7.5 3.25 7.5H3.5" stroke="#666666"></path>
<path d="M7 0.5L9.5 3L7 5.5" stroke="#666666"></path>
</svg>
<?php pll_e('Ответить'); ?>
</button>
<button class="comment-like-btn<?php echo is_user_liked_comment($reply->comment_ID) ? ' active' : ''; ?>" data-comment-id="<?php echo $reply->comment_ID; ?>">
<svg width="15" height="13" viewBox="0 0 15 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.7745 1C8.67239 1 7.7426 2.5355 7.54047 3.30325C7.39224 2.5355 6.49748 1 4.10427 1C1.11276 1 -0.221288 4.85199 2.40639 8.14801C4.50853 10.7848 6.705 11.8147 7.54047 12C8.47026 11.8279 10.8311 10.761 12.8363 7.87004C15.3427 4.25632 13.4022 1 10.7745 1Z" <?php echo is_user_liked_comment($reply->comment_ID) ? 'stroke="#ff0000" fill="rgba(255, 0, 0, 0.7)"' : 'stroke="#666666"'; ?>></path>
</svg>
<?php echo get_comment_likes_count($reply->comment_ID); ?>
</button>
<?php
comment_reply_link(array(
'reply_text' => pll__('Ответить'),
'depth' => 2,
'max_depth' => get_option('thread_comments_depth'),
'before' => '<span style="display:none;">',
'after' => '</span>',
), $reply->comment_ID, get_the_ID());
?>
</div>
<div class="reply-form-container" id="reply-form-<?php echo $reply->comment_ID; ?>" style="display: none;"></div>
</div>
<?php
}
}
}
echo '</div>';
}
function get_all_nested_replies($comment_id) {
$all_replies = array();
$direct_replies = get_comments(array(
'post_id' => get_the_ID(),
'status' => 'approve',
'parent' => $comment_id,
'order' => 'ASC'
));
$all_replies = array_merge($all_replies, $direct_replies);
foreach ($direct_replies as $reply) {
$deeper_replies = get_all_nested_replies_recursive($reply->comment_ID);
$all_replies = array_merge($all_replies, $deeper_replies);
}
return $all_replies;
}
function get_all_nested_replies_recursive($comment_id) {
$replies = get_comments(array(
'post_id' => get_the_ID(),
'status' => 'approve',
'parent' => $comment_id,
'order' => 'ASC'
));
$all_replies = $replies;
foreach ($replies as $reply) {
$deeper_replies = get_all_nested_replies_recursive($reply->comment_ID);
$all_replies = array_merge($all_replies, $deeper_replies);
}
return $all_replies;
}
if (is_user_logged_in()) {
$commenter = wp_get_current_commenter();
$args = array(
'fields' => array(
'author' => '',
'email' => '',
'url' => '',
'cookies' => '',
),
'comment_field' => '<div class="comment-form-comment"><textarea id="comment" name="comment" placeholder="' . pll__('Ваш комментарий') . '" required></textarea></div>',
'title_reply' => pll__('Оставить комментарий'),
'title_reply_to' => pll__('Ответить %s'),
'class_submit' => 'comment-submit-btn',
'submit_button' => '<button name="%1$s" type="submit" id="%2$s" class="%3$s">%4$s</button>',
'submit_field' => '<div class="form-submit">%1$s %2$s</div>',
'cancel_reply_link' => pll__('Отменить'),
'id_form' => 'commentform',
'id_submit' => 'submit',
'title_reply_before' => '<h3 id="reply-title" class="comment-reply-title">',
'title_reply_after' => '</h3>',
);
comment_form($args);
}
?>
/**
* Start: comments.php
* Стандартный файл WordPress для отображения комментариев к записи
*/
include_component('blog', 'comments');
/**
* End: comments.php
*/

@ -6,14 +6,16 @@ Timber\Timber::init();
// require once вместо include использовать!
require_once __DIR__ . '/temp-functions/cart-logic.php';
require_once __DIR__ . '/temp-functions/timber-logic.php';
require_once __DIR__ . '/temp-functions/woocommerce-logic.php';
require_once __DIR__ . '/temp-functions/modules-logic.php';
require_once __DIR__ . '/temp-functions/cart-logic.php';
require_once __DIR__ . '/temp-functions/woocommerce-logic.php';
require_once __DIR__ . '/temp-functions/ajax-logic.php';
require_once __DIR__ . '/temp-functions/shortcodes-logic.php';
require_once __DIR__ . '/temp-functions/blog-logic.php';
require_once __DIR__ . '/temp-functions/filters-logic.php';
require_once __DIR__ . '/temp-functions/custom-admin-panel-logic.php';
require_once __DIR__ . '/temp-functions/login-logic.php';
// include_module('forms');
// include_module('shop');
@ -22,7 +24,22 @@ require_once __DIR__ . '/temp-functions/filters-logic.php';
// include_module('author');
// include_module('layout');
include_once('modules/shop/CosmopetProduct.php');
add_filter('timber/post/classmap', function ($classmap) {
$classmap['product'] = CosmopetProduct::class;
return $classmap;
}, 100);
add_filter('timber/post/classmap', function ($classmap) {
$classmap['product'] = CosmopetProduct::class;
return $classmap;
}, 100);
function allow_svg_upload($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'allow_svg_upload');

@ -1,263 +0,0 @@
<?php
add_action('template_redirect', 'redirect_non_logged_in_users');
function redirect_non_logged_in_users() {
// URL личного кабинета (замените 'your-account-page-slug' на ваш slug)
$account_page_slug = 'my-account-3';
$account_page_slug__2 = 'my-account';
// Проверяем, находится ли пользователь на странице личного кабинета
if (is_page($account_page_slug) && !is_user_logged_in() || is_page($account_page_slug__2) && !is_user_logged_in() ) {
wp_redirect(home_url()); // Перенаправляем на главную страницу
exit;
}
}
add_action('init', 'register_pets');
function register_pets(){
register_post_type('pets', array(
'labels' => array(
'name' => 'Питомцы', // Основное название типа записи
'singular_name' => 'Питомец', // отдельное название записи типа Book
'add_new' => 'Добавить нового',
'add_new_item' => 'Добавить нового питомца',
'edit_item' => 'Редактировать питомца',
'new_item' => 'Новый питомец',
'view_item' => 'Посмотреть питомца',
'search_items' => 'Найти питомца',
'not_found' => 'Питомцев не найдено',
'not_found_in_trash' => 'В корзине книг не найдено',
'parent_item_colon' => '',
'menu_name' => 'Питомцы'
),
'public' => false,
'show_ui' => true,
'supports' => array('title','editor')
) );
}
function get_pet_card($item){
?>
<?php
switch (get_field('weight')){
case ('below_1_5'):
$w = esc_html__('from 0,5 kg to 1,5 kg', 'woodmart' );
break;
case ('1_5-3'):
$w = esc_html__('from 1.5 to 3 kg', 'woodmart' );
break;
case ('3-5'):
$w = esc_html__('from 3 to 5 kg', 'woodmart' );
break;
case ('5-8'):
$w = esc_html__('from 5 to 8 kg', 'woodmart' );
break;
case ('8-11'):
$w = esc_html__('from 8 to 11 kg', 'woodmart' );
break;
case ('11-15'):
$w = esc_html__('from 11 to 15 kg', 'woodmart' );
break;
case ('15-20'):
$w = esc_html__('from 15 to 20 kg', 'woodmart' );
break;
case ('20-25'):
$w = esc_html__('from 20 to 25 kg', 'woodmart' );
break;
case ('25-35'):
$w = esc_html__('from 25 to 35 kg', 'woodmart' );
break;
case ('more_35'):
$w = esc_html__('More than 35 kg', 'woodmart' );
break;
}
switch (get_field('old')){
case ('normal'):
$old = esc_html__('Adult (from 1 year to 7 years)', 'woodmart' );
break;
case ('old'):
$old = esc_html__('Elderly (from 7 to 12 years)', 'woodmart' );
break;
case ('very_old'):
$old = esc_html__('Aging (12 years and older)', 'woodmart' );
break;
case ('baby'):
$old = esc_html__('Baby (from 0 to 1 year)' );
break;
}
switch (get_field('activity')){
case ('low'):
$act = esc_html__('Low', 'woodmart' );
break;
case ('moderate'):
$act = esc_html__('Moderate', 'woodmart' );
break;
case ('high'):
$act = esc_html__('High', 'woodmart' );
break;
}
?>
<div class="cabinet-card cabinet-card--green">
<div class="cabinet-card__content">
<div class="cabinet-card__pet">
<div class="cabinet-card-pet__icon">
<div class="cabinet-card-pet-icon__content">
<img src="<?= get_template_directory_uri();?>/gp-include/assets/lk/img/pet/mini-<?php echo get_field('type', $item) ?>.png" alt="">
</div>
</div>
<p class="cabinet-card-pet__name"><?php echo get_the_title($item) ?></p>
</div>
<div class="cabinet-card__element">
<p class="cabinet-card__label"><?php echo esc_html__('Breed', 'woodmart' ) ?>:</p>
<p class="cabinet-card__text"><?php echo get_field('breed', $item) ?></p>
</div>
<div class="cabinet-card__element">
<p class="cabinet-card__label"><?php echo esc_html__('Weight', 'woodmart' ) ?>:</p>
<p class="cabinet-card__text"><?php echo $w; ?></p>
</div>
<?php if ($old): ?>
<div class="cabinet-card__element">
<p class="cabinet-card__label"><?php echo esc_html__('Age', 'woodmart' ) ?>:</p>
<p class="cabinet-card__text"><?php echo $old; ?></p>
</div>
<?php
else:
?>
<?php
$zero = '';
if (intval(get_field('month', $item)) < 10){
$zero = '0';
}
?>
<div class="cabinet-card__element">
<p class="cabinet-card__label"><?php echo esc_html__('Birhtday', 'woodmart' ) ?>:</p>
<p class="cabinet-card__text"><?php echo get_field('day', $item) . '.' . $zero . get_field('month', $item) . '.' . get_field('year', $item); ?></p>
</div>
<?php
endif;
?>
<div class="cabinet-card__element">
<p class="cabinet-card__label"><?php echo esc_html__('Activity', 'woodmart' ) ?>:</p>
<p class="cabinet-card__text"><?php echo $act; ?></p>
</div>
<?php
if (get_field('type', $item) == 'cat' && get_field('sterilized', $item)):
?>
<div class="cabinet-card__element">
<p class="cabinet-card__label"><?php echo esc_html__('Sterilized', 'woodmart' ) ?></p>
</div>
<?php
endif;
?>
<div class="cabinet-card__element">
<button class="cabinet-card__button" data-edit="<?php echo get_the_ID($item); ?>">
<?php echo esc_html__('Edit', 'woodmart' ) ?>
</button>
</div>
</div>
</div>
<?php
}
// Подключение скриптов и стилей
// add_action('wp_enqueue_scripts', 'enqueue_checkout_scripts');
// function enqueue_checkout_scripts() {
// if (is_checkout()) {
// wp_enqueue_style('custom-checkout', get_template_directory_uri() . '/modules/shop/components/checkout/assets/css/checkout.css', [], '1.0.1');
// wp_enqueue_script('custom-checkout', get_template_directory_uri() . '/modules/shop/components/checkout/assets/js/script.js', ['jquery'], '1.0.1', true);
// wp_localize_script('custom-checkout', 'wc_checkout_params', [
// 'ajax_url' => admin_url('admin-ajax.php'),
// 'nonce' => wp_create_nonce('wc_checkout_nonce')
// ]);
// }
// }
// // AJAX-обработчик для обновления количества
// add_action('wp_ajax_update_cart_quantity', 'update_cart_quantity_callback');
// add_action('wp_ajax_nopriv_update_cart_quantity', 'update_cart_quantity_callback');
// function update_cart_quantity_callback() {
// check_ajax_referer('wc_checkout_nonce', 'nonce');
// $cart_item_key = sanitize_text_field($_POST['cart_item_key']);
// $quantity = intval($_POST['quantity']);
// if ($quantity > 0) {
// WC()->cart->set_quantity($cart_item_key, $quantity);
// } else {
// WC()->cart->remove_cart_item($cart_item_key);
// }
// WC()->cart->calculate_totals();
// // Подготовка фрагментов
// $fragments = [];
// // Обновление списка товаров
// ob_start();
// wc_get_template('checkout/form-checkout.php', [], '', get_template_directory() . '/woocommerce/');
// $fragments['.order-your__products'] = ob_get_clean();
// // Обновление секции итогов
// ob_start();
// woocommerce_checkout_coupon_form();
// woocommerce_order_review();
// $fragments['.order-your__calculation'] = ob_get_clean();
// // Подготовка цен для каждого товара
// $item_prices = [];
// foreach (WC()->cart->get_cart() as $item_key => $item) {
// $item_prices[$item_key] = WC()->cart->get_product_subtotal($item['data'], $item['quantity']);
// }
// wp_send_json_success([
// 'fragments' => $fragments,
// 'item_prices' => $item_prices,
// 'cart_total' => WC()->cart->get_cart_total()
// ]);
// }
// // AJAX-обработчик для удаления товара
// add_action('wp_ajax_remove_cart_item', 'remove_cart_item_callback');
// add_action('wp_ajax_nopriv_remove_cart_item', 'remove_cart_item_callback');
// function remove_cart_item_callback() {
// check_ajax_referer('wc_checkout_nonce', 'nonce');
// $cart_item_key = sanitize_text_field($_POST['cart_item_key']);
// WC()->cart->remove_cart_item($cart_item_key);
// WC()->cart->calculate_totals();
// // Подготовка фрагментов
// $fragments = [];
// // Обновление списка товаров
// ob_start();
// wc_get_template('checkout/form-checkout.php', [], '', get_template_directory() . '/woocommerce/');
// $fragments['.order-your__products'] = ob_get_clean();
// // Обновление секции итогов
// ob_start();
// woocommerce_checkout_coupon_form();
// woocommerce_order_review();
// $fragments['.order-your__calculation'] = ob_get_clean();
// wp_send_json_success([
// 'fragments' => $fragments,
// 'cart_total' => WC()->cart->get_cart_total()
// ]);
// }

@ -0,0 +1,11 @@
<?php
add_action('wp_head', function() {
?>
<script>
window.ajax_url = '<?php echo admin_url('admin-ajax.php') ?>';
</script>
<?php
}, 1);

@ -0,0 +1,380 @@
<?
/**
* Добавление событий контрибуции для FP Pixel
* только на боевом сайте АЕ
*/
if ($site_env->site_mode == 'production' && $site_env->site_region == 'ae') {
// Проверка на тестовый режим для метрик
// TO_DO: дуюлирует логику is_gp_test_mode в wp-content/themes/cosmopet/global-functions/multisite-functions.php
function is_gp_test_mode()
{
if (isset($_GET['gp-test']) && $_GET['gp-test'] == '1') {
return true;
}
if (is_user_logged_in() && current_user_can('administrator')) {
return true;
}
return false;
}
add_action('wp_footer', 'add_facebook_pixel_events');
function add_facebook_pixel_events()
{
if (is_gp_test_mode())
return;
global $product;
// 1. ViewContent
if (is_product() && $product && $product->get_price() > 0) {
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
fbq('track', 'ViewContent', {
content_ids: ['<?php echo $product->get_id(); ?>'],
content_type: 'product',
value: <?php echo $product->get_price(); ?>,
currency: '<?php echo get_woocommerce_currency(); ?>'
});
});
</script>
<?php
}
// 2. InitiateCheckout
if (is_checkout() && !is_wc_endpoint_url('order-received') && WC()->cart && WC()->cart->get_cart_contents_count() > 0) {
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
fbq('track', 'InitiateCheckout');
});
</script>
<?php
}
// 3. AddToCart
if (is_product() || is_shop() || is_cart()) {
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
jQuery(function($) {
$(document.body).on('added_to_cart', function(event, fragments, cart_hash, $button) {
var productId = $button.data('product_id') || '';
var quantity = $button.data('quantity') || 1;
var productName = $button.data('product_sku') ||
$button.closest('.product').find('.woocommerce-loop-product__title').text().trim() || 'Unknown';
var priceElement = $button.closest('.product').find('.price .amount').text().replace(/[^0-9.]/g, '') || '0.00';
var currency = '<?php echo get_woocommerce_currency(); ?>';
fbq('track', 'AddToCart', {
content_ids: [productId],
content_type: 'product',
value: parseFloat(priceElement) * quantity,
currency: currency
});
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'add_to_cart',
'ecommerce': {
'currency': currency,
'value': parseFloat(priceElement) * quantity,
'items': [{
'item_id': productId,
'item_name': productName,
'price': parseFloat(priceElement),
'quantity': quantity
}]
}
});
});
});
});
</script>
<?php
}
// 4. AddPaymentInfo
if (is_checkout() && !is_wc_endpoint_url('order-received') && WC()->cart && WC()->cart->get_cart_contents_count() > 0) {
$currency = get_woocommerce_currency();
$cart_total = WC()->cart->get_total('edit');
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
fbq('track', 'AddPaymentInfo', {
value: <?php echo $cart_total; ?>,
currency: '<?php echo $currency; ?>'
});
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'add_payment_info',
'ecommerce': {
'currency': '<?php echo $currency; ?>',
'value': <?php echo $cart_total; ?>
}
});
});
</script>
<?php
}
// 5. Purchase
if (is_wc_endpoint_url('order-received')) {
$order_id = absint(get_query_var('order-received'));
if (!$order_id)
return;
$order = wc_get_order($order_id);
if (!$order || ($order->get_status() !== 'processing' && $order->get_status() !== 'completed'))
return;
$items = [];
foreach ($order->get_items() as $item) {
$product = $item->get_product();
$items[] = [
'item_id' => $product->get_id(),
'item_name' => $product->get_name(),
'price' => $product->get_price(),
'quantity' => $item->get_quantity()
];
}
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
fbq('track', 'Purchase', {
value: <?php echo $order->get_total(); ?>,
currency: '<?php echo $order->get_currency(); ?>',
content_ids: [<?php echo implode(',', array_column($items, 'item_id')); ?>],
content_type: 'product'
});
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'purchase',
'ecommerce': {
'currency': '<?php echo $order->get_currency(); ?>',
'value': <?php echo $order->get_total(); ?>,
'items': <?php echo json_encode($items); ?>
}
});
});
</script>
<?php
}
}
add_action('woocommerce_thankyou', 'send_purchase_to_metrika');
function send_purchase_to_metrika($order_id)
{
if (is_gp_test_mode())
return;
if (!$order_id)
return;
$order = wc_get_order($order_id);
if ($order->get_status() !== 'processing' && $order->get_status() !== 'completed')
return;
$items = [];
foreach ($order->get_items() as $item) {
$product = $item->get_product();
$items[] = [
'id' => $product->get_id(),
'name' => $product->get_name(),
'price' => $product->get_price(),
'quantity' => $item->get_quantity()
];
}
$currency = $order->get_currency();
?>
<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'ecommerce': {
'purchase': {
'actionField': {
'id': '<?php echo $order_id; ?>',
'revenue': '<?php echo $order->get_total(); ?>',
'currency': '<?php echo $currency; ?>'
},
'products': <?php echo json_encode($items); ?>
}
}
});
yaCounter96481053.reachGoal('purchase', {
'order_id': '<?php echo $order_id; ?>',
'order_price': '<?php echo $order->get_total(); ?>',
'currency': '<?php echo $currency; ?>',
'items': <?php echo json_encode($items); ?>
});
fbq('track', 'Purchase', {
value: <?php echo $order->get_total(); ?>,
currency: '<?php echo $currency; ?>',
content_ids: [<?php echo implode(',', array_column($items, 'id')); ?>],
content_type: 'product'
});
</script>
<?php
}
}
// Функция событий Meta Pixel
add_action('wp_head', function () {
global $site_env;
$show_pixel = false;
// Для продакшена
if ($site_env->site_mode === 'production' && $site_env->site_region === 'ae') {
$show_pixel = true;
}
// Для тестовых стендов AE
if ($site_env->site_mode === 'develope' && $site_env->site_region === 'ae') {
$show_pixel = true;
}
// Дополнительные проверки
$skip_tracking = false;
// Исключаем админов
if (current_user_can('administrator')) {
$skip_tracking = true;
}
// Исключаем gp-test режим
if ($site_env->is_gp_test_mode) {
$skip_tracking = true;
}
// Исключаем если есть параметр gp-test=1 в URL
if (isset($_GET['gp-test']) && $_GET['gp-test'] == '1') {
$skip_tracking = true;
}
if ($show_pixel && !$skip_tracking) {
$context = [
'currency' => get_woocommerce_currency(),
];
// Определяем тип страницы и подготавливаем данные
if (is_product()) {
// Страница товара - ViewContent
global $product;
if ($product && $product instanceof WC_Product) {
$context['pixel_event_type'] = 'ViewContent';
$context['product'] = [
'id' => $product->get_id(),
'name' => $product->get_name(),
'price' => floatval($product->get_price()),
'sku' => $product->get_sku(),
'category' => wp_get_post_terms($product->get_id(), 'product_cat', ['fields' => 'names'])[0] ?? '',
];
}
} elseif (is_checkout() && !is_order_received_page()) {
// Страница чекаута - InitiateCheckout
$context['pixel_event_type'] = 'InitiateCheckout';
if (WC()->cart && !WC()->cart->is_empty()) {
$context['cart_total'] = floatval(WC()->cart->get_total('edit'));
$context['cart_items'] = [];
$context['content_ids'] = [];
foreach (WC()->cart->get_cart() as $cart_item) {
$product = $cart_item['data'];
if ($product && $product instanceof WC_Product) {
$item_data = [
'item_id' => $product->get_id(),
'item_name' => $product->get_name(),
'price' => floatval($product->get_price()),
'quantity' => intval($cart_item['quantity']),
'category' => wp_get_post_terms($product->get_id(), 'product_cat', ['fields' => 'names'])[0] ?? '',
];
$context['cart_items'][] = $item_data;
$context['content_ids'][] = $product->get_id();
}
}
}
} elseif (is_order_received_page()) {
// Страница благодарности - Purchase
$order_id = get_query_var('order-received');
if ($order_id) {
$order = wc_get_order($order_id);
if ($order && $order instanceof WC_Order) {
$context['pixel_event_type'] = 'Purchase';
$order_items = [];
$content_ids = [];
foreach ($order->get_items() as $item) {
if ($item instanceof WC_Order_Item_Product) {
$product = $item->get_product();
if ($product && $product instanceof WC_Product) {
$order_items[] = [
'item_id' => $product->get_id(),
'item_name' => $product->get_name(),
'price' => floatval($item->get_total() / $item->get_quantity()),
'quantity' => intval($item->get_quantity()),
'category' => wp_get_post_terms($product->get_id(), 'product_cat', ['fields' => 'names'])[0] ?? '',
];
$content_ids[] = $product->get_id();
}
}
}
$context['order'] = [
'id' => $order->get_id(),
'total' => floatval($order->get_total()),
'currency' => $order->get_currency(),
'items' => $order_items,
'content_ids' => $content_ids,
'order_key' => $order->get_order_key(),
];
}
}
} else {
// Все остальные страницы - PageView + подготовка для AddToCart
$context['pixel_event_type'] = 'PageView';
$context['enable_addtocart'] = true; // Включаем обработчик AddToCart
// Дополнительные данные для PageView
global $wp_query;
$context['page_data'] = [
'page_title' => wp_get_document_title(),
'page_url' => home_url(add_query_arg(array(), $wp_query->request)),
'page_type' => get_page_type(),
];
}
// Рендерим шаблон
\Timber\Timber::render('templates/head-pixel-functions.twig', $context);
}
});
function get_page_type()
{
if (is_home() || is_front_page()) {
return 'home';
} elseif (is_shop()) {
return 'shop';
} elseif (is_product_category()) {
return 'category';
} elseif (is_product_tag()) {
return 'tag';
} elseif (is_search()) {
return 'search';
} elseif (is_cart()) {
return 'cart';
} elseif (is_account_page()) {
return 'account';
} else {
return 'other';
}
}

@ -1,4 +1,7 @@
<?php
global $site_env;
// $this->site_region
add_action('init', function() {
@ -104,6 +107,42 @@ add_action('init', function () {
],
'group' => 'General',
],
[
'name' => 'ЭТАПЫ ПРОИЗВОДСТВА',
'string' => 'ЭТАПЫ ПРОИЗВОДСТВА',
'translations' => [
'ru' => 'ЭТАПЫ ПРОИЗВОДСТВА',
'en' => 'PRODUCTION STAGES',
],
'group' => 'General',
],
[
'name' => 'ЭТАПЫ ПРОИЗВОДСТВА',
'string' => 'ЭТАПЫ ПРОИЗВОДСТВА',
'translations' => [
'ru' => 'ЭТАПЫ ПРОИЗВОДСТВА',
'en' => 'PRODUCTION STAGES',
],
'group' => 'General',
],
[
'name' => 'Этапы производства корма',
'string' => 'Этапы производства корма',
'translations' => [
'ru' => 'Этапы производства корма',
'en' => 'Stages of feed production',
],
'group' => 'General',
],
[
'name' => 'Наши партнеры',
'string' => 'Наши партнеры',
'translations' => [
'ru' => 'Наши партнеры',
'en' => 'Our partners',
],
'group' => 'General',
],
[
'name' => 'Ваше имя',
'string' => 'Ваше имя',
@ -140,6 +179,33 @@ add_action('init', function () {
],
'group' => 'General',
],
[
'name' => 'Соглашение о конфиденциальности',
'string' => 'Соглашение о конфиденциальности',
'translations' => [
'ru' => 'Соглашение о конфиденциальности',
'en' => 'Privacy policy',
],
'group' => 'General',
],
[
'name' => 'Декларация соответствия корма',
'string' => 'Декларация соответствия корма',
'translations' => [
'ru' => 'Декларация соответствия корма',
'en' => 'Declaration of conformity of feed',
],
'group' => 'General',
],
[
'name' => 'Декларация соответствия лакомств',
'string' => 'Декларация соответствия лакомств',
'translations' => [
'ru' => 'Декларация соответствия лакомств',
'en' => 'Declaration of conformity of treats',
],
'group' => 'General',
],
[
'name' => 'Чат бот с ветеринаром',
'string' => 'Чат бот с ветеринаром',
@ -1544,4 +1610,294 @@ add_action('init', function () {
pll_register_string('Подписки', 'Подписки', 'Theme');
pll_register_string('Не указан', 'Не указан', 'Theme');
pll_register_string('месяц', 'месяц', 'Theme');
});
pll_register_string('Узнать о поступлении', 'Узнать о поступлении', 'Theme');
pll_register_string('Оставьте свой e-mail, и мы оповестим вас, когда продукт появится', 'Оставьте свой e-mail, и мы оповестим вас, когда продукт появится', 'Theme');
pll_register_string('Я ознакомился с <a href="#">политикой обработки персональных данных</a> и <a href="#">пользовательским соглашением
', 'Я ознакомился с <a href="#">политикой обработки персональных данных</a> и <a href="#">пользовательским соглашением
', 'Theme');
pll_register_string('Оставить почту', 'Оставить почту', 'Theme');
pll_register_string('Подписка на товар оформлена', 'Подписка на товар оформлена', 'Theme');
pll_register_string('На ваш e-mail <span id="email_current"></span> придет письмо, как только продукт появится в наличии.', 'На ваш e-mail <span id="email_current"></span> придет письмо, как только продукт появится в наличии.', 'Theme');
pll_register_string('Продолжить покупки', 'Продолжить покупки', 'Theme');
pll_register_string('Your cart is empty', 'Your cart is empty', 'Cart');
pll_register_string('Feed subscription', 'Feed subscription', 'Profile');
pll_register_string('Weekly food delivery for your pet', 'Weekly food delivery for your pet', 'Profile');
pll_register_string('Get details', 'Get details', 'Profile');
pll_register_string('Name is not set', 'Name is not set', 'Profile');
pll_register_string('Not filled', 'Not filled', 'Profile');
pll_register_string('Email is verified', 'Email is verified', 'Profile');
pll_register_string('Email is not verified', 'Email is not verified', 'Profile');
pll_register_string('Verify', 'Verify', 'Theme');
pll_register_string('Email with verification link is sent to your email.', 'Email with verification link is sent to your email.', 'Profile');
pll_register_string('example@example.com', 'example@example.com', 'Profile');
pll_register_string('Link email', 'Link email', 'Profile');
pll_register_string('Linked accounts', 'Linked accounts', 'Profile');
pll_register_string('Edit', 'Edit', 'Profile');
pll_register_string('Logout', 'Logout', 'Profile');
pll_register_string('Add a pet', 'Add a pet', 'Profile');
pll_register_string('Phone', 'Phone', 'Profile');
pll_register_string('Email', 'Email', 'Profile');
pll_register_string('Order from', 'Order from', 'Profile');
pll_register_string('Summary', 'Summary', 'Profile');
pll_register_string('Delivery address', 'Delivery address', 'Profile');
pll_register_string('CDEK shipping point', 'CDEK shipping point', 'Profile');
pll_register_string('Track order', 'Track order', 'Profile');
pll_register_string('Order details', 'Order details', 'Profile');
pll_register_string('No orders yet', 'No orders yet', 'Profile');
pll_register_string('Catalog', 'Catalog', 'Profile');
pll_register_string('Subscription №', 'Подписка №', 'Profile');
pll_register_string('Status', 'Статус', 'Profile');
pll_register_string('Subscription date', 'Дата подписки', 'Profile');
pll_register_string('Last order date', 'Дата последнего заказа', 'Profile');
pll_register_string('Next payment', 'Следующий платеж', 'Profile');
pll_register_string('Payment method', 'Способ оплаты', 'Profile');
pll_register_string('Products:', 'Товары:', 'Profile');
pll_register_string('Total', 'Сумма', 'Profile');
pll_register_string('month', 'месяц', 'Profile');
pll_register_string('Delivery', 'Доставка', 'Profile');
pll_register_string('Free', 'Бесплатно', 'Profile');
pll_register_string('Amount', 'Итого', 'Profile');
pll_register_string('Shipping:', 'Доставка:', 'Profile');
pll_register_string('Delivery address', 'Адрес доставки', 'Profile');
pll_register_string('Start typing address', 'Начните вводить адрес', 'Profile');
pll_register_string('Invalid address entered', 'Адрес введен неверно', 'Profile');
pll_register_string('Delivery comment', 'Комментарий для доставки', 'Profile');
pll_register_string('For delivery service', 'Для службы доставки', 'Profile');
pll_register_string('Invalid comment entered', 'Комментарий введен неверно', 'Profile');
pll_register_string('Save', 'Сохранить', 'Profile');
pll_register_string('Cancel subscription', 'Отменить подписку', 'Profile');
pll_register_string('Subscription not found.', 'Подписка не найдена.', 'Profile');
pll_register_string('Subscription from', 'Подписка от', 'Profile');
pll_register_string('Amount:', 'Сумма:', 'Profile');
pll_register_string('Next payment:', 'Следующий платеж:', 'Profile');
pll_register_string('Subscription details', 'Детали подписки', 'Profile');
pll_register_string('Details not available', 'Детали недоступны', 'Profile');
pll_register_string('You have no active subscriptions.', 'У вас нет активных подписок.', 'Profile');
pll_register_string('Add a pet', 'Добавить питомца', 'Profile');
pll_register_string('Animal type', 'Вид животного', 'Profile');
pll_register_string('Cat', 'Кошка', 'Profile');
pll_register_string('Dog', 'Собака', 'Profile');
pll_register_string('Sterilized', 'Стерелизован', 'Profile');
pll_register_string('Yes', 'Да', 'Profile');
pll_register_string('No', 'Нет', 'Profile');
pll_register_string('Name', 'Имя', 'Profile');
pll_register_string('Pet name', 'Имя питомца', 'Profile');
pll_register_string('Breed', 'Порода', 'Profile');
pll_register_string('Your pet breed', 'Порода вашего питомца', 'Profile');
pll_register_string('Your pet gender', 'Пол вашего питомца', 'Profile');
pll_register_string('Boy', 'Мальчик', 'Profile');
pll_register_string('Girl', 'Девочка', 'Profile');
pll_register_string('Activity level', 'Вид активности', 'Profile');
pll_register_string('Select from list', 'Выберите из списка', 'Profile');
pll_register_string('Low', 'Низкая', 'Profile');
pll_register_string('Medium', 'Средняя', 'Profile');
pll_register_string('High', 'Высокая', 'Profile');
pll_register_string('Weight', 'Вес', 'Profile');
pll_register_string('Pet age', 'Возраст питомца', 'Profile');
pll_register_string('Approximate', 'Примерный', 'Profile');
pll_register_string('Exact', 'Точный', 'Profile');
pll_register_string('Kitten', 'Малыш', 'Profile');
pll_register_string('(from 0 to 1 year)', '(от 0 до 1 года)', 'Profile');
pll_register_string('Adult', 'Взрослый', 'Profile');
pll_register_string('(from 1 to 7 years)', '(от 1 года до 7 лет)', 'Profile');
pll_register_string('Senior', 'Пожилой', 'Profile');
pll_register_string('(from 7 to 12 years)', '(от 7 до 12 лет)', 'Profile');
pll_register_string('Aging', 'Стареющий', 'Profile');
pll_register_string('(from 12 years and up)', '(от 12 лет и старше)', 'Profile');
pll_register_string('Day', 'День', 'Profile');
pll_register_string('DD', 'ДД', 'Profile');
pll_register_string('Month', 'Месяц', 'Profile');
pll_register_string('Year', 'Год', 'Profile');
pll_register_string('YYYY', 'ГГГГ', 'Profile');
pll_register_string('Add', 'Добавить', 'Profile');
pll_register_string('Feed subscription', 'Feed subscription', 'Profile');
pll_register_string('Weekly food delivery for your pet', 'Weekly food delivery for your pet', 'Profile');
pll_register_string('Get details', 'Get details', 'Profile');
pll_register_string('Order from', 'Order from', 'Profile');
pll_register_string('Summary', 'Summary', 'Profile');
pll_register_string('Delivery address', 'Delivery address', 'Profile');
pll_register_string('CDEK shipping point', 'CDEK shipping point', 'Profile');
pll_register_string('Track order', 'Track order', 'Profile');
pll_register_string('Order details', 'Order details', 'Profile');
pll_register_string('No orders yet', 'No orders yet', 'Profile');
pll_register_string('Catalog', 'Catalog', 'Profile');
pll_register_string('Subscription for food', 'Подписка на корм', 'Profile');
pll_register_string('I want to try first!', 'Хочу попробовать первым!', 'Profile');
pll_register_string('I want to be first!', 'Хочу быть первым!', 'Profile');
pll_register_string('Edit my data', 'Изменить мои данные', 'Profile');
pll_register_string('First name', 'Имя', 'Profile');
pll_register_string('Your name', 'Ваше имя', 'Profile');
pll_register_string('First name is invalid', 'Имя введено неверно', 'Profile');
pll_register_string('Last name', 'Фамилия', 'Profile');
pll_register_string('Your last name', 'Ваша фамилия', 'Profile');
pll_register_string('Last name is invalid', 'Фамилия введена неверно', 'Profile');
pll_register_string('Phone', 'Телефон', 'Profile');
pll_register_string('Phone is invalid', 'Номер введён неверно', 'Profile');
pll_register_string('Save', 'Сохранить', 'Profile');
pll_register_string('Cancel', 'Отмена', 'Profile');
pll_register_string('Breed', 'Breed', 'Profile');
pll_register_string('Weight', 'Weight', 'Profile');
pll_register_string('from 0,5 kg to 1,5 kg', 'from 0,5 kg to 1,5 kg', 'Profile');
pll_register_string('from 1.5 to 3 kg', 'from 1.5 to 3 kg', 'Profile');
pll_register_string('from 3 to 5 kg', 'from 3 to 5 kg', 'Profile');
pll_register_string('from 5 to 8 kg', 'from 5 to 8 kg', 'Profile');
pll_register_string('from 8 to 11 kg', 'from 8 to 11 kg', 'Profile');
pll_register_string('from 11 to 15 kg', 'from 11 to 15 kg', 'Profile');
pll_register_string('from 15 to 20 kg', 'from 15 to 20 kg', 'Profile');
pll_register_string('from 20 to 25 kg', 'from 20 to 25 kg', 'Profile');
pll_register_string('from 25 to 35 kg', 'from 25 to 35 kg', 'Profile');
pll_register_string('More than 35 kg', 'More than 35 kg', 'Profile');
pll_register_string('Age', 'Age', 'Profile');
pll_register_string('Adult (from 1 year to 7 years)', 'Adult (from 1 year to 7 years)', 'Profile');
pll_register_string('Elderly (from 7 to 12 years)', 'Elderly (from 7 to 12 years)', 'Profile');
pll_register_string('Aging (12 years and older)', 'Aging (12 years and older)', 'Profile');
pll_register_string('Baby (from 0 to 1 year)', 'Baby (from 0 to 1 year)', 'Profile');
pll_register_string('Birthday', 'Birthday', 'Profile');
pll_register_string('Activity', 'Activity', 'Profile');
pll_register_string('Low', 'Low', 'Profile');
pll_register_string('Moderate', 'Moderate', 'Profile');
pll_register_string('High', 'High', 'Profile');
pll_register_string('Sterilized', 'Sterilized', 'Profile');
pll_register_string('Edit', 'Edit', 'Profile');
pll_register_string('Редактировать питомца', 'Редактировать питомца', 'Profile');
pll_register_string('Адрес доставки успешно обновлён.', 'Адрес доставки успешно обновлён.', 'profile-sub-single');
pll_register_string('Ошибка безопасности. Обновите страницу.', 'Ошибка безопасности. Обновите страницу.', 'profile-sub-single');
pll_register_string('Вы не авторизованы.', 'Вы не авторизованы.', 'profile-sub-single');
pll_register_string('Недостаточно данных.', 'Недостаточно данных.', 'profile-sub-single');
pll_register_string('Подписка не найдена или не принадлежит вам.', 'Подписка не найдена или не принадлежит вам.', 'profile-sub-single');
pll_register_string('Адрес доставки', 'Адрес доставки', 'profile-sub-single');
pll_register_string('Город', 'Город', 'profile-sub-single');
pll_register_string('contact_recipient', 'Контакты получателя', 'Checkout');
pll_register_string('logout', 'Выйти', 'Checkout');
pll_register_string('login', 'Войти', 'Checkout');
pll_register_string('shipping_title', 'Доставка', 'Checkout');
pll_register_string('pickup_point', 'Пункт выдачи', 'Checkout');
pll_register_string('choose_pickup_point', 'Выберите пункт выдачи', 'Checkout');
pll_register_string('delivery_address', 'Адрес доставки', 'Checkout');
pll_register_string('choose_delivery_address', 'Выберите адрес доставки', 'Checkout');
pll_register_string('delivery_comment', 'Комментарий для доставки', 'Checkout');
pll_register_string('your_order', 'Ваш заказ', 'Checkout');
pll_register_string('coupon_code', 'Код купона', 'Checkout');
pll_register_string('deliver_here', 'Доставить сюда', 'Checkout');
pll_register_string('address', 'Адрес', 'Checkout');
pll_register_string('start_typing_address', 'Начните вводить ваш адрес', 'Checkout');
pll_register_string('apartment', 'Квартира', 'Checkout');
pll_register_string('floor', 'Этаж', 'Checkout');
pll_register_string('entrance', 'Подъезд', 'Checkout');
pll_register_string('intercom', 'Домофон', 'Checkout');
pll_register_string('intercom code', 'Код домофона', 'Checkout');
pll_register_string('coupon_placeholder', 'Промокод', 'Checkout');
pll_register_string('apply_coupon_button', 'Применить', 'Checkout');
pll_register_string('error_invalid_coupon', 'Ошибка! Промокод введен неверно или не существует.', 'Checkout');
pll_register_string('remove_coupon_button', 'Удалить', 'Checkout');
pll_register_string('Применен промокод:', 'Применен промокод:', 'Checkout');
pll_register_string('shipping_method_cdek_courier', 'Курьером', 'Checkout');
pll_register_string('shipping_method_pickup_point', 'Пункт выдачи', 'Checkout');
pll_register_string('shipping_method_time', 'время', 'Checkout');
pll_register_string('shipping_method_price', '₽', 'Checkout');
pll_register_string('shipping_method_no_available', 'Нет доступных способов доставки. Для отображение доступных методов укажите ваш город.', 'Checkout');
pll_register_string('shipping_to', 'Shipping to %s.', 'Checkout');
pll_register_string('change_address', 'Change address', 'Checkout');
pll_register_string('shipping_options_updated', 'Shipping options will be updated during checkout.', 'Checkout');
pll_register_string('Товары', 'Товары', 'Checkout');
pll_register_string('Начните вводить ваш email', 'Начните вводить ваш email', 'Checkout');
pll_register_string('Населенный пункт', 'Населенный пункт', 'Checkout');
pll_register_string('Ваш город', 'Ваш город', 'Checkout');
pll_register_string('Оплатить', 'Оплатить', 'Checkout');
pll_register_string('Запомнить меня', 'Запомнить меня', 'Checkout');
pll_register_string('coming soon', 'coming soon', 'Not found');
pll_register_string('This item is not on our website yet, but it will be here very soon', 'This item is not on our website yet, but it will be here very soon', 'Not found');
});
// Регистрируем строковые переводы для динамической подстановки в JS
/* TO_DO: переделать под ppl_e() */
add_action('wp_head', function () {
if (function_exists('pll_current_language')) {
$lang = pll_current_language();
$translations = [
'en' => [
'name_required' => 'The name is required.',
'email_invalid' => 'Email is incorrect.',
'phone_invalid' => 'The phone number is incorrect.',
'error_coupon_empty' => 'Please enter the coupon code.',
'error_coupon_invalid' => 'Error! The coupon code is invalid or does not exist.',
'error_generic' => 'An error occurred. Please try again.',
'shipping_method_error' => 'No pickup point selected for delivery.',
'shipping_address_error' => 'Delivery address not provided',
'email_taken_error' => 'This email is already registered. Please log in or provide a different email.',
'phone_number_error' => 'Incorrect phone number entered.',
'shipping_method_missing' => 'No delivery method selected. Please check your address or contact the site administration for help.',
'change_address' => 'Change address',
'shipping_updated' => 'Shipping methods will be updated during checkout.',
'coupon_applied' => 'Coupon applied: ',
// 🔽 Новые строки из JS
'Choose pick-up' => 'Choose pick-up',
'Re-select pick-up' => 'Re-select pick-up',
'There are no CDEK pick-up points available in this direction, please select another delivery method' =>
'There are no CDEK pick-up points available in this direction, please select another delivery method'
],
'ru' => [
'name_required' => 'Поле имени обязательно для заполнения.',
'email_invalid' => 'Введите корректный email.',
'phone_invalid' => 'Введите корректный номер телефона.',
'error_coupon_empty' => 'Пожалуйста, введите код купона.',
'error_coupon_invalid' => 'Ошибка! Промокод введен неверно или не существует.',
'error_generic' => 'Произошла ошибка. Попробуйте ещё раз.',
'shipping_method_error' => 'Не выбран ПВЗ для доставки заказа.',
'shipping_address_error' => 'Не указан адрес доставки',
'email_taken_error' => 'Этот email уже зарегистрирован. Войдите в свой аккаунт или укажите другой E-mail.',
'phone_number_error' => 'Неправильно введен номер',
'shipping_method_missing' => 'Не выбран метод доставки. Пожалуйста перепроверьте ваш адрес или обратитесь за помощью к администрации сайта.',
'change_address' => 'Изменить адрес',
'shipping_updated' => 'Методы доставки будут обновлены в процессе оформления заказа.',
'coupon_applied' => 'Применен промокод: ',
'Choose pick-up' => 'Выбрать пункт выдачи',
'Re-select pick-up' => 'Выбрать другой пункт выдачи',
'There are no CDEK pick-up points available in this direction, please select another delivery method' =>
'В этом направлении нет доступных пунктов выдачи CDEK, пожалуйста, выберите другой способ доставки'
]
];
$current_translations = $translations[$lang] ?? $translations['en'];
?>
<? // GP | Обращаемся из wp-content/themes/cosmopet/modules/forms/assets/js/form.js ?>
<script>
window.langData = {
currentLang: "<?php echo esc_js($lang); ?>",
translations: <?php echo json_encode($current_translations, JSON_UNESCAPED_UNICODE); ?>
};
</script>
<?php
}
});

@ -1,13 +1,13 @@
<?php
/* Start | Работа с проверкой мультисайтовости и стендов */
class SiteEnvironment
{
public string $mode;
public string $region;
public function __construct(string $host = null)
{
global $site_env;
$site_env = new SiteEnvironment();
class SiteEnvironment {
public string $site_mode;
public string $site_region;
public bool $is_gp_test_mode;
public function __construct(string $host = null) {
$map = [
'cosmopet.ru' => ['mode' => 'production', 'region' => 'ru'],
'cosmopet.ae' => ['mode' => 'production', 'region' => 'ae'],
@ -15,296 +15,24 @@ class SiteEnvironment
'cosmopet-test-ru.cp.good-production.xyz' => ['mode' => 'develope', 'region' => 'ru'],
'cosmopet-test-ae.cp.good-production.xyz' => ['mode' => 'develope', 'region' => 'ae'],
];
$host = strtolower($host ?: $_SERVER['SERVER_NAME']);
$config = $map[$host] ?? ['mode' => 'develope', 'region' => 'unknown'];
$this->site_mode = $config['mode'];
$this->site_region = $config['region'];
$this->is_gp_test_mode = (isset($_GET['gp-test']) && $_GET['gp-test'] == '1') || (is_user_logged_in() && current_user_can('administrator'));
}
}
add_filter('timber/twig', function (\Twig\Environment $twig) {
$site_env = new SiteEnvironment();
global $site_env;
$twig->addGlobal('site_region', $site_env->site_region);
$twig->addGlobal('site_env', $site_env);
$twig->addGlobal('site_mode', $site_env->site_mode);
$twig->addGlobal('header_scripts', get_field('header_scripts', 'option')); // со страницы "Общих настроек контента ACF"
$twig->addGlobal('header_scripts', get_field('header_scripts', 'option'));
return $twig;
});
/* End | Работа с проверкой мультисайтовости и стендов */
add_filter('woocommerce_currency_symbol', 'change_aed_currency_symbol', 10, 2);
function change_aed_currency_symbol($currency_symbol, $currency) {
if ($currency == 'AED') {
$currency_symbol = 'AED';
}
return $currency_symbol;
}
add_filter('timber/context', function($context) {
// Передаем все нужные константы в контекст Twig
$context['CONSTANTS'] = [
'DOMAIN' => defined('SITE_DOMAIN') ? SITE_DOMAIN : null,
];
return $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() {
if (!is_admin()) {
// Защищаем от дублирования
static $canonical_added = false;
if ($canonical_added) {
return;
}
$canonical_added = true;
// Формируем текущий URL без лишних параметров
$current_url = trailingslashit(home_url($_SERVER['REQUEST_URI']));
// Удаляем возможные параметры запроса, если они не нужны
$current_url = strtok($current_url, '?');
echo '<link rel="canonical" href="' . esc_url($current_url) . '" />' . "\n";
}
}
add_action('woocommerce_thankyou', 'send_purchase_to_metrika');
function send_purchase_to_metrika($order_id) {
if (!$order_id) return; // Проверка, что заказ существует
$order = wc_get_order($order_id);
if ($order->get_status() !== 'processing' && $order->get_status() !== 'completed') return; // Отправляем только для оплаченных заказов
$items = [];
foreach ($order->get_items() as $item) {
$product = $item->get_product();
$items[] = [
'id' => $product->get_id(),
'name' => $product->get_name(),
'price' => $product->get_price(),
'quantity' => $item->get_quantity()
];
}
// Получаем валюту заказа
$currency = $order->get_currency();
?>
<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'ecommerce': {
'purchase': {
'actionField': {
'id': '<?php echo $order_id; ?>',
'revenue': '<?php echo $order->get_total(); ?>',
'currency': '<?php echo $currency; ?>'
},
'products': <?php echo json_encode($items); ?>
}
}
});
// Яндекс.Метрика
yaCounter96481053.reachGoal('purchase', {
'order_id': '<?php echo $order_id; ?>',
'order_price': '<?php echo $order->get_total(); ?>',
'currency': '<?php echo $currency; ?>',
'items': <?php echo json_encode($items); ?>
});
// Facebook Pixel
fbq('track', 'Purchase', {
value: <?php echo $order->get_total(); ?>,
currency: '<?php echo $currency; ?>',
content_ids: [<?php echo implode(',', array_column($items, 'id')); ?>],
content_type: 'product'
});
</script>
<?php
}
/**
* Добавление событий контрибуции для FP Pixel
* только на боевом сайте АЕ
* */
if($site_env->site_mode == 'production' and $site_env->site_region == 'ae') {
add_action('wp_footer', 'add_facebook_pixel_events');
function add_facebook_pixel_events() {
// 1. Событие AddToCart (Добавление в корзину)
if (is_product() || is_shop() || is_cart()) {
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
jQuery(function($) {
$(document.body).on('added_to_cart', function(event, fragments, cart_hash, $button) {
var productId = $button.data('product_id') || '';
var quantity = $button.data('quantity') || 1;
var productName = $button.data('product_sku') ||
$button.closest('.product').find('.woocommerce-loop-product__title').text().trim() || 'Unknown';
var priceElement = $button.closest('.product').find('.price .amount').text().replace(/[^0-9.]/g, '') || '0.00';
var currency = '<?php echo get_woocommerce_currency(); ?>'; // Динамическая валюта
// Событие для Facebook Pixel
fbq('track', 'AddToCart', {
content_ids: [productId],
content_type: 'product',
value: parseFloat(priceElement) * quantity,
currency: currency
});
// Событие для Google Analytics
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'add_to_cart',
'ecommerce': {
'currency': currency,
'value': parseFloat(priceElement) * quantity,
'items': [{
'item_id': productId,
'item_name': productName,
'price': parseFloat(priceElement),
'quantity': quantity
}]
}
});
});
});
});
</script>
<?php
}
// 2. Событие Purchase (Покупка)
if (is_wc_endpoint_url('order-received')) {
$order_id = absint(get_query_var('order-received'));
if (!$order_id) return;
$order = wc_get_order($order_id);
if (!$order || ($order->get_status() !== 'processing' && $order->get_status() !== 'completed')) return;
$items = [];
foreach ($order->get_items() as $item) {
$product = $item->get_product();
$items[] = [
'item_id' => $product->get_id(),
'item_name' => $product->get_name(),
'price' => $product->get_price(),
'quantity' => $item->get_quantity()
];
}
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
fbq('track', 'Purchase', {
value: <?php echo $order->get_total(); ?>,
currency: '<?php echo $order->get_currency(); ?>',
content_ids: [<?php echo implode(',', array_column($items, 'item_id')); ?>],
content_type: 'product'
});
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'purchase',
'ecommerce': {
'currency': '<?php echo $order->get_currency(); ?>',
'value': <?php echo $order->get_total(); ?>,
'items': <?php echo json_encode($items); ?>
}
});
});
</script>
<?php
}
// 3. Событие AddPaymentInfo
if (is_checkout() && !is_wc_endpoint_url('order-received')) {
$currency = get_woocommerce_currency();
$cart_total = WC()->cart ? WC()->cart->get_total('edit') : 0;
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
fbq('track', 'AddPaymentInfo', {
value: <?php echo $cart_total; ?>,
currency: '<?php echo $currency; ?>'
});
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'add_payment_info',
'ecommerce': {
'currency': '<?php echo $currency; ?>',
'value': <?php echo $cart_total; ?>
}
});
});
</script>
<?php
}
}
}
// Отключаем кэширование для страниц товаров
add_action('template_redirect', function() {
if (is_product()) {
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');
}
});
add_action('wp_head', 'custom_hreflang_shop', 6);
function custom_hreflang_shop() {
if (!is_admin() && function_exists('pll_get_post') && function_exists('pll_languages_list')) {
// Защищаем от дублирования
static $hreflang_added = false;
if ($hreflang_added) {
return;
}
$hreflang_added = true;
// Домены для языков
$ru_domain = 'https://cosmopet-test-ru.cp.good-production.xyz';
$en_domain = 'https://cosmopet-test-ae.cp.good-production.xyz';
// Текущий пост/страница
$current_post_id = get_the_ID();
if (!$current_post_id) {
// Для случаев, когда get_the_ID() не работает (например, архивы)
$current_path = trailingslashit($_SERVER['REQUEST_URI']);
$query_string = $_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '';
$ru_url = $ru_domain . $current_path . $query_string;
$en_url = $en_domain . $current_path . $query_string;
} else {
// Получаем переводы поста/страницы
$ru_post_id = pll_get_post($current_post_id, 'ru');
$en_post_id = pll_get_post($current_post_id, 'en');
// Формируем URL с учетом перевода и параметров запроса
$query_string = $_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '';
$ru_url = $ru_post_id ? get_permalink($ru_post_id) . $query_string : $ru_domain . trailingslashit($_SERVER['REQUEST_URI']) . $query_string;
$en_url = $en_post_id ? get_permalink($en_post_id) . $query_string : $en_domain . trailingslashit($_SERVER['REQUEST_URI']) . $query_string;
}
// Выводим hreflang-теги
echo '<link rel="alternate" hreflang="ru-RU" href="' . esc_url($ru_url) . '" />' . "\n";
echo '<link rel="alternate" hreflang="en-AE" href="' . esc_url($en_url) . '" />' . "\n";
}
}
add_filter('woocommerce_currency_symbol', function($currency_symbol, $currency) {
return $currency === 'AED' ? 'AED' : $currency_symbol;
}, 10, 2);

@ -0,0 +1,16 @@
<?php
add_action('wp_enqueue_scripts', 'override_cdek_widget_script', 100);
function override_cdek_widget_script() {
// Убираем оригинал
wp_dequeue_script('cdek-map');
wp_deregister_script('cdek-map');
// Подключаем свой модифицированный
wp_enqueue_script(
'cdek-map', // тот же handle — это ВАЖНО!
get_stylesheet_directory_uri() . '/static/js/cdek-map.js',
['jquery', 'lodash', 'wp-i18n', 'cdek-widget'], // зависимости, если нужны
'1.0',
true // в футере
);
}

@ -0,0 +1,25 @@
<?php
add_action('init', 'register_pets');
function register_pets(){
register_post_type('pets', array(
'labels' => array(
'name' => 'Питомцы', // Основное название типа записи
'singular_name' => 'Питомец', // отдельное название записи типа Book
'add_new' => 'Добавить нового',
'add_new_item' => 'Добавить нового питомца',
'edit_item' => 'Редактировать питомца',
'new_item' => 'Новый питомец',
'view_item' => 'Посмотреть питомца',
'search_items' => 'Найти питомца',
'not_found' => 'Питомцев не найдено',
'not_found_in_trash' => 'В корзине книг не найдено',
'parent_item_colon' => '',
'menu_name' => 'Питомцы'
),
'public' => false,
'show_ui' => true,
'supports' => array('title','editor')
) );
}

@ -0,0 +1,31 @@
<?php
add_action('template_redirect', 'redirect_non_logged_in_users');
function redirect_non_logged_in_users() {
// URL личного кабинета (замените 'your-account-page-slug' на ваш slug)
$account_page_slug = 'my-account-3';
$account_page_slug__2 = 'my-account';
// Проверяем, находится ли пользователь на странице личного кабинета
if (is_page($account_page_slug) && !is_user_logged_in() || is_page($account_page_slug__2) && !is_user_logged_in() ) {
wp_redirect(home_url()); // Перенаправляем на главную страницу
exit;
}
}
add_action('template_redirect', 'custom_redirect_cart_to_checkout');
function custom_redirect_cart_to_checkout() {
if (is_cart()) {
// Проверка, если корзина пуста
if (WC()->cart->is_empty()) {
wp_redirect(home_url());
exit;
} else {
// Редирект на страницу чекаута
wp_redirect(wc_get_checkout_url());
exit;
}
}
}

@ -0,0 +1,18 @@
<?
add_filter('wpseo_canonical', '__return_false');
add_filter('wpseo_opengraph_url', '__return_false');
add_filter('wpseo_add_x_default_hreflang', '__return_false');
add_filter('wpseo_disable_adjacent_rel_links', '__return_true');
/* Добавление canonical-ссылок */
add_action('wp_head', function () {
if (!is_admin()) {
static $canonical_added = false;
if ($canonical_added)
return;
$canonical_added = true;
$current_url = strtok(trailingslashit(home_url($_SERVER['REQUEST_URI'])), '?');
echo '<link rel="canonical" href="' . esc_url($current_url) . '" />' . "\n";
}
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 KiB

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

@ -2,10 +2,19 @@ main{
padding-top: 72px;
}
main .other-home {
background: none!important;
padding-bottom: 68px;
}
.block-lists_text p {
font-size: 18px!important;
}
.home-blog {
padding: 60px 0 68px!important;
}
.user a{
display: flex;
align-items: center;
@ -91,3 +100,5 @@ main{

@ -1,3 +1,53 @@
@media(max-width:768px) {
body {
background: radial-gradient(261.43% 263.03% at 124% -28.000000000000004%, rgb(15, 88, 129), rgb(30, 164, 156) 36.979%, rgb(118, 206, 117) 66.667%, rgb(236, 243, 159) 91.146%);
font-family: var(--font-craftwork);
font-weight: 500;
}
main {
padding-top: 55px!important;
}
main .home-blog {
background: none!important;
}
main .home-blog .container {
padding: 0px 30px 36px !important;
}
.home-title {
font-size: 32px!important;
padding-top: 15px!important;
}
.home-description {
font-weight: bold;
font-size: 20px!important;
line-height: 24px!important;
margin-bottom: 36px!important;
}
.anons-best__card-wrap {
display: grid;
grid-template-columns: repeat(1, minmax(0, 1fr))!important;
gap: 24px;
}
.anons-article__card-wrap {
display: grid;
grid-template-columns: repeat(1, minmax(0, 1fr))!important;
gap: 10px 25px!important;
}
.author h2 {
font-size: 26px!important;
line-height: 30px!important;
}
.anons-theme ul a {
font-size: 16px!important;
}
main .other-home .container{
padding: 0px 30px 0px !important;
}
.home-blog {
padding: 60px 0 20px!important;
}
}
@media(max-width:600px) {
.article-content h2 {
max-width: 661px;

@ -1 +1,13 @@
/* Стили для планшетов */
@media (min-width:769px) and (max-width:1200px) {
.anons-best__card-wrap {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr))!important;
gap: 24px;
}
.anons-article__card-wrap {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr))!important;
gap: 40px 25px;
}
}

@ -11,10 +11,14 @@ wp_localize_script('blog-archive-posts-ajax-js', 'ajax', array(
'ajax_url' => admin_url('admin-ajax.php'),
));
global $wp_query;
$context = Timber::context();
$context['blog_title'] = get_field('blog_title', 'options');
$context['blog_desc'] = get_field('blog_desc', 'options');
$context['post_count'] = wp_count_posts()->publish; // Количество опубликованных постов
$context['total_pages'] = ceil($context['post_count'] / get_option('posts_per_page')); // Общее количество страниц
$context['total_pages'] = $wp_query->max_num_pages;
if (is_category()) {
$context['category'] = get_queried_object();
}
Timber::render('blog/blog-archive.twig', $context);

@ -13,6 +13,7 @@
align-items: center;
justify-content: space-between;
padding: 35px 42px 35px 209px;
gap: 20px;
position: relative;
box-shadow: 6px 9px 20px rgba(0, 0, 0, 15%);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 787 B

@ -0,0 +1,53 @@
<?php
use Timber\Timber;
$context = Timber::context();
$post = Timber::get_post();
$context['post'] = $post;
$context['top_level_comments'] = get_comments([
'post_id' => $post->ID,
'status' => 'approve',
'parent' => 0,
'order' => 'ASC'
]);
$context['is_user_logged_in'] = is_user_logged_in();
$context['comment_form_args'] = [
'comment_field' => '<div class="comment-form-comment"><textarea id="comment" name="comment" placeholder="' . pll__('Ваш комментарий') . '" required></textarea></div>',
'title_reply' => pll__('Оставить комментарий'),
'title_reply_to' => pll__('Ответить %s'),
'cancel_reply_link' => pll__('Отменить'),
'id_form' => 'commentform',
'id_submit' => 'submit',
'class_submit' => 'comment-submit-btn',
'submit_button' => '<button name="%1$s" type="submit" id="%2$s" class="%3$s">%4$s</button>',
'submit_field' => '<div class="form-submit">%1$s %2$s</div>',
'fields' => [
'author' => '',
'email' => '',
'url' => '',
'cookies' => '',
],
];
function get_all_nested_replies($comment_id, $post_id) {
$all_replies = [];
$direct_replies = get_comments([
'post_id' => $post_id,
'status' => 'approve',
'parent' => $comment_id,
'order' => 'ASC'
]);
$all_replies = array_merge($all_replies, $direct_replies);
foreach ($direct_replies as $reply) {
$all_replies = array_merge($all_replies, get_all_nested_replies($reply->comment_ID, $post_id));
}
return $all_replies;
}
foreach ($context['top_level_comments'] as $comment) {
$comment->replies = get_all_nested_replies($comment->comment_ID, $post->ID);
}
Timber::render('/blog/comments/comments.twig', $context);
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -33,7 +33,7 @@
border-radius: 60px;
overflow: hidden;
display: flex;
align-items: flex-start;
align-items: stretch;
gap: 24px;
position: relative;
}
@ -54,7 +54,7 @@
width: 395px;
border-radius: 60px;
overflow: hidden;
height: 393px;
height: auto;
flex-shrink: 0;
}
.home-card__img:hover img{
@ -69,7 +69,7 @@
}
.home-card__content {
padding: 32px 79px 0 0;
padding: 32px 79px 100px 0;
}
.home-card__content-title {

@ -0,0 +1,23 @@
jQuery('.main-blog_tags-tag').on('click', function(){
var category = jQuery(this).data('category'); // Получаем значение data-category
jQuery('.main-blog_tags-tag').removeClass('active')
jQuery(this).addClass('active')
jQuery.ajax({
url: window.ajax_url,
type: 'POST',
data: {
action: 'front_page_get_blog_posts',
category: category
},
beforeSend: function() {
},
success: function(response) {
jQuery('.main-blog_wrapper').html(response)
},
error: function(error) {
// Обработка ошибок
console.error('Ошибка AJAX:', error);
}
});
});

@ -0,0 +1,25 @@
<?php
include_component('blog', 'themes');
add_filter('timber/context', function($context) {
$args = array(
'post_type' => 'post',
'posts_per_page' => 5,
'post_status' => 'publish', // Только опубликованные записи
);
$featured_query = new WP_Query($args);
$f_query = array();
$i = 0;
foreach($featured_query->posts as $item){
if ($i > 0){
$f_query[] = Timber::get_post($item, 'BlogPost');
}
else{
$featured_post = Timber::get_post($item, 'BlogPost');
}
$i++;
}
$context['blog_posts'] = $f_query;
$context['featured_post'] = $featured_post;
return $context;
});

@ -1,22 +1,38 @@
<?php
add_filter('timber/context', function($context) {
// Простой запрос для получения последних постов
// Получаем текущую категорию
$current_category = get_queried_object();
$category_id = null;
if (isset($current_category) && !is_wp_error($current_category) && !empty($current_category->term_id)) {
$category_id = $current_category->term_id;
$category_name = $current_category->name;
} else {
$category_name = null;
}
// Формируем аргументы для запроса
$args = array(
'post_type' => 'post',
'posts_per_page' => 3,
'orderby' => 'date',
'order' => 'DESC'
'meta_key' => 'post_views_count', // Предполагаемое мета-поле для просмотров
'orderby' => 'meta_value_num', // Сортировка по числовому значению мета-поля
'order' => 'DESC',
);
// Если выбрана категория, добавляем фильтр по ней
if ($category_id) {
$args['cat'] = $category_id;
}
// Выполняем запрос
$most_read_query = new WP_Query($args);
$most_read = new Timber\PostQuery($most_read_query);
// Добавляем данные в контекст
$context['most_read'] = $most_read;
// Добавляем отладочную информацию
global $wpdb;
$debug_info = $wpdb->get_results("SELECT post_id, meta_key, meta_value FROM {$wpdb->postmeta} WHERE meta_key LIKE '%view%' LIMIT 5");
$context['debug_info'] = $debug_info;
$context['current_category'] = $category_name;
$context['category_list'] = get_categories();
return $context;
});

@ -1,28 +0,0 @@
<div class="anons-best">
<h2 class="anons-best__title">{{ function('pll_e', 'САМЫЕ ЧИТАЕМЫЕ') }}:</h2>
<ul class="anons-best__card-wrap">
{% for post in most_read %}
<li class="anons-best__card">
<ul class="anons-best__card-alerts">
{% for category in post.categories %}
<li>
<a href="{{ category.link }}">{{ category.name }}</a>
</li>
{% endfor %}
</ul>
<a href="{{post.link}}" class="main-img">
<img src="{{post.thumbnail.src}}" alt="{{post.thumbnail.alt}}">
</a>
<div class="anons-best__card-body">
<a href="{{post.link}}" class="anons-best__card-body__title">{{post.title}}</a>
<div class="anons-best__card-body__datas">
<p>{{post.date}}</p>
<p>{{ function('pll_e', 'время чтения') }}: {{post.reading_time}}</p>
</div>
</div>
</li>
{% endfor %}
</ul>
</div>

@ -359,9 +359,12 @@ p.discount-description__2 {
color: var(--grey-black);
}
.comment .comment-block p a {
.comment .comment-block p a, .comment .comment-block p button {
color: var(--green-dark);
font-family: inherit;
font-size: inherit;
text-decoration: underline;
font-weight: inherit;
}
.comment .comment-user {
@ -454,4 +457,16 @@ p.discount-description__2 {
.other-home {
padding-top: 36px !important;
}
/* comment */
/* comment */
.wp-block-video video {
vertical-align: middle;
width: 100%;
max-height: 640px;
width: auto;
max-width: 100%;
margin-left: auto;
margin-right: auto;
display: block;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 KiB

After

Width:  |  Height:  |  Size: 480 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 KiB

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -0,0 +1,7 @@
.blog-notice{
font-size: .8em;
font-weight: 300;
color: rgba(0, 0, 0, 0.55);
padding-top: .3rem;
padding-bottom: .3rem;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

@ -0,0 +1,48 @@
<?php
function notice_render_callback($block, $content = '', $is_preview = false, $post_id = 0) {
$context = Timber::context();
$context['block'] = $block;
$context['is_preview'] = $is_preview;
$context['content'] = get_field('content');
// Проверяем, есть ли картинка превью в блоке
if ($is_preview && !empty($block['data']['preview_image'])) {
echo '<img src="' . esc_url($block['data']['preview_image']) . '" alt="Preview" style="max-width: 100%; height: auto;">';
return;
}
Timber::render('modules/blog/editor-blocks/notice/editor-block-template.twig', $context);
}
add_action('acf/init', function(){
if( function_exists('acf_register_block') ) {
// register a testimonial block
acf_register_block(array(
'name' => 'gp_notice',
'title' => __('GP - Notice'),
'description' => __('A block to serve a text notice'),
'render_callback' => 'notice_render_callback',
'category' => 'formatting',
'icon' => 'admin-comments',
'keywords' => array( 'notice', 'simple block', 'gp-block',),
'mode' => 'preview',
'example' => array(
'attributes' => array(
'data' => array(
'is_preview' => true,
'preview_image' => get_template_directory_uri() . '/modules/blog/editor-blocks/notice/assets/img/preview.png'
)
)
),
'enqueue_assets' => function(){
wp_enqueue_style('gp_notice_style', get_template_directory_uri() . '/modules/blog/editor-blocks/notice/assets/css/style.css', array(), '5.0', 'all');
}
));
}
});
?>

@ -0,0 +1,4 @@
<section class="blog-notice">
{{ content }}
</section>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 KiB

After

Width:  |  Height:  |  Size: 631 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

@ -13,6 +13,7 @@ function get_posts_by_page_and_category($paged = 1, $category = '') {
'post_type' => 'post',
'posts_per_page' => 9, // Adjust the number of posts per page
'paged' => intval($paged) + 1,
'post_status' => 'publish', // Только опубликованные записи
];
if (!empty($category)) {
@ -31,7 +32,8 @@ function get_posts_by_page_and_category($paged = 1, $category = '') {
function ajax_load_blog_posts() {
$page_num = isset($_POST['page_num']) ? sanitize_text_field($_POST['page_num']) : '';
$context = Timber::context();
$context['posts'] = get_posts_by_page_and_category($page_num);
$category = $_POST['category'];
$context['posts'] = get_posts_by_page_and_category($page_num, $category);
$html = Timber::compile('/blog/news-list.twig', $context);
echo $html;
wp_die();
@ -42,3 +44,52 @@ add_action('wp_ajax_load_blog_posts', 'ajax_load_blog_posts');
add_action('wp_ajax_nopriv_load_blog_posts', 'ajax_load_blog_posts');
function ajax_front_page_get_blog_posts() {
$context = Timber::context();
$category = $_POST['category'];
$args = [
'post_type' => 'post',
'posts_per_page' => 5, // Adjust the number of posts per page
'paged' => intval($paged) + 1,
'post_status' => 'publish', // Только опубликованные записи
];
if (!empty($category)) {
$args['tax_query'] = [
[
'taxonomy' => 'category',
'field' => 'slug', // or 'term_id', 'name' depending on how you identify categories
'terms' => $category,
],
];
}
$featured_query = new WP_Query($args);
$f_query = array();
$i = 0;
foreach($featured_query->posts as $item){
if ($i > 0){
$f_query[] = Timber::get_post($item, 'BlogPost');
}
else{
$featured_post = Timber::get_post($item, 'BlogPost');
}
$i++;
}
$context['blog_posts'] = $f_query;
$context['featured_post'] = $featured_post;
$html = Timber::compile('/blog/blog-front-page-post-list_block.twig', $context);
echo $html;
wp_die();
}
add_action('wp_ajax_front_page_get_blog_posts', 'ajax_front_page_get_blog_posts');
add_action('wp_ajax_nopriv_front_page_get_blog_posts', 'ajax_front_page_get_blog_posts');

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save