diff --git a/wp-content/.cdekdelivery.php b/wp-content/.cdekdelivery.php new file mode 100644 index 0000000..c88bb2a --- /dev/null +++ b/wp-content/.cdekdelivery.php @@ -0,0 +1,18 @@ + + array ( + 'wordpress' => 'v4.local.nalowbOW6cLbDpvTkpTnMOVG_1PGHdZKveVTUIbgUv2hUvQGr5zQ-B97k1oykPdIiLx0D0EZ0xlOdhwqgV_DcPsmh3eOrZ9mLJOlmxL0Ciq1Lkhewhj3h1H4FQuiSmfg1oylejDCLtbzfWil8GNxrzGOiBoiiY2XALTxBT0ZDcCZNAGmKQTElV9Lzw5TxDYEm9ELTLCaFj3rTN3Vq8bMQy8aHK-Mgq2QvaD3YYEJiTxcgTl97df6rJQnGtYiG9dvhVFhShNdUj1sWh9vIzoXiUbZbByLwe5ZUwaDzE3G7xosGlTyQJ3WIle3ywsfnjgNxRQwOz--XcEYGUJ_nhR3oJscW7SJXdi-ziE5dnDi6k2XpaIbTbppIUvdeyzRDpC2VajiSvb3jg5kcxHL_3bFo-7D4Rjmtr2ZEr8uS4-xwt8uhLiSBLcRsLSGSCq0yMlNmgsxxUdySDu2Q5P5pDX3_5hBdg-4DuBH.eyJlbmRwb2ludCI6Imh0dHBzOlwvXC9hcGkuY2Rlay5ydVwvY21zIn0', + '@cdek-it/order' => 'v4.local.-h0jllL5iFSEWHkSBGY1TfzpFIQGYeCif9pGrZorJtWeZ1mUew3VjChFhXL60cVcN5LCXw9d_ui-XG1kIzjrx-UzDfK4fS-l4OznAhLWp7ZT1M3-X-uQiVJk5lzCJ2rNGQ-TJudeOlqL4kDKcqaPLgDzq5MQEqvloGAvviatPL-Y9ifTI183xVxcL6O7J700dFcQEhhSIcYfVnQVG2L1d93gxaUUH-OIMk1hxF1LCdnNIy6F6Zjt9yswXDEfEGWfE8OJysQQJhTj1IIOcf4_AZ-gGrSaXMMcG-J6GfDIjoU-uFrXhpI10grwgmY5Xka3-SPj2fyVV_e5WVuOew5HK0oDyHWqnlE37dWbQTBNPMqUNL50fQxviTzDYHplbM_CUq8YlNx2O_7FMt7b2w2sZMHLZBaWtH4zmOj8T2v-rY_MLeVwPuAfZPKnHqZMoGBL312Zh-tCyqVIp8gZ2jXJvKXnzMgumJv_uxA6Sdgk.eyJlbmRwb2ludCI6Imh0dHBzOlwvXC9hcGkuY2Rlay5ydVwvY21zIn0', + '@cdek-it/settings' => 'v4.local.Dbb69cuN8PIE7d1_5w3bD5OZI0Z5_K9w_UbnCJGJlM5jLLWkdkKf4d_svhJySz-NMm8xVJsEMEnCOSRVZZZIlcRaOlNqi7bsIDYXmpcnVCKL5v8cUWn9nKRSNvKUuiSqU_1aJl2pi7ZvxpII6STV4xxkcMXdtfYF9AZAOD0b6gtd7v8OdXjBzeKwbsilj7bToUv4mrmAlgMhd_MG3rKRP5-INo0B-rkwK78Ul88YjCgf0ooPyRICdQzLAgD7x42FJ3vYI9UA8g3wffx5kJxbRWrKUEfwZ1zJp-NQKAcyK5KGLIu9OUoFcQN4U_KdnnZqdqwwkovB0JIbqz-HKQcdi1Xrq5wKk5lIF-HdJteYn2t8Refd9soVGmN67O_V2K1b09Jw4v973C4rOxvw4WZNXHTm9a0mTI0pTk3Y5Dv1tJuN23zH73G_kNN_TSLUenE1iTGPdSnGXxIcfBG-sBoS1Au62QbzUY7lhftD6Bq6T6-6.eyJlbmRwb2ludCI6Imh0dHBzOlwvXC9hcGkuY2Rlay5ydVwvY21zIn0', + ), + 'endpoints' => + array ( + 'wordpress' => 'https://api.cdek.ru/cms', + '@cdek-it/order' => 'https://api.cdek.ru/cms', + '@cdek-it/settings' => 'https://api.cdek.ru/cms', + ), + 'keyring' => + array ( + 'k4.pid.jwGFnADDct9ZphWj1tZslqzRDXQIgEjvyVx8LI6MJR7d' => 'TDOjk4smnqY5AYE-aGdmFJIescdcJb26nThfAK3AVPU', + ), +); diff --git a/wp-content/themes/cosmopet/functions.php b/wp-content/themes/cosmopet/functions.php index 0eab026..f1347d6 100644 --- a/wp-content/themes/cosmopet/functions.php +++ b/wp-content/themes/cosmopet/functions.php @@ -423,12 +423,31 @@ requireShortcodes(get_template_directory() . '/modules'); require_once('modules/blog/module-ajax-controller.php'); require_once('modules/forms/module-ajax-controller.php'); +require_once('modules/shop/module-ajax-controller.php'); + +add_action('wp', 'my_custom_checkout_code'); +function my_custom_checkout_code() { + if (function_exists('is_checkout') && is_checkout() && !is_order_received_page()) { + include_component('shop', 'checkout'); + } +} + require_once('modules/author/module-ajax-controller.php'); + include_module('forms'); include_module('layout'); - +add_action('wp_enqueue_scripts', 'disable_woocommerce_css', 999); +function disable_woocommerce_css() { + wp_dequeue_style('woocommerce-general'); + wp_dequeue_style('woocommerce-layout'); + wp_dequeue_style('woocommerce-smallscreen'); + wp_dequeue_style('woocommerce_frontend_styles'); + wp_dequeue_style('woocommerce_fancybox_styles'); + wp_dequeue_style('woocommerce_chosen_styles'); + wp_dequeue_style('woocommerce_prettyPhoto_css'); +} class WooProduct extends Timber\Post { protected $wc_product; @@ -596,6 +615,8 @@ register_sidebar( array( ) ); +add_filter( 'woocommerce_price_trim_zeros', '__return_true' ); + function add_comment_like() { global $wpdb; $table_name = $wpdb->prefix . 'cosmopet_likes'; @@ -932,4 +953,5 @@ function remove_view_cart_button_js() { }); скидку!', 'Узнайте о нас больше и получите скидку!'); - pll_register_string ('Это миф!', 'Это миф!'); - pll_register_string ('Это правда!', 'Это правда!'); - pll_register_string ('Правда', 'Правда'); - pll_register_string ('Миф', 'Миф'); - pll_register_string ('Далее', 'Далее'); - pll_register_string ('ваш результат', 'ваш результат'); - pll_register_string ('Скопировать', 'Скопировать'); - pll_register_string ('Скопировано', 'Скопировано'); - pll_register_string ('В магазин', 'В магазин'); - pll_register_string ('Наш блог', 'Наш блог'); - pll_register_string ('Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных', 'Новости рынка кормов и экологии, полезные статьи о здоровье домашних животных'); - pll_register_string ('ЭТАПЫ ПРОИЗВОД­СТВА', 'ЭТАПЫ ПРОИЗВОД­СТВА'); - pll_register_string ('Этапы производс­тва корма', 'Этапы производс­тва корма'); - pll_register_string ('Все статьи', 'Все статьи'); - pll_register_string ('Узнать больше', 'Узнать больше'); -}); - diff --git a/wp-content/themes/cosmopet/modules/header/assets/css/gp-style-desktop.css b/wp-content/themes/cosmopet/modules/header/assets/css/gp-style-desktop.css index 82761d5..f9f3988 100644 --- a/wp-content/themes/cosmopet/modules/header/assets/css/gp-style-desktop.css +++ b/wp-content/themes/cosmopet/modules/header/assets/css/gp-style-desktop.css @@ -730,3 +730,29 @@ width: 0px; } + +.mini-profile__button--counter{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + padding: 2px; + position: absolute; + background: var(--gradient-turquoise); + border-radius: 10px; + width: 16px; + height: 16px; + + border-radius: 50%; + top: 6px; + right: 6px; + font-style: normal; + font-weight: 700; + font-size: 9px; + line-height: 16px; + color: #121212; +} + +.mini-profile__button--counter.disabled{ + display: none; +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/header/assets/js/core.js b/wp-content/themes/cosmopet/modules/header/assets/js/core.js index f11de2e..e69de29 100644 --- a/wp-content/themes/cosmopet/modules/header/assets/js/core.js +++ b/wp-content/themes/cosmopet/modules/header/assets/js/core.js @@ -1,151 +0,0 @@ -'use strict'; - -// function -function modalOpen(buttonElement, contentElement){ - let modal = document.querySelector('.modal'), - aside = document.querySelector('.modal__aside'), - elements = document.querySelectorAll(buttonElement), - device = window.screen.width; - - elements.forEach(e => { - let thisContentElement = document.querySelector(contentElement); - - e.onclick = function () { - modal.classList.add('active'); - thisContentElement.classList.add('active'); - - let width = thisContentElement.clientWidth; - - setTimeout(() => { - if (device <= 720) { - aside.style.width = `${device}px`; - thisContentElement.style.opacity = 1; - thisContentElement.style.filter = 'blur(0px)'; - }else{ - aside.style.width = `${width}px`; - thisContentElement.style.opacity = 1; - thisContentElement.style.filter = 'blur(0px)'; - } - }, 10); - } - }) -} - -function modalClose(buttonElement) { - let modal = document.querySelector('.modal'), - aside = document.querySelector('.modal__aside'), - asideItems = document.querySelectorAll('.modal__item'), - elements = document.querySelectorAll(buttonElement); - - elements.forEach(e => { - e.onclick = function () { - aside.style.width = '0px'; - - asideItems.forEach(e => { - if (e.classList.contains('active')) { - e.style.filter = 'blur(10px)'; - } - }); - - setTimeout(() => { - asideItems.forEach(e => { - if (e.classList.contains('active')) { - e.classList.remove('active'); - } - }); - - modal.classList.remove('active'); - }, 300); - } - }) -} - -function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement, close) { - let elements = document.querySelectorAll(mainElement); - - elements.forEach(e => { - let thisMainElement = e, - thisButtonElement = e.querySelector(buttonElement), - thisHeightElement = e.querySelector(heightElement), - thisContentElement = e.querySelector(contentElement); - - thisButtonElement.onclick = function (e) { - let height = thisHeightElement.clientHeight; - - if (close == true && !thisMainElement.classList.contains('active')) { - elements.forEach(e => { - if (e.classList.contains('active')) { - e.classList.remove('active'); - e.querySelector(contentElement).style.height = null - } - }) - } - - if (!thisMainElement.classList.contains('active')) { - thisContentElement.style.height = `${height}px`; - thisMainElement.classList.add('active'); - }else{ - thisContentElement.style.height = null; - thisMainElement.classList.remove('active'); - } - } - - }); -} -var menu_opened = false; -function toggleHeader(button, content, blockheight, removeBlock, removeClass) { - let thisButton = document.querySelector(button), - thisContent = document.querySelector(content), - thisRemoveBlock = document.querySelector(removeBlock) || '', - thisBlockheight = document.querySelector(blockheight); - - thisButton.onclick = function () { - let height = thisBlockheight.clientHeight; - - if (!thisContent.classList.contains('open')) { - thisContent.style.height = `${height}px`; - thisContent.classList .add('open'); - - if (removeBlock) { - thisRemoveBlock.classList.remove(removeClass); - } - }else{ - thisContent.style.height = null; - thisContent.classList.remove('open'); - - if (removeBlock) { - if (window.Y <= 25) { - thisRemoveBlock.classList.add(removeClass); - } - } - } - menu_opened = !menu_opened; - } -} - - - -if (document.querySelector('.header').classList.contains('white')) { - window.addEventListener("scroll", function (e) { - let header = document.querySelector('.header'); - let scroll = window.scrollY; - if(!menu_opened){ - if (scroll >= 25) { - header.classList.remove('white') - }else{ - - header.classList.add('white') - - } - } - - }); -} - -toggleOpenX('.lang', '.lang__open', '.lang__list', '.lang__content', false); -toggleHeader('#pc-menu','.header__menu-block','.header__pc-menu', '.white', 'white'); -toggleHeader('#phone-menu','.header__menu-block','.header__phone-menu', '.white', 'white'); -// scroll - - - diff --git a/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css b/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css index 5541691..1ed44cf 100644 --- a/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css +++ b/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-core.css @@ -1,32 +1,80 @@ @font-face { - font-family: "Craftwork Grotest"; - src: url('../fonts/Craftwork_Grotesk_Trial/CraftworkGrotesk-Regular.ttf'); + font-family: "Craftwork Grotesk"; + src: local("Craftwork Grotesk Bold"), + url("../fonts/craftwork/CraftworkGrotesk-SemiBold.woff2") format("woff2"), + url("../fonts/craftwork/CraftworkGrotesk-Bold.woff") format("woff"), + url("../fonts/craftwork/craftwork-grotesk-bold.ttf") format("ttf"); + font-weight: 700; +} +@font-face { + font-family: "Craftwork Grotesk"; + src: local("Craftwork Grotesk SemiBold"), + url("../fonts/craftwork/CraftworkGrotesk-SemiBold.woff2") format("woff2"), + url("../fonts/craftwork/CraftworkGrotesk-SemiBold.woff") format("woff"), + url("../fonts/craftwork/craftwork-grotesk-semi-bold.ttf") format("ttf"); + font-weight: 600; +} +@font-face { + font-family: "Craftwork Grotesk"; + src: local("Craftwork Grotesk Medium"), + url("../fonts/craftwork/CraftworkGrotesk-Medium.woff2") format("woff2"), + url("../fonts/craftwork/CraftworkGrotesk-Medium.woff") format("woff"), + url("../fonts/craftwork/craftwork-grotesk-medium.ttf") format("ttf"); + font-weight: 500; +} +@font-face { + font-family: "Craftwork Grotesk"; + src: local("Craftwork Grotesk Regular"), + url("../fonts/craftwork/CraftworkGrotesk-Regular.woff2") format("woff2"), + url("../fonts/craftwork/CraftworkGrotesk-Regular.woff") format("woff"), + url("../fonts/craftwork/craftwork-grotesk-regular.ttf") format("ttf"); font-weight: 400; } @font-face { - font-family: "Craftwork Grotest"; - src: url('../fonts/Craftwork_Grotesk_Trial/CraftworkGrotesk-Medium.ttf'); - font-weight: 500; + font-family: "Abel"; + src: url('../fonts/Abel/Abel-Regular.ttf'); + font-weight: 400; } + +/* din 2014 */ @font-face { - font-family: "Craftwork Grotest"; - src: url('../fonts/Craftwork_Grotesk_Trial/CraftworkGrotesk-SemiBold.ttf'); + font-family: "DIN 2014 Rounded"; + src: local("DIN 2014 Rounded Demi"), + url("../fonts/din-2014/din-2014-rounded-demi.woff2") format("woff2"), + url("../fonts/din-2014/din-2014-rounded-demi.woff") format("woff"), + url("../fonts/din-2014/din-2014-rounded-demi.ttf") format("ttf"); font-weight: 600; } - @font-face { - font-family: "Craftwork Grotest"; - src: url('../fonts/Craftwork_Grotesk_Trial/CraftworkGrotesk-Bold.ttf'); - font-weight: 700; + font-family: "DIN 2014 Rounded"; + src: local("DIN 2014 Rounded Regular"), + url("../fonts/din-2014/din-2014-rounded-regular.woff2") format("woff2"), + url("../fonts/din-2014/din-2014-rounded-regular.woff") format("woff"), + url("../fonts/din-2014/din-2014-rounded-regular.ttf") format("ttf"); + font-weight: 400; } +/* din 2014 */ +/* roboto */ @font-face { - font-family: "Abel"; - src: url('../fonts/Abel/Abel-Regular.ttf'); + font-family: "Roboto"; + src: local("Roboto Medium"), + url("../fonts/roboto/Roboto-Medium.woff2") format("woff2"), + url("../fonts/roboto/Roboto-Medium.woff") format("woff"), + url("../fonts/roboto/roboto-medium.ttf") format("ttf"); + font-weight: 500; +} +@font-face { + font-family: "Roboto"; + src: local("Roboto Regular"), + url("../fonts/roboto/Roboto-Regular.woff2") format("woff2"), + url("../fonts/roboto/Roboto-Regular.woff") format("woff"), + url("../fonts/roboto/roboto-medium.ttf") format("ttf"); font-weight: 400; } +/* roboto */ :root { /* Colors */ @@ -36,7 +84,9 @@ --accent-3: linear-gradient(6deg, rgb(244, 66, 66) 7.584%,rgb(86, 158, 240) 72.371%); --linear: linear-gradient(-7.39deg, rgb(244, 241, 240) 23.643%,rgba(244, 241, 240, 0.3) 59.827%); --btn-bg: radial-gradient(100% 174.56% at 100% 0%, #7AD9E7 0%, #7EE7E1 25%, #B5E4B4 80%, #D7EEAA 100%); - + --font-family: "Craftwork Grotesk", sans-serif; + --second-family: "DIN 2014 Rounded", sans-serif; + --third-family: "Roboto", sans-serif; --main_white: #FFFFFF; --creme-white: #F4F1F0; @@ -56,7 +106,6 @@ /* Fonts */ --font-craftwork: 'Craftwork Grotest', sans-serif; --font-abel: 'Abel', serif; - --text-dark: #2b2b3b; --text-red: #fa0505; --text-green: #2ED15D; @@ -70,8 +119,22 @@ --gradient-blue: radial-gradient(346.57% 244.17% at 149.73% -58.39%, rgb(15, 88, 129) 0%, rgb(30, 164, 156) 51.21689438819885%, rgb(118, 206, 117) 80.70731163024902%, rgb(236, 243, 159) 91.14583134651184%); --gradient-turquoise: radial-gradient(346.57% 244.17% at 149.73% -58.39%, rgb(117, 196, 240) 0%, rgb(126, 231, 225) 51.21689438819885%, rgb(181, 228, 180) 80.70731163024902%, rgb(237, 244, 164) 91.14583134651184%); --gradient-red: linear-gradient(22deg, #f44242 0%, #569ef0 100%); + --text-white: #fff; + --text-black: #121212; + --text-grey: #999; + --text-3: #333; + --text-6: #666; + --text-9: #999; + + + + } + + + + body { background: var(--radial); font-family: var(--font-craftwork); @@ -297,7 +360,8 @@ textarea{ .form-row { display: flex; - gap: 10px; + gap: 2px; + flex-direction: column; } .full-width { @@ -308,16 +372,6 @@ textarea{ width: 100%; max-width: 380px; } - - .modal-offer input, textarea { - width: 100%!important; - padding: 12px 15px!important; - border: none!important; - border-radius: 20px!important; - font-size: 16px!important; - background-color: white!important; - } - /* Контейнер для текстового поля и изображения автора */ .message-container { position: relative; @@ -403,3 +457,1337 @@ textarea{ margin: 0 auto; max-width: 1600px; } + + + + +/* modal */ +.modal{ + position: fixed; + top: 0; + left: 0; + + padding: 20px; + + width: 100%; + height: 100%; + + background: rgba(0, 0, 0, 0.25); + + z-index: 200; + + opacity: 0; + transition: opacity .2s ease-out; + pointer-events: none; + + display: flex; + justify-content: center; + align-items: center; + + overflow-y: auto; +} +.modal.active{ + opacity: 1; + pointer-events: auto; +} +.modal__notification{} +.form__button-mobile{ + display: none; +} +.modal__aside{ + position: fixed; + top: 0; + right: 0; + + width: 0; + height: 100%; + + overflow: hidden; + transition: width .4s ease-out; +} +.modal__item{ + height: 100%; + overflow: auto; + padding: 24px; + + background: var(--background-white); + + position: relative; + + display: none; + + filter: blur(10px); + transition: filter .2s ease-out; +} +.modal__item--no-title{ + padding-top: 72px; +} +.modal__item.active{ + display: flex; + flex-direction: column; + justify-content: space-between; +} +.modal__close{ + position: absolute; + top: 32px; + right: 24px; + + width: 24px; + height: 24px; + + border: none; + background: none; +} +.modal__header{} +.modal__title{ + padding-right: 48px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 36px; + line-height: 111%; + text-transform: uppercase; + color: var(--text-black); +} +.modal__small-title{ + font-family: var(--font-family); + font-weight: 700; + font-size: 24px; + line-height: 100%; + text-transform: uppercase; + color: var(--text-black); +} +.modal__text{ + margin-top: 16px; + + padding-right: 10px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-0); +} +.modal__form-sub{ + margin-top: 48px; +} +.modal-form-sub__submit{ + margin-top: 64px; +} +.modal__block-button{ + margin-top: 24px; +} +.modal__button{ + margin-top: 16px; +} +.modal__button:first-child{ + margin-top: 0; +} +.modal__content{ + margin-top: 24px; +} +.modal__filter{ + width: 400px; +} +.modal__footer{ + border-top: 1px solid var(--text-6); + padding-top: 23px; +} +.modal__block-price{ + display: flex; + justify-content: space-between; + align-items: center; +} +.modal-block-price__title{ + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.modal-block-price__price{ + font-family: var(--font-family); + font-weight: 700; + font-size: 24px; + line-height: 100%; + text-transform: uppercase; + text-align: right; + color: var(--text-black); +} +.modal__basket{ + width: 600px; +} +.modal__to-know, +.modal__to-know-submit{ + width: 412px; +} + +.modal-basket__item{ + padding-top: 23px; + padding-right: 15px; + padding-bottom: 24px; + + display: flex; + + border-top: 1px solid var(--background-grey); + + position: relative; +} +.modal-basket__item::before{ + content: ''; + + position: absolute; + top: 24px; + right: 6px; + + width: 24px; + aspect-ratio: 1; + + background-image: url(../img/svg/main/basket.svg); + background-repeat: no-repeat; + background-position: center; + + cursor: pointer; + + transition: opacity .2s ease-out; +} +.modal-basket__item:hover .modal-basket__item::before{ + opacity: .8; +} +.modal-basket__item--return{ + padding-right: 5px; + + display: flex; + justify-content: space-between; + align-items: center; +} +.modal-basket__item--return .modal-basket-item__title{ + padding-right: 10px; +} +.modal-basket__item--return::before{ + display: none; +} +.modal-basket-item__return{ + border-radius: 20px; + padding: 4px 24px; + + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + color: var(--text-white); + + background: var(--background-black); + + border: none; +} +.modal-basket-item__block-image{ + width: 128px; + aspect-ratio: 1; + + display: flex; + justify-content: center; + align-items: center; +} +.modal-basket-item__image{ + width: 96px; + aspect-ratio: 1; + + object-fit: contain; +} + +.modal-basket-item__block-image img{ + height: auto; +} +.modal-basket-item__content{ + margin-left: 16px; + width: 100%; +} +.modal-basket-item__title{ + padding-right: 40px; + + font-family: var(--font-family); + font-weight: 500; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.modal-basket-item__sub-title{ + margin-top: 8px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 12px; + line-height: 133%; + color: var(--text-black); +} +.modal-basket-item__control{ + margin-top: 24px; + + display: flex; + justify-content: space-between; + align-items: center; +} +.modal-basket-item__price{ + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + text-align: right; + color: var(--text-black); +} +.modal__basket .modal__header{ + height: calc(100% - 92px); + margin-bottom: -36px; +} +.modal__basket .modal__content{ + height: calc(100% - 100px); + overflow-x: hidden; + +} +.modal__basket .modal__content::-webkit-scrollbar { + width: 7px; + background-color: #f9f9fd; +} +.modal__basket .modal__content::-webkit-scrollbar-thumb { + background-color: var(--background-black); + border-radius: 2px; +} + +.modal-form{ + margin: auto; + + width: 600px; + + padding: 24px; + + border-radius: 20px; + + position: relative; + + display: none; +} +.modal-form.active{ + display: block; +} +.modal-form--white{ + border: 1px solid var(--background-black); + background: var(--background-white); +} +.modal-form--green-gradient{ + background: var(--gradient-blue); +} +.modal-form--width-584{ + width: 584px; +} +.modal-form--cdek{ + width: 836px; +} +.modal-form__close{ + position: absolute; + top: 24px; + right: 24px; + + width: 24px; + aspect-ratio: 1; + + border: none; + background: none; + background-image: url(../img/svg/main/black-x.svg); + background-repeat: no-repeat; + background-size: 24px; + background-position: center; + + transition: opacity .2s ease-out; + + z-index: 10; +} +.modal-form__close--white{ + background-image: url(../img/svg/main/white-x.svg); +} +.modal-form__close:hover{ + opacity: .8; +} +.modal-form__button-close{} +.modal-form__title{ + padding-right: 50px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 26px; + line-height: 123%; + text-transform: uppercase; + color: var(--text-dark); +} +.modal-form__text--center{ + text-align: center; +} +.modal-form__text--center-pc{ + text-align: center; +} +.modal-form__title--green-gradient{ + background: var(--gradient-blue); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} +.modal-form__title--white{ + color: var(--text-white); +} +.modal-form__element{ + margin-top: 24px; +} +.modal-form__element--center{ + display: flex; + justify-content: center; +} +.modal-form__element--top-40{ + margin-top: 40px; +} +.modal-form__text{ + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-black); +} +.modal-form__text--weight-500{ + font-weight: 500; +} +.modal-form__text--white{ + color: var(--text-white); +} +.modal-form__img{ + width: 100%; + height: 360px; + + object-fit: contain; +} +.modal-form__content{ + margin-top: 40px; +} +.modal-form-content__line{ + margin-top: 24px; +} +.modal-form-content__line:first-child{ + margin-top: 0; +} +.modal-form-content__line--two{ + display: flex; + justify-content: space-between; +} +.modal-form-content__line--two-mobile{ + display: flex; + justify-content: space-between; +} +.modal-form-content__line--two-mobile .modal-form-content-line__element{ + width: calc(50% - 12px); +} +.modal-form-content-line__element{ + position: relative; +} +.modal-form-content-line__element--arrow::after{ + content: ''; + + position: absolute; + right: 16px; + bottom: 16px; + + width: 16px; + height: 16px; + + background-image: url(../img/svg/main/arrow-right-input.svg); + + pointer-events: none; +} +.modal-form-content__line--two .modal-form-content-line__element{ + width: calc(50% - 12px); +} +.modal-form-content__line--three{ + display: flex; +} +.modal-form-content__line--three .modal-form-content-line__element:nth-child(1){ + width: 85px; + + flex-shrink: 0; +} +.modal-form-content__line--three .modal-form-content-line__element:nth-child(2){ + margin-left: 8px; + + width: 100%; +} +.modal-form-content__line--three .modal-form-content-line__element:nth-child(3){ + margin-left: 8px; + + width: 85px; + + flex-shrink: 0; +} +.modal-form-content__line--margin-top-16{ + margin-top: 16px; +} +.modal-form__buttons{ + margin-top: 32px; +} +.modal-form__buttons--two{ + display: flex; + justify-content: space-between; + align-items: center; +} + +.modal-form__buttons--two button, +.modal-form__buttons--two input{ + width: calc(50% - 20px); +} +.modal-map{ + margin: auto; + + width: 1105px; + + display: none; + + border-radius: 24px; + border: none; +} +.modal-map.active{ + display: flex; +} +.modal-map__left{ + width: 600px; + + padding: 24px; + + position: relative; +} +.modal-map__control{ + margin: 38px -12px -12px -12px; + + display: flex; +} +.modal-map__control--delivery{ + margin-top: 12px; +} +.modal-map-control__item{ + margin: 12px; + + padding: 2px; + + width: calc(50% - 24px); + + background: var(--background-9); + border-radius: 20px; + border: none; +} +.modal-map-control__item.active{ + background: var(--gradient-blue); +} +.modal-map-control__item.active .form-input-radio__circle::before{ + content: ''; + position: absolute; + top: 4px; + left: 4px; + width: 12px; + aspect-ratio: 1; + border-radius: 50%; + background: var(--gradient-blue); +} +.modal-map-control-item__content{ + padding: 14px; + + border-radius: 18px; + + background: var(--background-white); +} +.modal-map-control-item__header{ + display: flex; + align-items: center; +} +.modal-map-control-item__circle{ + padding: 2px; + width: 20px; + aspect-ratio: 1; + border-radius: 50%; + background: var(--background-9); + position: relative; +} +.modal-map-control-item__input{ + display: none; +} +.modal-map-control-item-circle__content{ + width: 16px; + aspect-ratio: 1; + border-radius: 50%; + background: var(--background-white); +} +.modal-map-control__item.active .modal-map-control-item__circle{ + background: var(--gradient-blue); +} +.modal-map-control__item.active .modal-map-control-item__circle::before{ + content: ''; + position: absolute; + top: 4px; + left: 4px; + width: 12px; + aspect-ratio: 1; + border-radius: 50%; + background: var(--gradient-blue); +} +.modal-map-control-item__title{ + margin-left: 8px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-dark); +} +.modal-map-control-item__description{ + margin-top: 16px; +} +.modal-map-control-item__time{ + font-family: var(--font-family); + font-weight: 500; + font-size: 16px; + line-height: 125%; + color: var(--text-black); + + text-align: start; +} +.modal-map-control-item__price{ + margin-top: 8px; + + font-family: var(--font-family); + font-weight: 700; + font-size: 12px; + line-height: 133%; + color: var(--text-6); + + text-align: start; +} +.modal-map__form{ + margin-top: 24px; +} +.modal-map-form__hidden{ + +} +.modal-map-form__button{ + margin-top: 83px; +} +.modal-map-form__sub-button{ + display: none; +} +.modal-map__right{ + padding: 16px 0px 16px 16px; +} +.modal-map__map{ + border: 2px solid var(--background-9); + border-radius: 16px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.modal-map__map iframe{ + height: 650px; +} +.modal__age{ + +} +.modal__age > div{ + display: none; +} +.modal__age > div.active{ + display: flex; +} +/* modal */ + +/* 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 */ + +/* radio */ +.radio{ + display: flex; + align-items: center; +} +.radio__input{ + width: 18px; + aspect-ratio: 1; + + accent-color: var(--background-black); + + cursor: pointer; +} +.radio__label{ + padding-left: 8px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-dark); + + cursor: pointer; +} +/* radio */ + +.added_to_cart { + display: none!important; +} + +@keyframes slidein { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +.remove-item{ + position: absolute; + top: 0; + right: 0; +} + +.modal-basket-item__content{ + position: relative; +} + + +/* Индикатор загрузки для корзины */ +.modal-basket__loading { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(255, 255, 255, 0.8); + display: none; + justify-content: center; + align-items: center; + z-index: 10; + border-radius: 20px; +} + +.modal__item.loading .modal-basket__loading { + display: flex; +} + +.modal-basket__loader { + width: 48px; + height: 48px; + border: 5px solid var(--background-grey); + border-top: 5px solid var(--background-black); + border-radius: 50%; + animation: spin 1s linear infinite; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +/* Блок кнопок корзины (адаптированный под ваши стили) */ +.modal-basket__actions { + display: flex; + justify-content: space-between; + gap: 16px; + margin-top: 24px; +} + +.modal-basket__button { + flex: 1; + padding: 16px 24px; + border-radius: 20px; + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + text-align: center; + cursor: pointer; + transition: all 0.2s ease-out; +} + +.modal-basket__button--continue { + background: var(--background-white); + border: 1px solid var(--background-black); + color: var(--text-black); +} + +.modal-basket__button--checkout { + background: var(--background-black); + border: 1px solid var(--background-black); + color: var(--text-white); +} + +.modal-basket__button:hover { + opacity: 0.9; + transform: translateY(-2px); +} + + +/* counter */ +.counter{ + display: flex; + align-items: center; +} +.counter__input{ + width: 48px; + + font-family: var(--font-family); + font-weight: 600; + font-size: 20px; + line-height: 120%; + text-align: center; + color: var(--text-black); + + pointer-events: none; + + background: none; + border: none; +} +.counter__button{ + width: 48px; + height: 48px; + + display: flex; + justify-content: center; + align-items: center; + + border: 1px solid var(--text-3); + border-radius: 24px; + + background: var(--background-white); + + transition: opacity .2s ease-out; +} +.counter__button:hover{ + opacity: .8; +} +.counter--small{ + +} +.counter--small .counter__button{ + width: 32px; + height: 32px; +} +.counter--small{ + +} +/* counter */ + + +/* 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%; + text-align: center; +} +.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%; */ + + padding: 12px 24px 7px 24px; + + display: flex; + justify-content: center; + + border: none; + + transition: opacity .2s ease-out; + text-decoration: none; +} +.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); +} + +.wc-forward { + width: 100%; + padding: 0.5rem 0; + text-align: center; +} +/* button */ + + + .woocommerce form .form-row .input-text { + display: flex; + flex-direction: row; + align-items: center; + padding: 12px 16px; + gap: 8px; + width: 100%; + height: 48px; + background: #FFFFFF; + border: 1px solid #999999; + border-radius: 20px; + margin-top: 6px; + color: #000 + } + + .woocommerce form .form-row textarea.input-text{ + height: 150px; + } + + .woocommerce-button{ + padding: 20px; + margin-top: 20px; + } + + .label__title, .form-row label { + font-family: var(--font-family); + font-weight: 700; + font-size: 16px; + line-height: 125%; + color: var(--text-3); +} + +.shop_table{ + width: 100%; +} + + +.form-input__error{ + margin-top: 4px; + + font-family: var(--font-family); + font-weight: 500; + font-size: 12px; + line-height: 133%; + + color: #f60909; + + display: none; + + position: relative; +} +.form-input__error--absolute{ + position: absolute; + bottom: -19.95px; + left: 0; + + width: 100%; +} +.form__input.error, .form-input__phone.error{ + border-color: #f60909; +} +.form__input.error + .form-input__error{ + display: block; +} +.form-input__phone.error .form-input__error{ + display: block; +} +.form-input-phone__input.error + .form-input__error--absolute::before{ + content: ''; + + position: absolute; + top: -53px; + left: -1px; + + width: 100%; + height: 48px; + + border-radius: 20px; + border: 1px solid #f60909; +} + + + +.form__input{ + width: 100%; + + border-radius: 20px; + padding: 12px 16px; + border: 1px solid var(--text-black); + + background: var(--background-white); + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + + color: var(--text-black); +} +.form__input::placeholder{ + color: var(--text-grey); +} +.form__input--textarea{ + height: 96px; + resize: none; +} +.form__input--center{ + text-align: center; +} +.form__button{ + width: 100%; + + padding: 12px 24px; + + font-family: var(--font-family); + font-weight: 400; + font-size: 20px; + line-height: 120%; + color: var(--text-white); + + border-radius: 16px; + border: none; + background: var(--background-black); + + cursor: pointer; + + transition: background-color .2s ease-out; +} +.form__button:hover{ + opacity: .8; +} + + +.modalProfile{ + position: fixed; + top: 0; + left: 0; + + padding: 20px; + + width: 100vw; + height: 100vh; + + background: rgba(0, 0, 0, 0.25); + + z-index: 200; + + opacity: 0; + transition: opacity .2s ease-out; + pointer-events: none; + + display: flex; + justify-content: center; + align-items: center; + + overflow-y: auto; + padding-top: 30px; + padding-bottom: 30px; +} +.modalProfile.active{ + opacity: 1; + pointer-events: auto; +} + +.popup-wrap{ + width: 100%; + height: 100%; + display: flex; +} + +.modal-form{ + margin: auto; +} + + +.label-name{ + display: block; + margin-bottom: 6px; +} + +.woocommerce-billing-fields__field-wrapper{ + margin-top: 2rem; +} + +.form__input--textarea{ + height: 96px; + resize: none; +} + +.remote-control__item { + display: none; +} + +.remote-control__item.active { + display: block; +} + +.order-contacts__delivery{ + padding-bottom: 3rem; +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-normalize.css b/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-normalize.css index 7274e0c..ccd51b7 100644 --- a/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-normalize.css +++ b/wp-content/themes/cosmopet/modules/layout/assets/css/gp-style-normalize.css @@ -16,10 +16,6 @@ img { max-width: 100%; } -span, -label { - display: inline-block; -} html { scroll-behavior: smooth; @@ -69,4 +65,12 @@ input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; -moz-appearance: none; margin: 0; +} + +main.wrapper{ + padding-top: 40px; +} + +.checkout-inline-error-message{ + display: none; } \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Bold.woff b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Bold.woff similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Bold.woff rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Bold.woff diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Bold.woff2 b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Bold.woff2 similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Bold.woff2 rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Bold.woff2 diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Medium.woff b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Medium.woff similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Medium.woff rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Medium.woff diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Medium.woff2 b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Medium.woff2 similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Medium.woff2 rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Medium.woff2 diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Regular.woff b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Regular.woff similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Regular.woff rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Regular.woff diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Regular.woff2 b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Regular.woff2 similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-Regular.woff2 rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-Regular.woff2 diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-SemiBold.woff b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-SemiBold.woff similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-SemiBold.woff rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-SemiBold.woff diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-SemiBold.woff2 b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-SemiBold.woff2 similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/CraftworkGrotesk-SemiBold.woff2 rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/CraftworkGrotesk-SemiBold.woff2 diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/craftwork-grotesk-bold.ttf b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/craftwork-grotesk-bold.ttf similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/craftwork-grotesk-bold.ttf rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/craftwork-grotesk-bold.ttf diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/craftwork-grotesk-medium.ttf b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/craftwork-grotesk-medium.ttf similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/craftwork-grotesk-medium.ttf rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/craftwork-grotesk-medium.ttf diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/craftwork-grotesk-regular.ttf b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/craftwork-grotesk-regular.ttf similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/craftwork-grotesk-regular.ttf rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/craftwork-grotesk-regular.ttf diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/craftwork-grotesk-semi-bold.ttf b/wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/craftwork-grotesk-semi-bold.ttf similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/craftwork/craftwork-grotesk-semi-bold.ttf rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/craftwork/craftwork-grotesk-semi-bold.ttf diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-demi.ttf b/wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-demi.ttf similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-demi.ttf rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-demi.ttf diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-demi.woff b/wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-demi.woff similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-demi.woff rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-demi.woff diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-demi.woff2 b/wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-demi.woff2 similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-demi.woff2 rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-demi.woff2 diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-regular.ttf b/wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-regular.ttf similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-regular.ttf rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-regular.ttf diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-regular.woff b/wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-regular.woff similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-regular.woff rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-regular.woff diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-regular.woff2 b/wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-regular.woff2 similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/din-2014/din-2014-rounded-regular.woff2 rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/din-2014/din-2014-rounded-regular.woff2 diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/Roboto-Medium.woff b/wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/Roboto-Medium.woff similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/Roboto-Medium.woff rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/Roboto-Medium.woff diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/Roboto-Medium.woff2 b/wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/Roboto-Medium.woff2 similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/Roboto-Medium.woff2 rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/Roboto-Medium.woff2 diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/Roboto-Regular.woff b/wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/Roboto-Regular.woff similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/Roboto-Regular.woff rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/Roboto-Regular.woff diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/Roboto-Regular.woff2 b/wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/Roboto-Regular.woff2 similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/Roboto-Regular.woff2 rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/Roboto-Regular.woff2 diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/roboto-medium.ttf b/wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/roboto-medium.ttf similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/roboto-medium.ttf rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/roboto-medium.ttf diff --git a/wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/roboto-regular.ttf b/wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/roboto-regular.ttf similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/fonts/roboto/roboto-regular.ttf rename to wp-content/themes/cosmopet/modules/layout/assets/fonts/roboto/roboto-regular.ttf diff --git a/wp-content/themes/cosmopet/modules/layout/assets/js/_gp-function.js b/wp-content/themes/cosmopet/modules/layout/assets/js/_gp-function.js new file mode 100644 index 0000000..d76ad0b --- /dev/null +++ b/wp-content/themes/cosmopet/modules/layout/assets/js/_gp-function.js @@ -0,0 +1,166 @@ +// 'use strict'; + +// // Глобальные переменные для управления состоянием +// let currentModalContent = null; + +// function modalOpen(buttonElement, contentElement) { +// const modal = document.querySelector('.modal'); +// const aside = document.querySelector('.modal__aside'); +// const elements = document.querySelectorAll(buttonElement); +// const device = window.screen.width; + +// // Обработчик закрытия по клику на оверлей +// modal.addEventListener('click', function(e) { +// if (e.target === modal && currentModalContent) { +// closeModal(currentModalContent); +// } +// }); + +// // Обработчик закрытия по Escape +// document.addEventListener('keydown', function(e) { +// if (e.key === 'Escape' && currentModalContent) { +// closeModal(currentModalContent); +// } +// }); + +// elements.forEach(e => { +// e.addEventListener('click', function() { +// const content = document.querySelector(contentElement); +// currentModalContent = content; + +// // Сброс стилей перед открытием +// resetModalStyles(); + +// modal.classList.add('active'); +// content.classList.add('active'); + +// const width = content.clientWidth; + +// setTimeout(() => { +// if (device <= 720) { +// aside.style.width = `${device}px`; +// } else { +// aside.style.width = `${width}px`; +// } +// content.style.opacity = '1'; +// content.style.filter = 'blur(0)'; +// }, 10); +// }); +// }); +// } + +// function modalClose(buttonElement) { +// const elements = document.querySelectorAll(buttonElement); + +// elements.forEach(e => { +// e.addEventListener('click', function() { +// if (currentModalContent) { +// closeModal(currentModalContent); +// } +// }); +// }); +// } + +// function closeModal(contentElement) { +// const modal = document.querySelector('.modal'); +// const aside = document.querySelector('.modal__aside'); + +// aside.style.width = '0'; +// contentElement.style.opacity = '0'; +// contentElement.style.filter = 'blur(10px)'; + +// setTimeout(() => { +// contentElement.classList.remove('active'); +// modal.classList.remove('active'); +// currentModalContent = null; +// }, 300); +// } + +// function resetModalStyles() { +// const allModals = document.querySelectorAll('.modal__item'); + +// allModals.forEach(modal => { +// modal.style.opacity = ''; +// modal.style.filter = ''; +// modal.classList.remove('active'); +// }); + +// document.querySelector('.modal__aside').style.width = ''; +// } +// function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement, close) { +// let elements = document.querySelectorAll(mainElement); + +// elements.forEach(e => { +// let thisMainElement = e, +// thisButtonElement = e.querySelector(buttonElement), +// thisHeightElement = e.querySelector(heightElement), +// thisContentElement = e.querySelector(contentElement); + +// thisButtonElement.onclick = function (e) { +// let height = thisHeightElement.clientHeight; + +// if (close == true && !thisMainElement.classList.contains('active')) { +// elements.forEach(e => { +// if (e.classList.contains('active')) { +// e.classList.remove('active'); +// e.querySelector(contentElement).style.height = null +// } +// }) +// } + +// if (!thisMainElement.classList.contains('active')) { +// thisContentElement.style.height = `${height}px`; +// thisMainElement.classList.add('active'); +// }else{ +// thisContentElement.style.height = null; +// thisMainElement.classList.remove('active'); +// } +// } + +// }); +// } + +// function toggleHeader(button, content, blockheight, removeBlock, removeClass) { +// let thisButton = document.querySelector(button), +// thisContent = document.querySelector(content), +// thisRemoveBlock = document.querySelector(removeBlock) || '', +// thisBlockheight = document.querySelector(blockheight); + +// thisButton.onclick = function () { +// let height = thisBlockheight.clientHeight; + +// if (!thisContent.classList .contains('open')) { +// thisContent.style.height = `${height}px`; +// thisContent.classList .add('open'); + +// if (removeBlock) { +// thisRemoveBlock.classList.remove(removeClass); +// } +// }else{ +// thisContent.style.height = null; +// thisContent.classList .remove('open'); + +// if (removeBlock) { +// if (window.scrollY <= 25) { +// thisRemoveBlock.classList.add(removeClass); +// } +// } +// } +// } +// } + +// function modalFormOpen(formOrNotification) { +// let buttons = document.querySelectorAll(formOrNotification), +// modal = document.querySelector('.modal'); + +// buttons.forEach(button => { +// button.onclick = function (eventButton) { +// let classOpenForm = button.dataset.form, +// form = modal.querySelector(`.${classOpenForm}`); + +// form.classList.add('active'); +// modal.classList.add('active'); +// } +// }) +// } +// // function \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/layout/assets/js/gp-cabinet.js b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-cabinet.js new file mode 100644 index 0000000..1b485f7 --- /dev/null +++ b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-cabinet.js @@ -0,0 +1,67 @@ +// 'use strict'; + +// import * as fun from './_gp-function.js'; + +// let widthPhoneCabinet = 1200; + +// fun.toggleOpenX('.cabinet-card__order', '.cabinet-card-order__open-detail', '.cabinet-card-order__detail', '.cabinet-card-order__block-detail'); +// fun.modalFormOpen('.form-open'); + +// fun.closeModalForm('.modal-form__close'); +// fun.closeModalForm('.modal-form__button-close'); + +// controlCabinet('.cabinet-control__button', '.cabinet', widthPhoneCabinet); + +// function controlCabinet(buttons, main, minWidth){ +// let thisWidth = window.innerWidth; +// let thisMain = document.querySelector(main); + +// let thisButtons = document.querySelectorAll(buttons); + +// thisButtons.forEach(e => { +// e.onclick = function (element){ +// let thisContent = document.querySelector(`.cabinet__${e.dataset.cabinet}`); +// let newHeight = thisContent.clientHeight + 48; +// let thisButton = element.target; + +// thisMain.style.height = `${newHeight}px` + +// if (!thisContent.classList.contains('active')) { +// thisMain.querySelector('.active').classList.remove('active'); +// thisContent.classList.add('active'); + +// setTimeout(() => { +// thisMain.style.height = 'auto'; + +// if (thisMain.querySelector('.hide')) { +// thisMain.querySelector('.hide').classList.remove('hide'); +// } + +// thisMain.querySelector('.active').classList.add('hide'); +// }, 200); +// } + +// thisButtons.forEach(e => { +// e.classList.remove('active'); +// }) +// thisButton.classList.add('active'); +// } +// }) + +// } + +// let modal = document.querySelector('.modal'); +// modal.onclick = function (eventModal) { +// let thisTarget = eventModal.target; + +// if (thisTarget.classList.contains('modal')) { +// thisTarget.classList.remove('active'); + +// if (!thisTarget.querySelector('.modal-map.active')) { +// thisTarget.querySelector('.modal-form.active').classList.remove('active'); +// }else{ +// thisTarget.querySelector('.modal-map.active').classList.remove('active'); +// } +// } +// } + diff --git a/wp-content/themes/cosmopet/woocommerce/assets/js/gp-form.js b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-form.js similarity index 100% rename from wp-content/themes/cosmopet/woocommerce/assets/js/gp-form.js rename to wp-content/themes/cosmopet/modules/layout/assets/js/gp-form.js diff --git a/wp-content/themes/cosmopet/woocommerce/assets/js/gp-main.js b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-main.js similarity index 75% rename from wp-content/themes/cosmopet/woocommerce/assets/js/gp-main.js rename to wp-content/themes/cosmopet/modules/layout/assets/js/gp-main.js index 477626e..2338e28 100644 --- a/wp-content/themes/cosmopet/woocommerce/assets/js/gp-main.js +++ b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-main.js @@ -140,19 +140,8 @@ let modal = document.querySelector('.modal'); modal.onclick = function (event) { let target = event.target; - if (target.classList.contains('modal')) { - let aside = target.querySelector('.modal__aside'), - modalItem = target.querySelector('.modal__item.active'), - body = document.querySelector('body'); - - aside.style.width = '0px'; - body.classList.remove('overflow-hidden'); - setTimeout(() => { - modalItem.style.cssText = ''; - modalItem.classList.remove('active'); - target.classList.remove('active'); - }, 300); + closeAllModals(); } } @@ -190,100 +179,7 @@ radioButtons.forEach(radioBlock => { }) // radio-button -// overlay -// let products = document.querySelectorAll('.product__item'); - -// products.forEach(productItem => { -// let button = productItem.querySelector('.open-overlay'), -// overlay = productItem.querySelector('.product-item__overlay'); - - -// if (button) { -// button.onclick = function (e) { -// document.querySelectorAll('.product__item').forEach(e => { -// if (e.classList.contains('active')) { -// e.classList.remove('active'); -// } -// }); -// document.querySelectorAll('.product-item__overlay').forEach(e => { -// if (e.classList.contains('active')) { -// e.classList.remove('active'); -// } -// }); - -// productItem.classList.toggle('active'); -// overlay.classList.toggle('active'); -// } -// } - -// }) -// overlay - - -// select -// toggleOpenX('.select', '.select__state' , '.state__content', '.state__block', true); - -// let selects = document.querySelectorAll('.select'); - -// selects.forEach(select => { -// let state = select.querySelector('.select__state'), -// content = select.querySelector('.state__block'), -// buttons = select.querySelectorAll('.state__button'); - -// buttons.forEach(e => { -// let button = e; -// e.onclick = function (event) { -// event.preventDefault(); - -// buttons.forEach(element => { -// if (element.classList.contains('active')) { -// element.classList.remove('active'); -// } -// }) - -// let text = e.textContent.trim(); -// state.value = text; - -// button.classList.add('active'); -// content.style.height = 0; -// select.classList.remove('active'); -// } -// }) -// }) - - -// select - -// counter -// let counters = document.querySelectorAll('.counter'); - -// counters.forEach(e => { -// let minus = e.querySelector('.minus'), -// plus = e.querySelector('.plus'), -// input = e.querySelector('.counter__input'); - -// minus.onclick = function (e) { -// e.preventDefault(); - -// let number = input.value; - -// if (number >= 2){ -// input.value = Number(number) - 1; -// } -// } - -// plus.onclick = function (e) { -// e.preventDefault(); - -// let number = input.value; - -// if (number <= 99) { -// input.value = Number(number) + 1; -// } -// } -// }) -// counter // checkbox let checkbox = document.querySelectorAll('.checkbox'); @@ -336,35 +232,37 @@ function modalOpen(buttonElement, contentElement){ }) } -function modalClose(buttonElement) { + +function closeAllModals() { let modal = document.querySelector('.modal'), aside = document.querySelector('.modal__aside'), asideItems = document.querySelectorAll('.modal__item'), - elements = document.querySelectorAll(buttonElement), body = document.querySelector('body'); - elements.forEach(e => { - e.onclick = function () { - body.classList.remove('overflow-hidden'); - aside.style.width = '0px'; - - asideItems.forEach(e => { - if (e.classList.contains('active')) { - e.style.filter = 'blur(10px)'; - } - }); + aside.style.width = '0px'; + body.classList.remove('overflow-hidden'); + + asideItems.forEach(item => { + if (item.classList.contains('active')) { + item.style.opacity = 0; + item.style.filter = 'blur(10px)'; + } + }); - setTimeout(() => { - asideItems.forEach(e => { - if (e.classList.contains('active')) { - e.classList.remove('active'); - } - }); + setTimeout(() => { + asideItems.forEach(item => { + item.classList.remove('active'); + }); + modal.classList.remove('active'); + }, 300); +} - modal.classList.remove('active'); - }, 300); - } - }) + +function modalClose(buttonElement) { + let elements = document.querySelectorAll(buttonElement); + elements.forEach(e => { + e.onclick = closeAllModals; + }); } function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement, close) { diff --git a/wp-content/themes/cosmopet/modules/layout/assets/js/gp-product.js b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-product.js new file mode 100644 index 0000000..7b90d3c --- /dev/null +++ b/wp-content/themes/cosmopet/modules/layout/assets/js/gp-product.js @@ -0,0 +1,110 @@ +// 'use strict'; + +// // slider gallery modal +// const gallery = new Swiper('.gallery__slider', { +// spaceBetween: 100, + +// pagination: { +// el: '.swiper-pagination', +// }, + +// navigation: { +// nextEl: '.swiper-button-next', +// prevEl: '.swiper-button-prev', +// }, + +// scrollbar: { +// el: '.swiper-scrollbar', +// }, +// }); + +// let paginationButtons = document.querySelectorAll('.gallery-pagination__item'); + +// paginationButtons.forEach(button => { +// let index = button.dataset.countImg; + +// button.onclick = function () { +// gallery.slideTo(index); +// } +// }) + +// // open gallery +// let detailImage= document.querySelectorAll('.detail__image'); +// detailImage.forEach(button => { +// let index = button.dataset.countImg; + +// button.onclick = function () { +// gallery.slideTo(index); + +// document.querySelector('.gallery').classList.add('active'); +// } +// }) + +// // close gallery + +// document.querySelector('.gallery__close').onclick = function () { +// document.querySelector('.gallery').classList.remove('active'); +// } +// // slider gallery modal + +// // slider gallery main phone + +// // createGalleryPhone('.detail__images', '.detail-images__wrapper', '.detail__image', 980); + +// const detailPhone = new Swiper('.detail__images-phone', { +// spaceBetween: 100, + +// pagination: { +// el: '.swiper-pagination', +// }, + +// navigation: { +// nextEl: '.swiper-button-next', +// prevEl: '.swiper-button-prev', +// }, + +// scrollbar: { +// el: '.swiper-scrollbar', +// }, +// }); + +// let detailImagesPhones = document.querySelectorAll('.detail-images-phone__image-block'); + +// detailImagesPhones.forEach(button => { +// button.onclick = function (e) { +// let index = button.dataset.countImg; + +// gallery.slideTo(index); + +// document.querySelector('.gallery').classList.add('active'); +// } +// }) + +// // slider gallery main phone + +// // detail catalog +// const detailCatalot = new Swiper('.detail__catalot', { +// // Navigation arrows +// navigation: { +// nextEl: '.detail-catalot-control__button.next', +// prevEl: '.detail-catalot-control__button.prev', +// }, +// breakpoints: { +// 1600: { +// slidesPerView: 4, +// }, +// 1200: { +// slidesPerView: 3, +// }, +// 780: { +// slidesPerView: 2, +// }, +// 100: { +// slidesPerView: 1.1, +// spaceBetween: 20 +// }, +// } + + +// }); +// // detail catalog \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/layout/module-controller.php b/wp-content/themes/cosmopet/modules/layout/module-controller.php index 3d14f53..e3a0b36 100644 --- a/wp-content/themes/cosmopet/modules/layout/module-controller.php +++ b/wp-content/themes/cosmopet/modules/layout/module-controller.php @@ -2,4 +2,5 @@ include_module('header'); +include_component('shop', 'cart'); include_module('footer'); diff --git a/wp-content/themes/cosmopet/modules/layout/module.template.twig b/wp-content/themes/cosmopet/modules/layout/module.template.twig deleted file mode 100644 index 33532d3..0000000 --- a/wp-content/themes/cosmopet/modules/layout/module.template.twig +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - {{ function('wp_head') }} - - - - - - {% if current_lang == 'en' %} - {% include 'header/module.template_ENG.twig' %} - {% elseif current_lang == 'fr' %} - {% else %} - {% include 'header/module.template_RU.twig' %} - {% endif %} - - -
- {% block content %} - {% endblock %} -
- - {% include 'footer/module.template.twig' %} - - {{ function('wp_footer') }} - - \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/popup/module.template.twig b/wp-content/themes/cosmopet/modules/popup/module.template.twig deleted file mode 100644 index 80f3776..0000000 --- a/wp-content/themes/cosmopet/modules/popup/module.template.twig +++ /dev/null @@ -1,60 +0,0 @@ -{% set current_path = template_path ~ '/modules/footer' %} - - \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/shop/components/cart/assets/js/cart.js b/wp-content/themes/cosmopet/modules/shop/components/cart/assets/js/cart.js new file mode 100644 index 0000000..bcef82e --- /dev/null +++ b/wp-content/themes/cosmopet/modules/shop/components/cart/assets/js/cart.js @@ -0,0 +1,273 @@ +jQuery(document).ready(function($) { + // Открытие/закрытие модалки + // $(document).on('click', '.cart-contents, .continue-shopping, .modal__close', function(e) { + // e.preventDefault(); + // $('#modal-basket').toggleClass('active'); + // }); + + // Обновление количества через input + $(document).on('change', '.counter__input', function() { + const key = $(this).data('key'); + const quantity = $(this).val(); + + if (quantity > 0) { + updateCart(key, quantity); + } else { + removeItem(key); + } + }); + + // Увеличение количества + $(document).on('click', '.counter__button.plus', function(e) { + e.preventDefault(); + const key = $(this).data('key'); + const input = $(this).siblings('.counter__input'); + const quantity = parseInt(input.val()) + 1; + input.val(quantity).trigger('change'); + }); + + // Уменьшение количества + $(document).on('click', '.counter__button.minus', function(e) { + e.preventDefault(); + const key = $(this).data('key'); + const input = $(this).siblings('.counter__input'); + let quantity = parseInt(input.val()) - 1; + quantity = quantity < 1 ? 1 : quantity; + input.val(quantity).trigger('change'); + }); + + $(document).on('click', '.remove-item', function() { + const key = $(this).data('key'); + removeItem(key); + }); + // Удаление товара + function formatMoney(amount) { + if (typeof woocommerce_params !== 'undefined' && woocommerce_params.currency_format) { + const format = woocommerce_params.currency_format; + return format + .replace('%1$s', woocommerce_params.currency_symbol) + .replace('%2$s', parseFloat(amount).toFixed(2)); + } + return woocommerce_params.currency_symbol + parseFloat(amount).toFixed(2); + } + + // Хранилище временно удалённых товаров + const removedItemsStorageKey = 'woocommerce_removed_items'; + + + function restoreRemovedItems() { + const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || []; + + if (removedItems.length === 0) return; + + $('#modal-basket').addClass('loading'); + + // Создаем копию массива для работы + let itemsToRemove = [...removedItems]; + + function processNextItem() { + if (itemsToRemove.length === 0) { + // Все элементы обработаны + localStorage.removeItem(removedItemsStorageKey); + updateCartFragment(); + $('#modal-basket').removeClass('loading'); + return; + } + + const element = itemsToRemove.shift(); // Берем первый элемент + + $.ajax({ + type: 'POST', + url: woocommerce_params.ajax_url, + data: { + action: 'remove_cart_item', + cart_item_key: element.key + }, + success: function(response) { + if (response.success) { + // Обновляем localStorage, удаляя только что обработанный элемент + const currentItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || []; + const updatedItems = currentItems.filter(item => item.key !== element.key); + localStorage.setItem(removedItemsStorageKey, JSON.stringify(updatedItems)); + } + // Обрабатываем следующий элемент + processNextItem(); + }, + error: function() { + // Продолжаем даже при ошибке + processNextItem(); + } + }); + } + + // Начинаем обработку + processNextItem(); +} + + // Инициализация при загрузке + restoreRemovedItems(); + + // Функция удаления товара с возможностью восстановления + function removeItem(key) { + const $item = $(`[data-key="${key}"]`); + const productId = $item.data('product_id'); + const variationId = $item.data('variation_id') || 0; + const quantity = parseInt($item.find('.counter__input').val()); + + // Сохраняем во временное хранилище + const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || []; + removedItems.push({ product_id: productId, variation_id: variationId, quantity: quantity, key: key }); + localStorage.setItem(removedItemsStorageKey, JSON.stringify(removedItems)); + + // Показываем кнопку восстановления + $item.html(` + + + `); + + // Удаляем через 5 секунд, если не восстановили + const removeTimeout = setTimeout(() => { + permanentRemoveItem(key, productId, variationId); + }, 5000); + + const product_remove_timer = setInterval(() => { + let number = Number($(`#${key}_timer`).html()) - 1 + $(`#${key}_timer`).html(number) + }, 1000); + + // Обработчик восстановления + $(document).off('click', `[data-key="${key}"] .modal-basket-item__return`).on('click', `[data-key="${key}"] .modal-basket-item__return`, function(e) { + e.preventDefault(); + clearTimeout(removeTimeout); + clearInterval(product_remove_timer); // Очищаем интервал + restoreItem(key, productId, variationId, quantity); + }); + } + + // Полное удаление товара + function permanentRemoveItem(key, productId, variationId) { + $('#modal-basket').addClass('loading'); + + $.ajax({ + type: 'POST', + url: woocommerce_params.ajax_url, + data: { + action: 'remove_cart_item', + cart_item_key: key + }, + complete: function() { + $('#modal-basket').removeClass('loading'); + }, + success: function(response) { + if (response.success) { + // Удаляем из временного хранилища + const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || []; + const updatedItems = removedItems.filter(item => + !(item.product_id === productId && item.variation_id === variationId) + ); + localStorage.setItem(removedItemsStorageKey, JSON.stringify(updatedItems)); + + updateCartFragment(); + } + } + }); + } + + // Восстановление товара + function restoreItem(key, productId, variationId, quantity) { + $('#modal-basket').addClass('loading'); + + $.ajax({ + type: 'POST', + url: woocommerce_params.ajax_url, + data: { + action: 'restore_cart_item', + product_id: productId, + variation_id: variationId, + quantity: quantity + }, + complete: function() { + $('#modal-basket').removeClass('loading'); + }, + success: function(response) { + if (response.success) { + // Удаляем из временного хранилища + const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || []; + const updatedItems = removedItems.filter(item => + !(item.product_id === productId && item.variation_id === variationId) + ); + localStorage.setItem(removedItemsStorageKey, JSON.stringify(updatedItems)); + + updateCartFragment(); + } + } + }); + } + + // Обновление корзины при добавлении товара + $(document.body).on('added_to_cart', function() { + updateCartFragment(); + }); + + // Функция обновления количества + function updateCart(key, quantity) { + $.ajax({ + type: 'POST', + url: '/wp-admin/admin-ajax.php', // Используем стандартный параметр WooCommerce + data: { + action: 'update_cart_quantity', + cart_item_key: key, + quantity: quantity + }, + beforeSend: function() { + $('#modal-basket').addClass('loading'); + }, + complete: function() { + $('#modal-basket').removeClass('loading'); + }, + success: function(response) { + if (response.success) { + updateCartFragment(); + } else { + console.error('Ошибка при обновлении корзины'); + } + }, + error: function(xhr, status, error) { + console.error('AJAX ошибка:', error); + } + }); + } + + // Обновление фрагментов корзины + function updateCartFragment() { + $.ajax({ + type: 'POST', + url: woocommerce_params.ajax_url, + data: { + action: 'get_cart_fragment' + }, + beforeSend: function() { + $('#modal-basket').addClass('loading'); + }, + complete: function() { + $('#modal-basket').removeClass('loading'); + }, + success: function(response) { + console.log(response) + if (response.success) { + $('#modal-basket-content').html(response.data.contents); + $('.modal-block-price__price').html(response.data.total); + $('.cart-count').text(response.data.count); + + + } + } + }); + } +}); \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/shop/components/cart/component-controller.php b/wp-content/themes/cosmopet/modules/shop/components/cart/component-controller.php new file mode 100644 index 0000000..bfad3cb --- /dev/null +++ b/wp-content/themes/cosmopet/modules/shop/components/cart/component-controller.php @@ -0,0 +1,8 @@ + div{ + display: none; + } + .modal__age > div.active{ + display: flex; + } + /* modal */ + + /* 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; +} +.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; +} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/modules/shop/components/checkout/assets/js/script.js b/wp-content/themes/cosmopet/modules/shop/components/checkout/assets/js/script.js new file mode 100644 index 0000000..3035f2c --- /dev/null +++ b/wp-content/themes/cosmopet/modules/shop/components/checkout/assets/js/script.js @@ -0,0 +1,161 @@ +jQuery(document).ready(function($) { + jQuery(document.body).on('updated_checkout', function() { + // Найти новые методы доставки внутри shop_table + var shippingMethodsHtml = jQuery('.woocommerce-checkout-review-order-table .woocommerce-shipping-methods').html(); + // Обновить кастомный блок + if(!shippingMethodsHtml){ + shippingMethodsHtml ='

Не удалось получить доступные методы доставки!
Укажите свой город для получения доступных методов.

' + } + jQuery('#custom-shipping-methods').html(shippingMethodsHtml); + jQuery('.order-contacts__delivery').removeClass('loading'); + + jQuery('.modal-map-control__item.active').click() + }); + + + $(document.body).on('update_checkout', function() { + jQuery('.order-contacts__delivery').addClass('loading'); + }); + + $('body').on('click', '.modal-map-control__item', function(){ + if (!$(this).hasClass('active')){ + $('#addr_inp').val('') + $('#pvz_inp').val('') + $('#billing_address_1').val('') + $('#billing_address_2').val('') + } + $('.shipping-add-info').removeClass('active') + var remote = $(this).data('remote') + $('.shipping-add-info[data-remote="' + remote + '"]').addClass('active') + }) + + jQuery('#addr_inp').on('click', function(){ + jQuery('#address_input').addClass('active') + }) + +}); + + + +jQuery(document).ready(function($) { + // Перехват отправки формы купона + $(document).on('click', 'button[name="apply_coupon"]', function(e) { + e.preventDefault(); // Останавливаем отправку основной формы + + // Отправка данных купона через AJAX + var couponCode = $('#coupon_code').val(); + + if (!couponCode) { + alert('Пожалуйста, введите код купона.'); + return; + } + + $.ajax({ + url: wc_checkout_params.ajax_url, // URL для AJAX-запроса WooCommerce + type: 'POST', + data: { + action: 'apply_coupon', + coupon_code: couponCode + }, + success: function(response) { + if (response.success) { + $(document.body).trigger('update_checkout'); + $('#promo_form').hide() + $('#promo_delete').show() + $('#promo_err').hide() + $('#coupon_code_app').val('Применен промокод: ' + couponCode) + $('#delete_coupon').data('coupon', couponCode) + } else { + $('#promo_err').show() + } + }, + error: function() { + alert('Произошла ошибка. Попробуйте ещё раз.'); + } + }); + }); + + jQuery('#pvz_inp').on('click', function(){ + jQuery('.open-pvz-btn').click() + }) + + $('#address_input input').on('change, input, keyup', function(){ + var address = $('#f_address').val() + var apart = $('#f_apartment').val() + var floor = $('#f_floor').val() + var entrance = $('#f_entrance').val() + var number_phone = $('#f_number-phone').val() + + var address_2 = '' + + if (apart){ + address_2 += ' кв ' + apart + } + if (floor){ + address_2 += ' этаж ' + floor + } + if (entrance){ + address_2 += ' подъезд ' + entrance + } + if (number_phone){ + address_2 += ' домофон ' + number_phone + } + $('#addr_inp').val(address + address_2) + $('#billing_address_1').val(address) + $('#billing_address_2').val(address_2) + }) +}); + + +jQuery(document).ready(function ($) { + $(document.body).on('checkout_error', function () { + // $('.woocommerce-error').remove(); + $('.form-input__error').removeClass('active'); + + // // Добавляем ошибки рядом с полями + $('.woocommerce-error li').each(function () { + var errorMessage = $(this).text().trim(); + var fieldKey = $(this).data('id'); // Предполагается, что ошибка содержит data-id + console.log(errorMessage) + console.log(fieldKey) + if (fieldKey) { + var errorContainer = $('#' + fieldKey + '-error'); + if (errorContainer.length) { + errorContainer.html('' + errorMessage + ''); + $('#' + fieldKey + '-error').addClass('active'); + } + } + if (errorMessage == 'phone_err' || errorMessage == 'The string supplied did not seem to be a phone number.' || errorMessage.includes('Некорректный номер телефона')){ + $('#billing_phone-error').html('Неправильно введен номер') + $('#billing_phone-error').addClass('active'); + } + if (errorMessage == 'Order pickup point not selected.' || errorMessage == 'Не выбран ПВЗ для доставки заказа.'){ + $('#pvz-error').html(errorMessage) + $('#pvz-error').addClass('active'); + } + if (errorMessage == 'adress_error'){ + $('#adr-error').html('Не указан адрес доставки') + $('#adr-error').addClass('active'); + } + if (errorMessage == 'Неверный адрес эл. почты для выставления счета'){ + $('#billing_email-error').html(errorMessage).addClass('active'); + } + if(errorMessage == 'Не выбран метод доставки. Пожалуйста перепроверьте ваш адрес или обратитесь за помощью к администрации сайта.'){ + $('#billing_city-error').html(errorMessage).addClass('active'); + } + if(errorMessage == 'Этот email уже зарегистрирован.'){ + $('#acc-error').html('Этот email уже зарегистрирован. Войдите в свой аккаунт или укажите другой E-mail.').addClass('active'); + } + }); + }); + + $('#delete_coupon').on('click', function(){ + $('.woocommerce-remove-coupon[data-coupon=' + $(this).data('coupon') + ']').click() + }) + $('.woocommerce-remove-coupon').on('click', function(){ + + $('#promo_form').show() + $('#promo_delete').hide() + }) +}); + diff --git a/.user.ini b/wp-content/themes/cosmopet/modules/shop/components/checkout/component-controller.php similarity index 100% rename from .user.ini rename to wp-content/themes/cosmopet/modules/shop/components/checkout/component-controller.php diff --git a/wp-content/themes/cosmopet/modules/shop/module-ajax-controller.php b/wp-content/themes/cosmopet/modules/shop/module-ajax-controller.php new file mode 100644 index 0000000..e69de29 diff --git a/wp-content/themes/cosmopet/page.php b/wp-content/themes/cosmopet/page.php new file mode 100644 index 0000000..ac4ba9a --- /dev/null +++ b/wp-content/themes/cosmopet/page.php @@ -0,0 +1,11 @@ + + + + + + + + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/country/ru.svg b/wp-content/themes/cosmopet/static/img/svg/country/ru.svg new file mode 100644 index 0000000..fc991dd --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/country/ru.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/logo/logo-black.svg b/wp-content/themes/cosmopet/static/img/svg/logo/logo-black.svg new file mode 100644 index 0000000..4cd0135 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/logo/logo-black.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/wp-content/themes/cosmopet/static/img/svg/logo/logo-gradient.svg b/wp-content/themes/cosmopet/static/img/svg/logo/logo-gradient.svg new file mode 100644 index 0000000..9054fde --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/logo/logo-gradient.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/logo/logo-white.svg b/wp-content/themes/cosmopet/static/img/svg/logo/logo-white.svg new file mode 100644 index 0000000..22c4489 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/logo/logo-white.svg @@ -0,0 +1,4 @@ + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/arrow-back.svg b/wp-content/themes/cosmopet/static/img/svg/main/arrow-back.svg new file mode 100644 index 0000000..a977e53 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/arrow-back.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/arrow-black.svg b/wp-content/themes/cosmopet/static/img/svg/main/arrow-black.svg new file mode 100644 index 0000000..38fe433 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/arrow-black.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/arrow-breadcrumbs-black.svg b/wp-content/themes/cosmopet/static/img/svg/main/arrow-breadcrumbs-black.svg new file mode 100644 index 0000000..88fd149 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/arrow-breadcrumbs-black.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/arrow-breadcrumbs.svg b/wp-content/themes/cosmopet/static/img/svg/main/arrow-breadcrumbs.svg new file mode 100644 index 0000000..f1f9618 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/arrow-breadcrumbs.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/arrow-left.svg b/wp-content/themes/cosmopet/static/img/svg/main/arrow-left.svg new file mode 100644 index 0000000..465c268 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/arrow-left.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/arrow-right-input.svg b/wp-content/themes/cosmopet/static/img/svg/main/arrow-right-input.svg new file mode 100644 index 0000000..a101dd0 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/arrow-right-input.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/arrow-right.svg b/wp-content/themes/cosmopet/static/img/svg/main/arrow-right.svg new file mode 100644 index 0000000..8952470 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/arrow-right.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/arrow-selected-white.svg b/wp-content/themes/cosmopet/static/img/svg/main/arrow-selected-white.svg new file mode 100644 index 0000000..bb7e90b --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/arrow-selected-white.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/arrow-selected.svg b/wp-content/themes/cosmopet/static/img/svg/main/arrow-selected.svg new file mode 100644 index 0000000..fb283a7 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/arrow-selected.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/wp-content/themes/cosmopet/static/img/svg/main/basket.svg b/wp-content/themes/cosmopet/static/img/svg/main/basket.svg new file mode 100644 index 0000000..6c08b40 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/basket.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/black-x.svg b/wp-content/themes/cosmopet/static/img/svg/main/black-x.svg new file mode 100644 index 0000000..cb3041d --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/black-x.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/change-dot.svg b/wp-content/themes/cosmopet/static/img/svg/main/change-dot.svg new file mode 100644 index 0000000..f38b6c9 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/change-dot.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/filter.svg b/wp-content/themes/cosmopet/static/img/svg/main/filter.svg new file mode 100644 index 0000000..efa46c8 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/filter.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/google-white.svg b/wp-content/themes/cosmopet/static/img/svg/main/google-white.svg new file mode 100644 index 0000000..4040621 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/google-white.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/gradient-x.svg b/wp-content/themes/cosmopet/static/img/svg/main/gradient-x.svg new file mode 100644 index 0000000..3a19e1f --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/gradient-x.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/minus.svg b/wp-content/themes/cosmopet/static/img/svg/main/minus.svg new file mode 100644 index 0000000..77109fe --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/minus.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/plus-grey.svg b/wp-content/themes/cosmopet/static/img/svg/main/plus-grey.svg new file mode 100644 index 0000000..6fa9039 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/plus-grey.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/plus.svg b/wp-content/themes/cosmopet/static/img/svg/main/plus.svg new file mode 100644 index 0000000..a9db939 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/plus.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/question.svg b/wp-content/themes/cosmopet/static/img/svg/main/question.svg new file mode 100644 index 0000000..2e21e7b --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/question.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/status-cancelled.svg b/wp-content/themes/cosmopet/static/img/svg/main/status-cancelled.svg new file mode 100644 index 0000000..f96648a --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/status-cancelled.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/status-chek.svg b/wp-content/themes/cosmopet/static/img/svg/main/status-chek.svg new file mode 100644 index 0000000..836d49b --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/status-chek.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/triangle-grey.svg b/wp-content/themes/cosmopet/static/img/svg/main/triangle-grey.svg new file mode 100644 index 0000000..23ede66 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/triangle-grey.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/vk-white.svg b/wp-content/themes/cosmopet/static/img/svg/main/vk-white.svg new file mode 100644 index 0000000..556d386 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/vk-white.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/white-x.svg b/wp-content/themes/cosmopet/static/img/svg/main/white-x.svg new file mode 100644 index 0000000..3697346 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/white-x.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/main/ya-white.svg b/wp-content/themes/cosmopet/static/img/svg/main/ya-white.svg new file mode 100644 index 0000000..a6b4ece --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/main/ya-white.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/mini-profile/basket-w.svg b/wp-content/themes/cosmopet/static/img/svg/mini-profile/basket-w.svg new file mode 100644 index 0000000..55eb29f --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/mini-profile/basket-w.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/mini-profile/basket.svg b/wp-content/themes/cosmopet/static/img/svg/mini-profile/basket.svg new file mode 100644 index 0000000..fdf6bf8 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/mini-profile/basket.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/mini-profile/profile-w.svg b/wp-content/themes/cosmopet/static/img/svg/mini-profile/profile-w.svg new file mode 100644 index 0000000..442e587 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/mini-profile/profile-w.svg @@ -0,0 +1,4 @@ + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/mini-profile/profile.svg b/wp-content/themes/cosmopet/static/img/svg/mini-profile/profile.svg new file mode 100644 index 0000000..6a48c34 --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/mini-profile/profile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/social-media/tg.svg b/wp-content/themes/cosmopet/static/img/svg/social-media/tg.svg new file mode 100644 index 0000000..332942a --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/social-media/tg.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/social-media/vk.svg b/wp-content/themes/cosmopet/static/img/svg/social-media/vk.svg new file mode 100644 index 0000000..ef5cadf --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/social-media/vk.svg @@ -0,0 +1,3 @@ + + + diff --git a/wp-content/themes/cosmopet/static/img/svg/social-media/ya.svg b/wp-content/themes/cosmopet/static/img/svg/social-media/ya.svg new file mode 100644 index 0000000..055175d --- /dev/null +++ b/wp-content/themes/cosmopet/static/img/svg/social-media/ya.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/wp-content/themes/cosmopet/templates/header.twig b/wp-content/themes/cosmopet/templates/header.twig index bd8846a..2c03b5e 100644 --- a/wp-content/themes/cosmopet/templates/header.twig +++ b/wp-content/themes/cosmopet/templates/header.twig @@ -13,32 +13,37 @@
{% endif %}
@@ -132,34 +150,49 @@ -
-
-
- +
+
    + {{ function('pll_the_languages', {'echo': false, 'display_names_as': 'slug'}) }} +
+
- -
-
    - {{ function('pll_the_languages', {'echo': false, 'display_names_as': 'slug'}) }} -
+
+
+
-
- \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/layout.twig b/wp-content/themes/cosmopet/templates/layout.twig index 05d2282..e69de29 100644 --- a/wp-content/themes/cosmopet/templates/layout.twig +++ b/wp-content/themes/cosmopet/templates/layout.twig @@ -1,25 +0,0 @@ - - - - {{ function('wp_head') }} - {{ function('wp_title') }} - - - - - - - - - {% include 'header.twig' %} - -
- {% block content %} - {% endblock %} -
- - {% include 'footer.twig' %} - - {{ function('wp_footer') }} - - \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/modal.twig b/wp-content/themes/cosmopet/templates/modal.twig new file mode 100644 index 0000000..6157f38 --- /dev/null +++ b/wp-content/themes/cosmopet/templates/modal.twig @@ -0,0 +1,68 @@ + \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/modal/basket.twig b/wp-content/themes/cosmopet/templates/modal/basket.twig new file mode 100644 index 0000000..4fb1488 --- /dev/null +++ b/wp-content/themes/cosmopet/templates/modal/basket.twig @@ -0,0 +1,47 @@ + \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/page.twig b/wp-content/themes/cosmopet/templates/page.twig new file mode 100644 index 0000000..ab91e3d --- /dev/null +++ b/wp-content/themes/cosmopet/templates/page.twig @@ -0,0 +1,9 @@ +{% set bodyClass = 'bg-white' %} +{% set mainClass = 'wrapper' %} +{% extends 'layout.twig' %} + +{% block content %} + + {{ post.content }} + +{% endblock %} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/shop/cart-contents.twig b/wp-content/themes/cosmopet/templates/shop/cart-contents.twig new file mode 100644 index 0000000..1b7d181 --- /dev/null +++ b/wp-content/themes/cosmopet/templates/shop/cart-contents.twig @@ -0,0 +1,45 @@ +{% if cart.is_empty %} +

{{ function('pll_e', 'Ваша корзина пуста') }}

+{% else %} + {% for item_key, item in cart.get_cart %} + {% set product = item.data %} + + {% endfor %} +{% endif %} + diff --git a/wp-content/themes/cosmopet/templates/shop/checkout.twig b/wp-content/themes/cosmopet/templates/shop/checkout.twig new file mode 100644 index 0000000..e2dfc26 --- /dev/null +++ b/wp-content/themes/cosmopet/templates/shop/checkout.twig @@ -0,0 +1,151 @@ +{# templates/woocommerce/checkout/form-checkout.twig #} + +
+
+
+
+

+ {{ fn('pll_e', 'Контакты получателя') }} +

+ {% if fn('is_user_logged_in') %} + + {{ fn('pll_e', 'Выйти') }} + + {% else %} + + {% endif %} +
+
+
+ {{ fn('do_action', 'woocommerce_checkout_billing') }} +
+ + {% set chosen_methods = WC().session.get('chosen_shipping_methods') %} + {% set shipping_method = chosen_methods[0] ? chosen_methods[0] : fn('pll_e', 'Не выбран') %} + +
+

{{ fn('pll_e', 'Доставка') }}

+ + + + +
+
+ +
+

{{ fn('pll_e', 'Ваш заказ') }}

+
+ {% for cart_item_key, cart_item in WC().cart.get_cart() %} + {% set product = cart_item.data %} + {% set thumbnail_id = product.get_image_id() %} + + {% if product and product.exists() and cart_item.quantity > 0 and fn('apply_filters', 'woocommerce_checkout_cart_item_visible', true, cart_item, cart_item_key) %} +
+ +
+

+ {{ cart_item.quantity }} +

+

+ {{ fn('apply_filters', 'woocommerce_cart_item_subtotal', WC().cart.get_product_subtotal(product, cart_item.quantity), cart_item, cart_item_key) }} +

+
+
+ {% endif %} + {% endfor %} +
+ +
+ {{ fn('woocommerce_checkout_coupon_form') }} + +
+ {{ fn('do_action', 'woocommerce_checkout_order_review') }} +
+
+
+
+
+ +
+ +
\ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/shop/index.php b/wp-content/themes/cosmopet/templates/shop/index.php deleted file mode 100644 index d800886..0000000 --- a/wp-content/themes/cosmopet/templates/shop/index.php +++ /dev/null @@ -1 +0,0 @@ -123 \ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/shop/review-order.twig b/wp-content/themes/cosmopet/templates/shop/review-order.twig new file mode 100644 index 0000000..9f76ddb --- /dev/null +++ b/wp-content/themes/cosmopet/templates/shop/review-order.twig @@ -0,0 +1,66 @@ + + + + + + + + {% for code, coupon in fn('WC').cart.get_coupons() %} + + + + + {% endfor %} + + {% if fn('WC').cart.needs_shipping() and fn('WC').cart.show_shipping() %} + {{ do_action('woocommerce_review_order_before_shipping') }} + + {{ fn('wc_cart_totals_shipping_html') }} + + {{ do_action('woocommerce_review_order_after_shipping') }} + {% endif %} + + + + {% set chosen_shipping_methods = fn('WC').session.get('chosen_shipping_methods') %} + {% if not chosen_shipping_methods[0] is defined %} + + {% else %} + + {% endif %} + + + {% for fee in fn('WC').cart.get_fees() %} + + + + + {% endfor %} + + {% if fn('wc_tax_enabled') and not fn('WC').cart.display_prices_including_tax() %} + {% if 'itemized' == fn('get_option', 'woocommerce_tax_total_display') %} + {% for code, tax in fn('WC').cart.get_tax_totals() %} + + + + + {% endfor %} + {% else %} + + + + + {% endif %} + {% endif %} + + {{ do_action('woocommerce_review_order_before_order_total') }} + + + + + + + + {{ do_action('woocommerce_review_order_after_order_total') }} + +
{{ pll_e('Товары') }}{{ fn('wc_cart_totals_subtotal_html') }}
{{ fn('wc_cart_totals_coupon_label', coupon) }}{{ fn('wc_cart_totals_coupon_html', coupon) }}
{{ fn('pll_e', 'Доставка') }}{{ fn('pll_e', 'Введите адрес доставки') }}{{ fn('WC').cart.get_shipping_total() }} ₽
{{ fee.name|e }}{{ fn('wc_cart_totals_fee_html', fee) }}
{{ tax.label|e }}{{ tax.formatted_amount|raw }}
{{ fn('WC').countries.tax_or_vat()|e }}{{ fn('wc_cart_totals_taxes_total_html') }}
{{ fn('pll_e', 'Total') }}{{ fn('wc_cart_totals_order_total_html') }}
\ No newline at end of file diff --git a/wp-content/themes/cosmopet/templates/shop/shop.twig b/wp-content/themes/cosmopet/templates/shop/shop.twig index d800886..e69de29 100644 --- a/wp-content/themes/cosmopet/templates/shop/shop.twig +++ b/wp-content/themes/cosmopet/templates/shop/shop.twig @@ -1 +0,0 @@ -123 \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product-modal.twig b/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product-modal.twig deleted file mode 100644 index 537b00d..0000000 --- a/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product-modal.twig +++ /dev/null @@ -1,221 +0,0 @@ - \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product.twig b/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product.twig index 4df9866..dd7edbc 100644 --- a/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product.twig +++ b/wp-content/themes/cosmopet/woocommerce/archive-product/archive-product.twig @@ -67,6 +67,6 @@ {#{% do action('woocommerce_after_shop_loop') %} {% do action('woocommerce_after_main_content') %}#} -{% include '/woocommerce/archive-product/archive-product-modal.twig' %} + {% endblock %} \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/assets/css/gp-style-core.css b/wp-content/themes/cosmopet/woocommerce/assets/css/gp-style-core.css index 2e95825..2a05fd1 100644 --- a/wp-content/themes/cosmopet/woocommerce/assets/css/gp-style-core.css +++ b/wp-content/themes/cosmopet/woocommerce/assets/css/gp-style-core.css @@ -4,123 +4,8 @@ box-sizing: border-box; } -/* Переменные, шрифты, UI kit */ - -/* -700 - Bold -600 - SemiBold / Demi -500 - Medium -400 - Regular -*/ - -/* Craftwork Grotesk */ -@font-face { - font-family: "Craftwork Grotesk"; - src: local("Craftwork Grotesk Bold"), - url("../fonts/craftwork/CraftworkGrotesk-SemiBold.woff2") format("woff2"), - url("../fonts/craftwork/CraftworkGrotesk-Bold.woff") format("woff"), - url("../fonts/craftwork/craftwork-grotesk-bold.ttf") format("ttf"); - font-weight: 700; -} -@font-face { - font-family: "Craftwork Grotesk"; - src: local("Craftwork Grotesk SemiBold"), - url("../fonts/craftwork/CraftworkGrotesk-SemiBold.woff2") format("woff2"), - url("../fonts/craftwork/CraftworkGrotesk-SemiBold.woff") format("woff"), - url("../fonts/craftwork/craftwork-grotesk-semi-bold.ttf") format("ttf"); - font-weight: 600; -} -@font-face { - font-family: "Craftwork Grotesk"; - src: local("Craftwork Grotesk Medium"), - url("../fonts/craftwork/CraftworkGrotesk-Medium.woff2") format("woff2"), - url("../fonts/craftwork/CraftworkGrotesk-Medium.woff") format("woff"), - url("../fonts/craftwork/craftwork-grotesk-medium.ttf") format("ttf"); - font-weight: 500; -} -@font-face { - font-family: "Craftwork Grotesk"; - src: local("Craftwork Grotesk Regular"), - url("../fonts/craftwork/CraftworkGrotesk-Regular.woff2") format("woff2"), - url("../fonts/craftwork/CraftworkGrotesk-Regular.woff") format("woff"), - url("../fonts/craftwork/craftwork-grotesk-regular.ttf") format("ttf"); - font-weight: 400; -} -/* Craftwork Grotesk */ - -/* din 2014 */ -@font-face { - font-family: "DIN 2014 Rounded"; - src: local("DIN 2014 Rounded Demi"), - url("../fonts/din-2014/din-2014-rounded-demi.woff2") format("woff2"), - url("../fonts/din-2014/din-2014-rounded-demi.woff") format("woff"), - url("../fonts/din-2014/din-2014-rounded-demi.ttf") format("ttf"); - font-weight: 600; -} -@font-face { - font-family: "DIN 2014 Rounded"; - src: local("DIN 2014 Rounded Regular"), - url("../fonts/din-2014/din-2014-rounded-regular.woff2") format("woff2"), - url("../fonts/din-2014/din-2014-rounded-regular.woff") format("woff"), - url("../fonts/din-2014/din-2014-rounded-regular.ttf") format("ttf"); - font-weight: 400; -} -/* din 2014 */ - -/* roboto */ -@font-face { - font-family: "Roboto"; - src: local("Roboto Medium"), - url("../fonts/roboto/Roboto-Medium.woff2") format("woff2"), - url("../fonts/roboto/Roboto-Medium.woff") format("woff"), - url("../fonts/roboto/roboto-medium.ttf") format("ttf"); - font-weight: 500; -} -@font-face { - font-family: "Roboto"; - src: local("Roboto Regular"), - url("../fonts/roboto/Roboto-Regular.woff2") format("woff2"), - url("../fonts/roboto/Roboto-Regular.woff") format("woff"), - url("../fonts/roboto/roboto-medium.ttf") format("ttf"); - font-weight: 400; -} -/* roboto */ - -/* Глобальные переменные: */ - -:root { - /* fonts */ - --font-family: "Craftwork Grotesk", sans-serif; - --second-family: "DIN 2014 Rounded", sans-serif; - --third-family: "Roboto", sans-serif; - - /* color */ - /* text */ - --text-white: #fff; - --text-black: #121212; - --text-dark: #2b2b3b; - --text-grey: #999; - --text-red: #fa0505; - --text-green: #2ED15D; - --text-0: #000; - --text-3: #333; - --text-6: #666; - --text-9: #999; - - /* background */ - --background-white: #fff; - --background-black: #121212; - --background-grey: #f2f2f2; - --background-green: #2ED15D; - --background-green-white: #f4fff0; - --background-9: #999; - - - /* gradient */ - --gradient-blue: radial-gradient(346.57% 244.17% at 149.73% -58.39%, rgb(15, 88, 129) 0%, rgb(30, 164, 156) 51.21689438819885%, rgb(118, 206, 117) 80.70731163024902%, rgb(236, 243, 159) 91.14583134651184%); - --gradient-turquoise: radial-gradient(346.57% 244.17% at 149.73% -58.39%, rgb(117, 196, 240) 0%, rgb(126, 231, 225) 51.21689438819885%, rgb(181, 228, 180) 80.70731163024902%, rgb(237, 244, 164) 91.14583134651184%); - --gradient-red: linear-gradient(22deg, #f44242 0%, #569ef0 100%); -} + + /* общие */ @@ -1103,192 +988,6 @@ button{ } /* 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%; - text-align: center; -} -.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%; */ - - padding: 12px 24px 7px 24px; - - display: flex; - justify-content: center; - - border: none; - - transition: opacity .2s ease-out; - text-decoration: none; -} -.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); -} - -.wc-forward { - width: 100%; - padding: 0.5rem 0; - text-align: center; -} -/* button */ - /* select */ .select{ max-width: 144px; @@ -1401,867 +1100,6 @@ button{ /* select */ -/* counter */ -.counter{ - display: flex; - align-items: center; -} -.counter__input{ - width: 48px; - - font-family: var(--font-family); - font-weight: 600; - font-size: 20px; - line-height: 120%; - text-align: center; - color: var(--text-black); - - pointer-events: none; - - background: none; - border: none; -} -.counter__button{ - width: 48px; - height: 48px; - - display: flex; - justify-content: center; - align-items: center; - - border: 1px solid var(--text-3); - border-radius: 24px; - - background: var(--background-white); - - transition: opacity .2s ease-out; -} -.counter__button:hover{ - opacity: .8; -} -.counter--small{ - -} -.counter--small .counter__button{ - width: 32px; - height: 32px; -} -.counter--small{ - -} -/* counter */ - -/* modal */ -.modal{ - position: fixed; - top: 0; - left: 0; - - padding: 20px; - - width: 100%; - height: 100%; - - background: rgba(0, 0, 0, 0.25); - - z-index: 200; - - opacity: 0; - transition: opacity .2s ease-out; - pointer-events: none; - - display: flex; - justify-content: center; - align-items: center; - - overflow-y: auto; -} -.modal.active{ - opacity: 1; - pointer-events: auto; -} -.modal__notification{} -.form__button-mobile{ - display: none; -} -.modal__aside{ - position: fixed; - top: 0; - right: 0; - - width: 0; - height: 100%; - - overflow: hidden; - transition: width .4s ease-out; -} -.modal__item{ - height: 100%; - overflow: auto; - padding: 24px; - - background: var(--background-white); - - position: relative; - - display: none; - - filter: blur(10px); - transition: filter .2s ease-out; -} -.modal__item--no-title{ - padding-top: 72px; -} -.modal__item.active{ - display: flex; - flex-direction: column; - justify-content: space-between; -} -.modal__close{ - position: absolute; - top: 32px; - right: 24px; - - width: 24px; - height: 24px; - - border: none; - background: none; -} -.modal__header{} -.modal__title{ - padding-right: 48px; - - font-family: var(--font-family); - font-weight: 700; - font-size: 36px; - line-height: 111%; - text-transform: uppercase; - color: var(--text-black); -} -.modal__small-title{ - font-family: var(--font-family); - font-weight: 700; - font-size: 24px; - line-height: 100%; - text-transform: uppercase; - color: var(--text-black); -} -.modal__text{ - margin-top: 16px; - - padding-right: 10px; - - font-family: var(--font-family); - font-weight: 400; - font-size: 20px; - line-height: 120%; - color: var(--text-0); -} -.modal__form-sub{ - margin-top: 48px; -} -.modal-form-sub__submit{ - margin-top: 64px; -} -.modal__block-button{ - margin-top: 24px; -} -.modal__button{ - margin-top: 16px; -} -.modal__button:first-child{ - margin-top: 0; -} -.modal__content{ - margin-top: 24px; -} -.modal__filter{ - width: 400px; -} -.modal__footer{ - border-top: 1px solid var(--text-6); - padding-top: 23px; -} -.modal__block-price{ - display: flex; - justify-content: space-between; - align-items: center; -} -.modal-block-price__title{ - font-family: var(--font-family); - font-weight: 600; - font-size: 20px; - line-height: 120%; - color: var(--text-black); -} -.modal-block-price__price{ - font-family: var(--font-family); - font-weight: 700; - font-size: 24px; - line-height: 100%; - text-transform: uppercase; - text-align: right; - color: var(--text-black); -} -.modal-block-price__price::after{ - content: 'Р'; -} -.modal__basket{ - width: 600px; -} -.modal__to-know, -.modal__to-know-submit{ - width: 412px; -} - -.modal-basket__item{ - padding-top: 23px; - padding-right: 15px; - padding-bottom: 24px; - - display: flex; - - border-top: 1px solid var(--background-grey); - - position: relative; -} -.modal-basket__item::before{ - content: ''; - - position: absolute; - top: 24px; - right: 6px; - - width: 24px; - aspect-ratio: 1; - - background-image: url(../img/svg/main/basket.svg); - background-repeat: no-repeat; - background-position: center; - - cursor: pointer; - - transition: opacity .2s ease-out; -} -.modal-basket__item:hover .modal-basket__item::before{ - opacity: .8; -} -.modal-basket__item--return{ - padding-right: 5px; - - display: flex; - justify-content: space-between; - align-items: center; -} -.modal-basket__item--return .modal-basket-item__title{ - padding-right: 10px; -} -.modal-basket__item--return::before{ - display: none; -} -.modal-basket-item__return{ - border-radius: 20px; - padding: 4px 24px; - - font-family: var(--font-family); - font-weight: 600; - font-size: 20px; - line-height: 120%; - color: var(--text-white); - - background: var(--background-black); - - border: none; -} -.modal-basket-item__block-image{ - width: 128px; - aspect-ratio: 1; - - display: flex; - justify-content: center; - align-items: center; -} -.modal-basket-item__image{ - width: 96px; - aspect-ratio: 1; - - object-fit: contain; -} -.modal-basket-item__content{ - margin-left: 16px; -} -.modal-basket-item__title{ - padding-right: 40px; - - font-family: var(--font-family); - font-weight: 500; - font-size: 20px; - line-height: 120%; - color: var(--text-black); -} -.modal-basket-item__sub-title{ - margin-top: 8px; - - font-family: var(--font-family); - font-weight: 700; - font-size: 12px; - line-height: 133%; - color: var(--text-black); -} -.modal-basket-item__control{ - margin-top: 24px; - - display: flex; - justify-content: space-between; - align-items: center; -} -.modal-basket-item__price{ - font-family: var(--font-family); - font-weight: 600; - font-size: 20px; - line-height: 120%; - text-align: right; - color: var(--text-black); -} -.modal-basket-item__price::after{ - content: 'Р'; - - padding-left: 4px; -} -.modal__basket .modal__header{ - height: calc(100% - 92px); - margin-bottom: -36px; -} -.modal__basket .modal__content{ - height: calc(100% - 100px); - overflow-x: hidden; - -} -.modal__basket .modal__content::-webkit-scrollbar { - width: 7px; - background-color: #f9f9fd; -} -.modal__basket .modal__content::-webkit-scrollbar-thumb { - background-color: var(--background-black); - border-radius: 2px; -} - -.modal-form{ - margin: auto; - - width: 600px; - - padding: 24px; - - border-radius: 20px; - - position: relative; - - display: none; -} -.modal-form.active{ - display: block; -} -.modal-form--white{ - border: 1px solid var(--background-black); - background: var(--background-white); -} -.modal-form--green-gradient{ - background: var(--gradient-blue); -} -.modal-form--width-584{ - width: 584px; -} -.modal-form--cdek{ - width: 836px; -} -.modal-form__close{ - position: absolute; - top: 24px; - right: 24px; - - width: 24px; - aspect-ratio: 1; - - border: none; - background: none; - background-image: url(../img/svg/main/black-x.svg); - background-repeat: no-repeat; - background-size: 24px; - background-position: center; - - transition: opacity .2s ease-out; - - z-index: 10; -} -.modal-form__close--white{ - background-image: url(../img/svg/main/white-x.svg); -} -.modal-form__close:hover{ - opacity: .8; -} -.modal-form__button-close{} -.modal-form__title{ - padding-right: 50px; - - font-family: var(--font-family); - font-weight: 700; - font-size: 26px; - line-height: 123%; - text-transform: uppercase; - color: var(--text-dark); -} -.modal-form__text--center{ - text-align: center; -} -.modal-form__text--center-pc{ - text-align: center; -} -.modal-form__title--green-gradient{ - background: var(--gradient-blue); - background-clip: text; - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; -} -.modal-form__title--white{ - color: var(--text-white); -} -.modal-form__element{ - margin-top: 24px; -} -.modal-form__element--center{ - display: flex; - justify-content: center; -} -.modal-form__element--top-40{ - margin-top: 40px; -} -.modal-form__text{ - font-family: var(--font-family); - font-weight: 400; - font-size: 20px; - line-height: 120%; - color: var(--text-black); -} -.modal-form__text--weight-500{ - font-weight: 500; -} -.modal-form__text--white{ - color: var(--text-white); -} -.modal-form__img{ - width: 100%; - height: 360px; - - object-fit: contain; -} -.modal-form__content{ - margin-top: 40px; -} -.modal-form-content__line{ - margin-top: 24px; -} -.modal-form-content__line:first-child{ - margin-top: 0; -} -.modal-form-content__line--two{ - display: flex; - justify-content: space-between; -} -.modal-form-content__line--two-mobile{ - display: flex; - justify-content: space-between; -} -.modal-form-content__line--two-mobile .modal-form-content-line__element{ - width: calc(50% - 12px); -} -.modal-form-content-line__element{ - position: relative; -} -.modal-form-content-line__element--arrow::after{ - content: ''; - - position: absolute; - right: 16px; - bottom: 16px; - - width: 16px; - height: 16px; - - background-image: url(../img/svg/main/arrow-right-input.svg); - - pointer-events: none; -} -.modal-form-content__line--two .modal-form-content-line__element{ - width: calc(50% - 12px); -} -.modal-form-content__line--three{ - display: flex; -} -.modal-form-content__line--three .modal-form-content-line__element:nth-child(1){ - width: 85px; - - flex-shrink: 0; -} -.modal-form-content__line--three .modal-form-content-line__element:nth-child(2){ - margin-left: 8px; - - width: 100%; -} -.modal-form-content__line--three .modal-form-content-line__element:nth-child(3){ - margin-left: 8px; - - width: 85px; - - flex-shrink: 0; -} -.modal-form-content__line--margin-top-16{ - margin-top: 16px; -} -.modal-form__buttons{ - margin-top: 32px; -} -.modal-form__buttons--two{ - display: flex; - justify-content: space-between; - align-items: center; -} - -.modal-form__buttons--two button, -.modal-form__buttons--two input{ - width: calc(50% - 20px); -} -.modal-map{ - margin: auto; - - width: 1105px; - - display: none; - - border-radius: 24px; - border: none; -} -.modal-map.active{ - display: flex; -} -.modal-map__left{ - width: 600px; - - padding: 24px; - - position: relative; -} -.modal-map__control{ - margin: 38px -12px -12px -12px; - - display: flex; -} -.modal-map__control--delivery{ - margin-top: 12px; -} -.modal-map-control__item{ - margin: 12px; - - padding: 2px; - - width: calc(50% - 24px); - - background: var(--background-9); - border-radius: 20px; - border: none; -} -.modal-map-control__item.active{ - background: var(--gradient-blue); -} -.modal-map-control__item.active .form-input-radio__circle::before{ - content: ''; - position: absolute; - top: 4px; - left: 4px; - width: 12px; - aspect-ratio: 1; - border-radius: 50%; - background: var(--gradient-blue); -} -.modal-map-control-item__content{ - padding: 14px; - - border-radius: 18px; - - background: var(--background-white); -} -.modal-map-control-item__header{ - display: flex; - align-items: center; -} -.modal-map-control-item__circle{ - padding: 2px; - width: 20px; - aspect-ratio: 1; - border-radius: 50%; - background: var(--background-9); - position: relative; -} -.modal-map-control-item__input{ - display: none; -} -.modal-map-control-item-circle__content{ - width: 16px; - aspect-ratio: 1; - border-radius: 50%; - background: var(--background-white); -} -.modal-map-control__item.active .modal-map-control-item__circle{ - background: var(--gradient-blue); -} -.modal-map-control__item.active .modal-map-control-item__circle::before{ - content: ''; - position: absolute; - top: 4px; - left: 4px; - width: 12px; - aspect-ratio: 1; - border-radius: 50%; - background: var(--gradient-blue); -} -.modal-map-control-item__title{ - margin-left: 8px; - - font-family: var(--font-family); - font-weight: 400; - font-size: 20px; - line-height: 120%; - color: var(--text-dark); -} -.modal-map-control-item__description{ - margin-top: 16px; -} -.modal-map-control-item__time{ - font-family: var(--font-family); - font-weight: 500; - font-size: 16px; - line-height: 125%; - color: var(--text-black); - - text-align: start; -} -.modal-map-control-item__price{ - margin-top: 8px; - - font-family: var(--font-family); - font-weight: 700; - font-size: 12px; - line-height: 133%; - color: var(--text-6); - - text-align: start; -} -.modal-map__form{ - margin-top: 24px; -} -.modal-map-form__hidden{ - -} -.modal-map-form__button{ - margin-top: 83px; -} -.modal-map-form__sub-button{ - display: none; -} -.modal-map__right{ - padding: 16px 0px 16px 16px; -} -.modal-map__map{ - border: 2px solid var(--background-9); - border-radius: 16px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.modal-map__map iframe{ - height: 650px; -} -.modal__age{ - -} -.modal__age > div{ - display: none; -} -.modal__age > div.active{ - display: flex; -} -/* modal */ - -/* 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 */ - -/* radio */ -.radio{ - display: flex; - align-items: center; -} -.radio__input{ - width: 18px; - aspect-ratio: 1; - - accent-color: var(--background-black); - - cursor: pointer; -} -.radio__label{ - padding-left: 8px; - - font-family: var(--font-family); - font-weight: 400; - font-size: 20px; - line-height: 120%; - color: var(--text-dark); - - cursor: pointer; -} -/* radio */ - -.added_to_cart { - display: none!important; -} - -@keyframes slidein { - from { - opacity: 0; - } - - to { - opacity: 1; - } -} /* Sidebar Filters */ diff --git a/wp-content/themes/cosmopet/woocommerce/assets/js/_gp-function.js b/wp-content/themes/cosmopet/woocommerce/assets/js/_gp-function.js deleted file mode 100644 index ed4d7ab..0000000 --- a/wp-content/themes/cosmopet/woocommerce/assets/js/_gp-function.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict'; - -// function -export function modalOpen(buttonElement, contentElement){ - let modal = document.querySelector('.modal'), - aside = document.querySelector('.modal__aside'), - elements = document.querySelectorAll(buttonElement), - device = window.screen.width; - - elements.forEach(e => { - let thisContentElement = document.querySelector(contentElement); - - e.onclick = function () { - modal.classList.add('active'); - thisContentElement.classList.add('active'); - - let width = thisContentElement.clientWidth; - - setTimeout(() => { - if (device <= 720) { - aside.style.width = `${device}px`; - thisContentElement.style.opacity = 1; - thisContentElement.style.filter = 'blur(0px)'; - }else{ - aside.style.width = `${width}px`; - thisContentElement.style.opacity = 1; - thisContentElement.style.filter = 'blur(0px)'; - } - }, 10); - } - }) -} - -export function modalClose(buttonElement) { - let modal = document.querySelector('.modal'), - aside = document.querySelector('.modal__aside'), - asideItems = document.querySelectorAll('.modal__item'), - elements = document.querySelectorAll(buttonElement); - - elements.forEach(e => { - e.onclick = function () { - aside.style.width = '0px'; - - asideItems.forEach(e => { - if (e.classList.contains('active')) { - e.style.filter = 'blur(10px)'; - } - }); - - setTimeout(() => { - asideItems.forEach(e => { - if (e.classList.contains('active')) { - e.classList.remove('active'); - } - }); - - modal.classList.remove('active'); - }, 300); - } - }) -} - -export function closeModalForm(close){ - let buttons = document.querySelectorAll(close), - modal = document.querySelector('.modal'); - - buttons.forEach(button => { - button.onclick = function (buttonEvent) { - modal.classList.remove('active'); - - if (!modal.querySelector('.modal-map.active')) { - modal.querySelector('.modal-form.active').classList.remove('active'); - }else{ - modal.querySelector('.modal-map.active').classList.remove('active'); - } - } - }) -} - -export function toggleOpenX(mainElement, buttonElement ,heightElement, contentElement, close) { - let elements = document.querySelectorAll(mainElement); - - elements.forEach(e => { - let thisMainElement = e, - thisButtonElement = e.querySelector(buttonElement), - thisHeightElement = e.querySelector(heightElement), - thisContentElement = e.querySelector(contentElement); - - thisButtonElement.onclick = function (e) { - let height = thisHeightElement.clientHeight; - - if (close == true && !thisMainElement.classList.contains('active')) { - elements.forEach(e => { - if (e.classList.contains('active')) { - e.classList.remove('active'); - e.querySelector(contentElement).style.height = null - } - }) - } - - if (!thisMainElement.classList.contains('active')) { - thisContentElement.style.height = `${height}px`; - thisMainElement.classList.add('active'); - }else{ - thisContentElement.style.height = null; - thisMainElement.classList.remove('active'); - } - } - - }); -} - -export function toggleHeader(button, content, blockheight, removeBlock, removeClass) { - let thisButton = document.querySelector(button), - thisContent = document.querySelector(content), - thisRemoveBlock = document.querySelector(removeBlock) || '', - thisBlockheight = document.querySelector(blockheight); - - thisButton.onclick = function () { - let height = thisBlockheight.clientHeight; - - if (!thisContent.classList .contains('open')) { - thisContent.style.height = `${height}px`; - thisContent.classList .add('open'); - - if (removeBlock) { - thisRemoveBlock.classList.remove(removeClass); - } - }else{ - thisContent.style.height = null; - thisContent.classList .remove('open'); - - if (removeBlock) { - if (window.scrollY <= 25) { - thisRemoveBlock.classList.add(removeClass); - } - } - } - } -} - -export function modalFormOpen(formOrNotification) { - let buttons = document.querySelectorAll(formOrNotification), - modal = document.querySelector('.modal'); - - buttons.forEach(button => { - button.onclick = function (eventButton) { - let classOpenForm = button.dataset.form, - form = modal.querySelector(`.${classOpenForm}`); - - form.classList.add('active'); - modal.classList.add('active'); - } - }) -} -// function \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/assets/js/core.js b/wp-content/themes/cosmopet/woocommerce/assets/js/core.js deleted file mode 100644 index d515cbb..0000000 --- a/wp-content/themes/cosmopet/woocommerce/assets/js/core.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -// slider gallery modal -const gallery = new Swiper('.gallery__slider', { - spaceBetween: 100, - - pagination: { - el: '.swiper-pagination', - }, - - navigation: { - nextEl: '.swiper-button-next', - prevEl: '.swiper-button-prev', - }, - - scrollbar: { - el: '.swiper-scrollbar', - }, -}); - -let paginationButtons = document.querySelectorAll('.gallery-pagination__item'); - -paginationButtons.forEach(button => { - let index = button.dataset.countImg; - - button.onclick = function () { - gallery.slideTo(index); - } -}) - -// open gallery -let detailImage= document.querySelectorAll('.detail__image'); -detailImage.forEach(button => { - let index = button.dataset.countImg; - - button.onclick = function () { - gallery.slideTo(index); - - document.querySelector('.gallery').classList.add('active'); - } -}) - -// close gallery - -document.querySelector('.gallery__close').onclick = function () { - document.querySelector('.gallery').classList.remove('active'); -} -// slider gallery modal - -// slider gallery main phone - -// createGalleryPhone('.detail__images', '.detail-images__wrapper', '.detail__image', 980); - -const detailPhone = new Swiper('.detail__images-phone', { - spaceBetween: 100, - - pagination: { - el: '.swiper-pagination', - }, - - navigation: { - nextEl: '.swiper-button-next', - prevEl: '.swiper-button-prev', - }, - - scrollbar: { - el: '.swiper-scrollbar', - }, -}); - -let detailImagesPhones = document.querySelectorAll('.detail-images-phone__image-block'); - -detailImagesPhones.forEach(button => { - button.onclick = function (e) { - let index = button.dataset.countImg; - - gallery.slideTo(index); - - document.querySelector('.gallery').classList.add('active'); - } -}) - -// slider gallery main phone - -// detail catalog -const detailCatalot = new Swiper('.detail__catalot', { - // Navigation arrows - navigation: { - nextEl: '.detail-catalot-control__button.next', - prevEl: '.detail-catalot-control__button.prev', - }, - breakpoints: { - 1600: { - slidesPerView: 4, - }, - 1200: { - slidesPerView: 3, - }, - 780: { - slidesPerView: 2, - }, - 100: { - slidesPerView: 1.1, - spaceBetween: 20 - }, - } - - -}); -// detail catalog \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/assets/js/gp-cabinet.js b/wp-content/themes/cosmopet/woocommerce/assets/js/gp-cabinet.js deleted file mode 100644 index d8a5111..0000000 --- a/wp-content/themes/cosmopet/woocommerce/assets/js/gp-cabinet.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -import * as fun from './_gp-function.js'; - -let widthPhoneCabinet = 1200; - -fun.toggleOpenX('.cabinet-card__order', '.cabinet-card-order__open-detail', '.cabinet-card-order__detail', '.cabinet-card-order__block-detail'); -fun.modalFormOpen('.form-open'); - -fun.closeModalForm('.modal-form__close'); -fun.closeModalForm('.modal-form__button-close'); - -controlCabinet('.cabinet-control__button', '.cabinet', widthPhoneCabinet); - -function controlCabinet(buttons, main, minWidth){ - let thisWidth = window.innerWidth; - let thisMain = document.querySelector(main); - - let thisButtons = document.querySelectorAll(buttons); - - thisButtons.forEach(e => { - e.onclick = function (element){ - let thisContent = document.querySelector(`.cabinet__${e.dataset.cabinet}`); - let newHeight = thisContent.clientHeight + 48; - let thisButton = element.target; - - thisMain.style.height = `${newHeight}px` - - if (!thisContent.classList.contains('active')) { - thisMain.querySelector('.active').classList.remove('active'); - thisContent.classList.add('active'); - - setTimeout(() => { - thisMain.style.height = 'auto'; - - if (thisMain.querySelector('.hide')) { - thisMain.querySelector('.hide').classList.remove('hide'); - } - - thisMain.querySelector('.active').classList.add('hide'); - }, 200); - } - - thisButtons.forEach(e => { - e.classList.remove('active'); - }) - thisButton.classList.add('active'); - } - }) - -} - -let modal = document.querySelector('.modal'); -modal.onclick = function (eventModal) { - let thisTarget = eventModal.target; - - if (thisTarget.classList.contains('modal')) { - thisTarget.classList.remove('active'); - - if (!thisTarget.querySelector('.modal-map.active')) { - thisTarget.querySelector('.modal-form.active').classList.remove('active'); - }else{ - thisTarget.querySelector('.modal-map.active').classList.remove('active'); - } - } -} - diff --git a/wp-content/themes/cosmopet/woocommerce/assets/js/gp-product.js b/wp-content/themes/cosmopet/woocommerce/assets/js/gp-product.js deleted file mode 100644 index 2508270..0000000 --- a/wp-content/themes/cosmopet/woocommerce/assets/js/gp-product.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -// slider gallery modal -const gallery = new Swiper('.gallery__slider', { - spaceBetween: 100, - - pagination: { - el: '.swiper-pagination', - }, - - navigation: { - nextEl: '.swiper-button-next', - prevEl: '.swiper-button-prev', - }, - - scrollbar: { - el: '.swiper-scrollbar', - }, -}); - -let paginationButtons = document.querySelectorAll('.gallery-pagination__item'); - -paginationButtons.forEach(button => { - let index = button.dataset.countImg; - - button.onclick = function () { - gallery.slideTo(index); - } -}) - -// open gallery -let detailImage= document.querySelectorAll('.detail__image'); -detailImage.forEach(button => { - let index = button.dataset.countImg; - - button.onclick = function () { - gallery.slideTo(index); - - document.querySelector('.gallery').classList.add('active'); - } -}) - -// close gallery - -document.querySelector('.gallery__close').onclick = function () { - document.querySelector('.gallery').classList.remove('active'); -} -// slider gallery modal - -// slider gallery main phone - -// createGalleryPhone('.detail__images', '.detail-images__wrapper', '.detail__image', 980); - -const detailPhone = new Swiper('.detail__images-phone', { - spaceBetween: 100, - - pagination: { - el: '.swiper-pagination', - }, - - navigation: { - nextEl: '.swiper-button-next', - prevEl: '.swiper-button-prev', - }, - - scrollbar: { - el: '.swiper-scrollbar', - }, -}); - -let detailImagesPhones = document.querySelectorAll('.detail-images-phone__image-block'); - -detailImagesPhones.forEach(button => { - button.onclick = function (e) { - let index = button.dataset.countImg; - - gallery.slideTo(index); - - document.querySelector('.gallery').classList.add('active'); - } -}) - -// slider gallery main phone - -// detail catalog -const detailCatalot = new Swiper('.detail__catalot', { - // Navigation arrows - navigation: { - nextEl: '.detail-catalot-control__button.next', - prevEl: '.detail-catalot-control__button.prev', - }, - breakpoints: { - 1600: { - slidesPerView: 4, - }, - 1200: { - slidesPerView: 3, - }, - 780: { - slidesPerView: 2, - }, - 100: { - slidesPerView: 1.1, - spaceBetween: 20 - }, - } - - -}); -// detail catalog \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/cart/cart-item-data.php b/wp-content/themes/cosmopet/woocommerce/cart/cart-item-data.php new file mode 100644 index 0000000..89c61e1 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/cart/cart-item-data.php @@ -0,0 +1,29 @@ + + diff --git a/wp-content/themes/cosmopet/woocommerce/cart/cart-shipping.php b/wp-content/themes/cosmopet/woocommerce/cart/cart-shipping.php new file mode 100644 index 0000000..b341ab6 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/cart/cart-shipping.php @@ -0,0 +1,121 @@ +countries->get_formatted_address( $package['destination'], ', ' ); +$has_calculated_shipping = ! empty( $has_calculated_shipping ); +$show_shipping_calculator = ! empty( $show_shipping_calculator ); +$calculator_text = ''; + +?> + + + + + + + + +

+ ' . esc_html( $formatted_destination ) . '' ); + $calculator_text = esc_html__( 'Change address', 'woocommerce' ); + } else { + echo wp_kses_post( apply_filters( 'woocommerce_shipping_estimate_html', __( 'Shipping options will be updated during checkout.', 'woocommerce' ) ) ); + } + ?> +

+ + +

Нет доступных способов доставки. Для отображение доступных методов укажите ваш город.

+ + + + + + + + + + \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/cart/cart.php b/wp-content/themes/cosmopet/woocommerce/cart/cart.php new file mode 100644 index 0000000..b3040d7 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/cart/cart.php @@ -0,0 +1,236 @@ + + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + cart->get_cart() as $cart_item_key => $cart_item ) { + $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); + $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); + + if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) { + $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); + $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
;
+ ×', + esc_url( wc_get_cart_remove_url( $cart_item_key ) ), + /* translators: %s is the product name */ + esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ), + esc_attr( $product_id ), + esc_attr( $_product->get_sku() ) + ), + $cart_item_key + ); + ?> + + get_image(), $cart_item, $cart_item_key ); + } else { + printf( '%s', esc_url( $product_permalink ), apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ) ); + } + ?> + + %s', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) ); + } + + do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key ); + + // Meta data + echo wc_get_formatted_cart_item_data( $cart_item ); + + // Backorder notification + if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) { + echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '

' . esc_html__( 'Available on backorder', 'woocommerce' ) . '

', $product_id ) ); + } + ?> +
+ get_sku() ) : ?> + get_sku() ); ?> + + + + + cart->get_product_price( $_product ), $cart_item, $cart_item_key ); + ?> + + is_sold_individually() ) { + $min_quantity = 1; + $max_quantity = 1; + } else { + $min_quantity = 0; + $max_quantity = $_product->get_max_purchase_quantity(); + } + + $product_quantity = woocommerce_quantity_input( + array( + 'input_name' => "cart[{$cart_item_key}][qty]", + 'input_value' => $cart_item['quantity'], + 'max_value' => $max_quantity, + 'min_value' => $min_quantity, + 'product_name' => $product_name, + ), + $_product, + false + ); + + echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); + ?> + + cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); + ?> +
+ +
+
+ + +
+ + + + +
+ + +
+
+ + + + + +
+
+
+
+ +
+ +
+ +
+ + + + + +
+ + + +
+ + diff --git a/wp-content/themes/cosmopet/woocommerce/cart/cross-sells.php b/wp-content/themes/cosmopet/woocommerce/cart/cross-sells.php new file mode 100644 index 0000000..c7a7c53 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/cart/cross-sells.php @@ -0,0 +1,57 @@ + + +
+ + +

+ + + apply_filters( 'woodmart_cross_sells_products_per_view', 4 ), + 'hide_pagination_control' => true, + 'hide_prev_next_buttons' => true, + 'img_size' => 'woocommerce_thumbnail', + 'custom_sizes' => apply_filters( 'woodmart_cross_sells_custom_sizes', false ), + 'product_quantity' => woodmart_get_opt( 'product_quantity' ), + 'products_bordered_grid' => woodmart_get_opt( 'products_bordered_grid' ), + 'products_bordered_grid_style' => woodmart_get_opt( 'products_bordered_grid_style' ), + 'products_with_background' => woodmart_get_opt( 'products_with_background' ), + 'products_shadow' => woodmart_get_opt( 'products_shadow' ), + 'products_color_scheme' => woodmart_get_opt( 'products_color_scheme' ), + ); + + woodmart_set_loop_prop( 'products_view', 'carousel' ); + + echo woodmart_generate_posts_slider( $slider_args, false, $cross_sells ); + + ?> + +
+ + + +
+
+ + cart->is_empty() ) : ?> + +
    + + cart->get_cart() as $cart_item_key => $cart_item ) { + $_i++; + if( $_i > $items_to_show ) break; + + $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); + $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); + + if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) { + /** + * This filter is documented in woocommerce/templates/cart/cart.php. + * + * @param string $product_name Name of the product in the cart. + */ + $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ); + + $product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); + $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); + ?> +
  • + + ×', + esc_url( wc_get_cart_remove_url( $cart_item_key ) ), + /* translators: %s is the product name */ + esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ), + esc_attr( $product_id ), + esc_attr( $cart_item_key ), + esc_attr( $_product->get_sku() ) + ), $cart_item_key ); + ?> + + get_image(), $cart_item, $cart_item_key ); ?> + + + get_image(), $cart_item, $cart_item_key ); ?> + + + +
    + + + + +
    + + + + + get_sku() ) : ?> + get_sku() ); ?> + + + + +
    + + + + is_sold_individually() && $_product->is_purchasable() && woodmart_get_opt( 'mini_cart_quantity' ) && apply_filters( 'woodmart_show_widget_cart_item_quantity', true, $cart_item_key ) ) { + woocommerce_quantity_input( + array( + 'input_value' => $cart_item['quantity'], + 'min_value' => 0, + 'max_value' => $_product->backorders_allowed() ? '' : $_product->get_stock_quantity(), + ), + $_product + ); + } + ?> + + ' . sprintf( '%s × %s', $cart_item['quantity'], $product_price ) . '', $cart_item, $cart_item_key ); ?> +
    + +
  • + +
+ + + +
+

+ 0 ) : ?> + + + + +
+ + + +
+
+ +
+ cart->is_empty() ) : ?> + + version, '3.7.0', '<' ) ) : ?> +

: cart->get_cart_subtotal(); ?>

+ +

+ +

+ + + + +

+ + + + + + +
diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/cart-errors.php b/wp-content/themes/cosmopet/woocommerce/checkout/cart-errors.php new file mode 100644 index 0000000..56c989d --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/cart-errors.php @@ -0,0 +1,25 @@ + + +

+ + + +

diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/form-billing.php b/wp-content/themes/cosmopet/woocommerce/checkout/form-billing.php new file mode 100644 index 0000000..dbeeb55 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/form-billing.php @@ -0,0 +1,56 @@ + +
+ cart->needs_shipping() ) : ?> + +

+ + + +

+ + + + + +
+ get_checkout_fields( 'billing' ); + + foreach ( $fields as $key => $field ) { + woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); + } + ?> +
+ + +
+ +is_registration_enabled() ) : ?> + + diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/form-checkout.php b/wp-content/themes/cosmopet/woocommerce/checkout/form-checkout.php new file mode 100644 index 0000000..d259c1d --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/form-checkout.php @@ -0,0 +1,29 @@ +checkout(); + +// In your theme's functions.php +add_filter('timber/twig', function($twig) { + $twig->addFunction(new \Twig\TwigFunction('WC', function() { + return WC(); + })); + return $twig; +}); + +// Render the Twig template +Timber::render('shop/checkout.twig', $context); \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/form-coupon.php b/wp-content/themes/cosmopet/woocommerce/checkout/form-coupon.php new file mode 100644 index 0000000..072b47d --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/form-coupon.php @@ -0,0 +1,49 @@ + + +cart->get_applied_coupons(); +if($applied_coupons){ + $first_coupon = $applied_coupons[0]; + $cText = 'Применен промокод: ' . $first_coupon; + $coupon = $applied_coupons[0]; +} +else{ + $cText = ''; + $coupon = ''; +} + +?> +
> + + +Ошибка! Промокод введен неверно или не существует. +
+ +
> + + +
\ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/form-login.php b/wp-content/themes/cosmopet/woocommerce/checkout/form-login.php new file mode 100644 index 0000000..f9b9c40 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/form-login.php @@ -0,0 +1,36 @@ + +
+ ' . esc_html__( 'Click here to login', 'woocommerce' ) . '', 'notice' ); ?> +
+ esc_html__( 'If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing section.', 'woocommerce' ), + 'redirect' => wc_get_checkout_url(), + 'hidden' => true, + ) +); diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/form-pay.php b/wp-content/themes/cosmopet/woocommerce/checkout/form-pay.php new file mode 100644 index 0000000..59d9b34 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/form-pay.php @@ -0,0 +1,109 @@ +get_order_item_totals(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited +?> +
+ + + + + + + + + + + get_items() ) > 0 ) : ?> + get_items() as $item_id => $item ) : ?> + + + + + + + + + + + + + + + + + + + +
+ get_name(), $item, false ) ); + + do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, false ); + + wc_display_item_meta( $item ); + + do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, false ); + ?> + ' . sprintf( '× %s', esc_html( $item->get_quantity() ) ) . '', $item ); ?>get_formatted_line_subtotal( $item ); ?>
+ + + +
+ needs_payment() ) : ?> +
    + $gateway ) ); + } + } else { + echo '
  • '; + wc_print_notice( apply_filters( 'woocommerce_no_available_payment_methods_message', esc_html__( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) ), 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment + echo '
  • '; + } + ?> +
+ +
+ + + + + + + ' . esc_html( $order_button_text ) . '' ); // @codingStandardsIgnoreLine ?> + + + + +
+
+
diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/form-shipping.php b/wp-content/themes/cosmopet/woocommerce/checkout/form-shipping.php new file mode 100644 index 0000000..727f9de --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/form-shipping.php @@ -0,0 +1,70 @@ + +
+ cart->needs_shipping_address() ) : ?> + +

+ +

+ +
+ + + +
+ get_checkout_fields( 'shipping' ); + + foreach ( $fields as $key => $field ) { + woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); + } + ?> +
+ + + +
+ + +
+
+ + + + + cart->needs_shipping() || wc_ship_to_billing_address_only() ) : ?> + +

+ + + +
+ get_checkout_fields( 'order' ) as $key => $field ) : ?> + get_value( $key ) ); ?> + +
+ + + + +
diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/form-verify-email.php b/wp-content/themes/cosmopet/woocommerce/checkout/form-verify-email.php new file mode 100644 index 0000000..fd86a4d --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/form-verify-email.php @@ -0,0 +1,53 @@ + +
+ + +

+ ', + '' + ); + ?> +

+ +

+ + +

+ +

+ +

+
diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/order-receipt.php b/wp-content/themes/cosmopet/woocommerce/checkout/order-receipt.php new file mode 100644 index 0000000..74b628f --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/order-receipt.php @@ -0,0 +1,19 @@ + + +

+ +

diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/payment-method.php b/wp-content/themes/cosmopet/woocommerce/checkout/payment-method.php new file mode 100644 index 0000000..05308d8 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/payment-method.php @@ -0,0 +1,33 @@ + +
  • + chosen, true ); ?> data-order_button_text="order_button_text ); ?>" /> + + + has_fields() || $gateway->get_description() ) : ?> +
    chosen ) : /* phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace */ ?>style="display:none;"> + payment_fields(); ?> +
    + +
  • diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/payment.php b/wp-content/themes/cosmopet/woocommerce/checkout/payment.php new file mode 100644 index 0000000..3b68df7 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/payment.php @@ -0,0 +1,63 @@ + +
    + cart->needs_payment() ) : ?> + + +
    + + + + + + + ' . esc_html( $order_button_text ) . '' ); // @codingStandardsIgnoreLine ?> + + + + +
    +
    + + + + + + + + + + + + + + cart->get_coupons() as $code => $coupon ) : ?> + + + + + + + cart->needs_shipping() && WC()->cart->show_shipping() ) : ?> + + + + + + + + + + + + session->get( 'chosen_shipping_methods' ); + ?> + + + + + + + + + cart->get_fees() as $fee ) : ?> + + + + + + + cart->display_prices_including_tax() ) : ?> + + cart->get_tax_totals() as $code => $tax ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited ?> + + + + + + + + + + + + + + + + + + + + + + + + +
    Товары
    ДоставкаВведите адрес доставкиcart->get_shipping_total(); ?> ₽
    name ); ?>
    label ); ?>formatted_amount ); ?>
    countries->tax_or_vat() ); ?>
    \ No newline at end of file diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/terms.php b/wp-content/themes/cosmopet/woocommerce/checkout/terms.php new file mode 100644 index 0000000..eebb91b --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/terms.php @@ -0,0 +1,43 @@ + +
    + + + + + + + +
    + + +
    + + get_id() ); + ?> + + has_status( 'failed' ) ) : ?> + +

    + +

    + + + + +

    + + + + $order ) ); ?> + + + + + + get_payment_method(), $order->get_id() ); ?> + get_id() ); ?> + + + + false ) ); ?> + + + +
    diff --git a/wp-content/themes/cosmopet/woocommerce/checkout/thankyou.php b/wp-content/themes/cosmopet/woocommerce/checkout/thankyou.php new file mode 100644 index 0000000..6019893 --- /dev/null +++ b/wp-content/themes/cosmopet/woocommerce/checkout/thankyou.php @@ -0,0 +1,108 @@ + + +
    + + + + get_id() ); ?> + + has_status( 'failed' ) ) : ?> + +

    + +

    + + + + +

    + + + +
    + + + + + +
    + + + + +

    + + + + + + + + + get_payment_method(), $order->get_id() ); ?> + get_id() ); ?> + + + + +

    + + + +