@ -0,0 +1,18 @@ |
|||||||
|
<?php defined("ABSPATH") or exit; return array ( |
||||||
|
'tokens' => |
||||||
|
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', |
||||||
|
), |
||||||
|
); |
@ -1,43 +0,0 @@ |
|||||||
<?php |
|
||||||
add_action('init', function() { |
|
||||||
pll_register_string ('Темы', 'Темы'); |
|
||||||
pll_register_string ('САМЫЕ ЧИТАЕМЫЕ', 'САМЫЕ ЧИТАЕМЫЕ'); |
|
||||||
pll_register_string ('время чтения', 'время чтения'); |
|
||||||
pll_register_string ('ВСЕ СТАТЬИ', 'ВСЕ СТАТЬИ'); |
|
||||||
pll_register_string ('ПРЕДЛОЖИТЕ СТАТЬЮ ИЛИ СТАНЬТЕ АВТОРОМ', 'ПРЕДЛОЖИТЕ СТАТЬЮ ИЛИ СТАНЬТЕ АВТОРОМ'); |
|
||||||
pll_register_string ('НАПИШИТЕ НАМ', 'НАПИШИТЕ НАМ'); |
|
||||||
pll_register_string ('COSMO тема редакции', 'COSMO тема редакции'); |
|
||||||
pll_register_string ('мин.', 'мин.'); |
|
||||||
pll_register_string ('Форма обратной связи', 'Форма обратной связи'); |
|
||||||
pll_register_string ('Ваше имя', 'Ваше имя'); |
|
||||||
pll_register_string ('Эл.почта', 'Эл.почта'); |
|
||||||
pll_register_string ('Текст обращения', 'Текст обращения'); |
|
||||||
pll_register_string ('Отправить', 'Отправить'); |
|
||||||
pll_register_string ('Чат бот с ветеринаром', 'Чат бот с ветеринаром'); |
|
||||||
pll_register_string ('Калькулятор рациона', 'Калькулятор рациона'); |
|
||||||
pll_register_string ('ПОКАЗАТЬ ЕЩЁ', 'ПОКАЗАТЬ ЕЩЁ'); |
|
||||||
pll_register_string ('ВСЕ', 'ВСЕ'); |
|
||||||
pll_register_string ('читать статью', 'читать статью'); |
|
||||||
pll_register_string ('Блог', 'Блог'); |
|
||||||
pll_register_string ('Главная', 'Главная'); |
|
||||||
pll_register_string ('Подпишитесь, чтобы быть в курсе деятельности Cosmopet и узнавать о наших, предложениях. Обещаем не заваливать вас бесполезными письмами. А за подписку дарим -25% на весь ассортимент нашей продукции', 'Подпишитесь, чтобы быть в курсе деятельности Cosmopet и узнавать о наших предложениях. Обещаем не заваливать вас бесполезными письмами. А за подписку дарим -25% на весь ассортимент нашей продукции'); |
|
||||||
pll_register_string ('Подписываясь на рассылку, я даю согласие на обработку персональных данных, на получение рекламных сообщений и новостей о товарах и услугах', 'Подписываясь на рассылку, я даю согласие на обработку персональных данных, на получение рекламных сообщений и новостей о товарах и услугах'); |
|
||||||
pll_register_string ('подписаться', 'подписаться'); |
|
||||||
pll_register_string ('Узнайте о нас больше и получите <span>скидку!</span>', 'Узнайте о нас больше и получите <span>скидку!</span>'); |
|
||||||
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 ('Узнать больше', 'Узнать больше'); |
|
||||||
}); |
|
||||||
|
|
@ -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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
@ -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');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
@ -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
|
@ -1,40 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html lang="ru"> |
|
||||||
<head> |
|
||||||
<meta charset="UTF-8"> |
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
||||||
<title></title> |
|
||||||
<meta name="description" content=""> |
|
||||||
|
|
||||||
<!-- Яндекс.Вебмастер + Google Search Console --> |
|
||||||
|
|
||||||
<!-- /Яндекс.Вебмастер + Google Search Console --> |
|
||||||
|
|
||||||
<!-- Yandex.Metrika counter --> |
|
||||||
|
|
||||||
<!-- /Yandex.Metrika counter --> |
|
||||||
{{ function('wp_head') }} |
|
||||||
</head> |
|
||||||
|
|
||||||
<body> |
|
||||||
|
|
||||||
|
|
||||||
{% if current_lang == 'en' %} |
|
||||||
{% include 'header/module.template_ENG.twig' %} |
|
||||||
{% elseif current_lang == 'fr' %} |
|
||||||
{% else %} |
|
||||||
{% include 'header/module.template_RU.twig' %} |
|
||||||
{% endif %} |
|
||||||
|
|
||||||
|
|
||||||
<main class="{{ bodyClass }}"> |
|
||||||
{% block content %} |
|
||||||
{% endblock %} |
|
||||||
</main> |
|
||||||
|
|
||||||
{% include 'footer/module.template.twig' %} |
|
||||||
</div> |
|
||||||
{{ function('wp_footer') }} |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,60 +0,0 @@ |
|||||||
{% set current_path = template_path ~ '/modules/footer' %} |
|
||||||
<footer class="footer"> |
|
||||||
<div class="container"> |
|
||||||
<div class="footer-top"> |
|
||||||
<div class="footer-content__wrap"> |
|
||||||
<div class="footer-content"> |
|
||||||
<a href="/" class="logo"> |
|
||||||
<img src="{{ current_path }}/assets/img/logo-green.svg" alt=""> |
|
||||||
<span>сosmopet</span> |
|
||||||
</a> |
|
||||||
<p class="footer-content__address"> |
|
||||||
{{adres}} |
|
||||||
</p> |
|
||||||
<ul> |
|
||||||
{% for item in email_list %} |
|
||||||
<li> |
|
||||||
<p>{{item.name}}</p> |
|
||||||
<a href="mailto:{{item.email}}">{{item.email}}</a> |
|
||||||
</li> |
|
||||||
{% endfor %} |
|
||||||
</ul> |
|
||||||
</div> |
|
||||||
<div class="footer-top__link"> |
|
||||||
<a href="#" class="link-black">{{ function('pll_e', 'Чат бот с ветеринаром') }}</a> |
|
||||||
<a href="#" class="link-white">{{ function('pll_e', 'Калькулятор рациона') }}</a> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<form class="footer-contact"> |
|
||||||
<h3 class="footer-contact__title">{{ function('pll_e', 'Форма обратной связи') }}</h3> |
|
||||||
<input type="text" placeholder="{{ function('pll_e', 'Ваше имя') }}" class="form-inp"> |
|
||||||
<input type="email" placeholder="{{ function('pll_e', 'Эл.почта') }}" class="form-inp"> |
|
||||||
<textarea class="form-textarea" name="" placeholder="{{ function('pll_e', 'Текст обращения') }}" id=""></textarea> |
|
||||||
<button class="footer-contact__submit" type="submit">{{ function('pll_e', 'Отправить') }}</button> |
|
||||||
</form> |
|
||||||
</div> |
|
||||||
<div class="footer-bottom"> |
|
||||||
<ul class="footer-network"> |
|
||||||
<li> |
|
||||||
<a href="#"> |
|
||||||
<img src="{{ current_path }}/assets/img/footer-network-1.svg" alt=""> |
|
||||||
</a> |
|
||||||
</li> |
|
||||||
<li> |
|
||||||
<a href="#"> |
|
||||||
<img src="{{ current_path }}/assets/img/footer-network-2.svg" alt=""> |
|
||||||
</a> |
|
||||||
</li> |
|
||||||
<li> |
|
||||||
<a href="#"> |
|
||||||
<img src="{{ current_path }}/assets/img/footer-network-3.svg" alt=""> |
|
||||||
</a> |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
<a href="#">Соглашение о конфиденциальности</a> |
|
||||||
<a href="#">Декларация соответствия корма</a> |
|
||||||
<a href="#">Декларация соответствия лакомств</a> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</footer> |
|
||||||
<!-- Footer end --> |
|
@ -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(` |
||||||
|
<p class="modal-basket-item__title"> |
||||||
|
Удаление товара из корзины: <span id="${key}_timer" class="timer_counter">5</span>с |
||||||
|
</p> |
||||||
|
<div class="modal-basket-item__return-wrapper"> |
||||||
|
<button class="modal-basket-item__return" data-key="${key}"> |
||||||
|
${woocommerce_params.i18n_restore_item || 'Restore'} |
||||||
|
</button> |
||||||
|
</div> |
||||||
|
`);
|
||||||
|
|
||||||
|
// Удаляем через 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); |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
@ -0,0 +1,8 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
add_filter('woocommerce_get_script_data', 'add_custom_woocommerce_params', 10, 2); |
||||||
|
function add_custom_woocommerce_params($params, $handle) { |
||||||
|
// Добавляем только для скрипта корзины |
||||||
|
$params['i18n_restore_item'] = pll__('Восстановить'); |
||||||
|
return $params; |
||||||
|
} |
@ -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 ='<p>Не удалось получить доступные методы доставки! <br>Укажите свой город для получения доступных методов.</p>' |
||||||
|
} |
||||||
|
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('<span class="error-message">' + errorMessage + '</span>'); |
||||||
|
$('#' + 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() |
||||||
|
}) |
||||||
|
}); |
||||||
|
|
@ -0,0 +1,11 @@ |
|||||||
|
<?php |
||||||
|
/** |
||||||
|
* The template for displaying all pages. |
||||||
|
* |
||||||
|
* This is the template that renders pages using Timber (Twig). |
||||||
|
*/ |
||||||
|
|
||||||
|
$context = Timber::context(); |
||||||
|
$context['post'] = Timber::get_post(); |
||||||
|
|
||||||
|
Timber::render('page.twig', $context); |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 502 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 459 B |
After Width: | Height: | Size: 493 B |
After Width: | Height: | Size: 491 B |
After Width: | Height: | Size: 481 B |
After Width: | Height: | Size: 456 B |
After Width: | Height: | Size: 458 B |
After Width: | Height: | Size: 458 B |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 954 B |
After Width: | Height: | Size: 983 B |
After Width: | Height: | Size: 455 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 349 B |
After Width: | Height: | Size: 455 B |
After Width: | Height: | Size: 453 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 168 B |
After Width: | Height: | Size: 584 B |
After Width: | Height: | Size: 695 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 623 B |
After Width: | Height: | Size: 855 B |
After Width: | Height: | Size: 1.4 KiB |
@ -1,25 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html lang="ru"> |
|
||||||
<head> |
|
||||||
{{ function('wp_head') }} |
|
||||||
<title>{{ function('wp_title') }} </title> |
|
||||||
<meta charset="UTF-8"> |
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
||||||
</head> |
|
||||||
|
|
||||||
<body class="{{bodyClass}}"> |
|
||||||
|
|
||||||
|
|
||||||
{% include 'header.twig' %} |
|
||||||
|
|
||||||
<main class="{{ mainClass }}"> |
|
||||||
{% block content %} |
|
||||||
{% endblock %} |
|
||||||
</main> |
|
||||||
|
|
||||||
{% include 'footer.twig' %} |
|
||||||
</div> |
|
||||||
{{ function('wp_footer') }} |
|
||||||
</body> |
|
||||||
</html> |
|
@ -0,0 +1,68 @@ |
|||||||
|
<div class="modal"> |
||||||
|
<aside class="modal__aside"> |
||||||
|
<div class="modal__item modal__filter"> |
||||||
|
<button class="modal__close"> |
||||||
|
<img src="assets/img/svg/main/black-x.svg" alt=""> |
||||||
|
</button> |
||||||
|
|
||||||
|
<div class="modal__header"> |
||||||
|
<p class="modal__title">Фильтры</p> |
||||||
|
{{sidebar_filters}} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
{% include 'modal/basket.twig' %} |
||||||
|
|
||||||
|
<div class="modal__item modal__to-know modal__item--no-title"> |
||||||
|
<button class="modal__close"> |
||||||
|
<img src="assets/img/svg/main/black-x.svg" alt=""> |
||||||
|
</button> |
||||||
|
<div class="modal__header"> |
||||||
|
<p class="modal__small-title">Узнать о поступлении</p> |
||||||
|
<p class="modal__text"> |
||||||
|
Оставьте свой e-mail, и мы оповестим вас, когда продукт появится |
||||||
|
</p> |
||||||
|
|
||||||
|
<form action="" class="modal__form-sub"> |
||||||
|
<div class="label"> |
||||||
|
<label for="mail" class="label__title"> |
||||||
|
mail |
||||||
|
</label> |
||||||
|
|
||||||
|
<div class="label__question"> |
||||||
|
text <br> |
||||||
|
re |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<input type="text" class="form__input" id="mail" placeholder="Email"> |
||||||
|
<div class="checkbox checkbox--small"> |
||||||
|
<div class="checkbox__state"></div> |
||||||
|
<input type="checkbox" name="" id="" class="checkbox__input"> |
||||||
|
<label for="" class="checkbox__label"> |
||||||
|
Я ознакомился с <a href="#">политикой обработки персональных данных</a> и <a href="#">пользовательским соглашением</a> |
||||||
|
</label> |
||||||
|
</div> |
||||||
|
|
||||||
|
<input type="submit" value="Оставить почту" class="button button--white button--red-48-px button--100-perc active modal-form-sub__submit"> |
||||||
|
</form> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="modal__item modal__to-know-submit modal__item--no-title"> |
||||||
|
<button class="modal__close"> |
||||||
|
<img src="assets/img/svg/main/black-x.svg" alt=""> |
||||||
|
</button> |
||||||
|
<div class="modal__header"> |
||||||
|
<p class="modal__small-title">Подписка на товар оформлена</p> |
||||||
|
<p class="modal__text"> |
||||||
|
На ваш e-mail ivan.ivanov@gmail.com придет письмо, как только продукт появится в наличии. |
||||||
|
</p> |
||||||
|
<button class="button button--white button--red-48-px button--100-perc active modal-form-sub__submit"> |
||||||
|
Продолжить покупки |
||||||
|
</button> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
</aside> |
||||||
|
</div> |
@ -0,0 +1,47 @@ |
|||||||
|
<div id="modal-basket" class="modal__item modal__basket"> |
||||||
|
<button class="modal__close"> |
||||||
|
<img src="{{ theme.link }}/static/img/svg/main/black-x.svg" alt="{{ __('Close cart', 'your-theme') }}"> |
||||||
|
</button> |
||||||
|
|
||||||
|
<div class="modal-basket__loading"> |
||||||
|
<div class="modal-basket__loader"></div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="modal__header"> |
||||||
|
<p class="modal__title">{{ __('Cart', 'woocommerce') }}</p> |
||||||
|
|
||||||
|
<div class="modal__content" id="modal-basket-content"> |
||||||
|
{% include 'shop/cart-contents.twig' %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
{% if not fn('WC').cart.is_empty %} |
||||||
|
<div class="modal__footer" id="modal-basket-footer"> |
||||||
|
<div class="modal__block-price"> |
||||||
|
<p class="modal-block-price__title">{{ __('Total', 'woocommerce') }}</p> |
||||||
|
<p class="modal-block-price__price"> |
||||||
|
{{ fn('wc_cart_totals_order_total_html') }} |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="modal__block-button"> |
||||||
|
<div class="modal__button"> |
||||||
|
<a href="{{ fn('wc_get_checkout_url') }}" class="button button--gradient button--high button--100-perc"> |
||||||
|
{{ __('Proceed to checkout', 'woocommerce') }} |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% else %} |
||||||
|
<div class="modal__footer" id="modal-basket-footer"> |
||||||
|
<div class="modal__block-button"> |
||||||
|
<a href="/shop/" class="modal__button"> |
||||||
|
<button class="to-know button--100-perc to-know--background-none continue-shopping"> |
||||||
|
<p>{{ __('Continue shopping', 'woocommerce') }}</p> |
||||||
|
</button> |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
{% endif %} |
||||||
|
</div> |
@ -0,0 +1,9 @@ |
|||||||
|
{% set bodyClass = 'bg-white' %} |
||||||
|
{% set mainClass = 'wrapper' %} |
||||||
|
{% extends 'layout.twig' %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
|
||||||
|
{{ post.content }} |
||||||
|
|
||||||
|
{% endblock %} |
@ -0,0 +1,45 @@ |
|||||||
|
{% if cart.is_empty %} |
||||||
|
<p class="cart-empty">{{ function('pll_e', 'Ваша корзина пуста') }}</p> |
||||||
|
{% else %} |
||||||
|
{% for item_key, item in cart.get_cart %} |
||||||
|
{% set product = item.data %} |
||||||
|
<div class="modal-basket__item" data-key="{{ item.key }}" data-product_id="{{ item.product_id }}" data-variation_id="{{ item.variation_id }}"> |
||||||
|
<div class="modal-basket-item__block-image"> |
||||||
|
{{ product.get_image }} |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="modal-basket-item__content"> |
||||||
|
<p class="modal-basket-item__title">{{ product.get_name }}</p> |
||||||
|
|
||||||
|
<p class="modal-basket-item__sub-title"> |
||||||
|
{{ fn('wc_get_formatted_cart_item_data', item) }} |
||||||
|
</p> |
||||||
|
|
||||||
|
<div class="modal-basket-item__control"> |
||||||
|
<div class="counter counter--small"> |
||||||
|
<button class="counter__button minus" data-key="{{ item_key }}"> |
||||||
|
<img src="{{ theme.link }}/static/img/svg/main/minus.svg" alt="{{ __('Decrease quantity', 'your-theme') }}"> |
||||||
|
</button> |
||||||
|
|
||||||
|
<input type="text" class="counter__input" |
||||||
|
value="{{ item.quantity }}" |
||||||
|
data-key="{{ item_key }}"> |
||||||
|
|
||||||
|
<button class="counter__button plus" data-key="{{ item_key }}"> |
||||||
|
<img src="{{ theme.link }}/static/img/svg/main/plus.svg" alt="{{ __('Increase quantity', 'your-theme') }}"> |
||||||
|
</button> |
||||||
|
</div> |
||||||
|
|
||||||
|
<p class="modal-basket-item__price"> |
||||||
|
{{ fn('wc_price', item.line_total + item.line_tax) }} |
||||||
|
</p> |
||||||
|
|
||||||
|
<button class="remove-item" data-key="{{ item_key }}"> |
||||||
|
<img src="{{ theme.link }}/static/img/svg/main/basket.svg" alt="{{ __('Remove item', 'your-theme') }}"> |
||||||
|
</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endfor %} |
||||||
|
{% endif %} |
||||||
|
|
@ -0,0 +1,151 @@ |
|||||||
|
{# templates/woocommerce/checkout/form-checkout.twig #} |
||||||
|
|
||||||
|
<form action="" class="checkout woocommerce-checkout"> |
||||||
|
<div class="order checkout woocommerce-checkout"> |
||||||
|
<div id="recipient" class="order__contacts"> |
||||||
|
<div class="order-contacts__header"> |
||||||
|
<p class="order__title"> |
||||||
|
{{ fn('pll_e', 'Контакты получателя') }} |
||||||
|
</p> |
||||||
|
{% if fn('is_user_logged_in') %} |
||||||
|
<a href="{{ fn('wp_logout_url', fn('wc_get_checkout_url')) }}" class="cabinet-card__button"> |
||||||
|
{{ fn('pll_e', 'Выйти') }} |
||||||
|
</a> |
||||||
|
{% else %} |
||||||
|
<button type="button" class="cabinet-card__button login-open"> |
||||||
|
{{ fn('pll_e', 'Войти') }} |
||||||
|
</button> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
<div id="acc-error" class="form-input__error"><span class="error-message"></span></div> |
||||||
|
<div class="order-contacts__form"> |
||||||
|
{{ fn('do_action', 'woocommerce_checkout_billing') }} |
||||||
|
</div> |
||||||
|
|
||||||
|
{% set chosen_methods = WC().session.get('chosen_shipping_methods') %} |
||||||
|
{% set shipping_method = chosen_methods[0] ? chosen_methods[0] : fn('pll_e', 'Не выбран') %} |
||||||
|
|
||||||
|
<div class="order-contacts__delivery"> |
||||||
|
<p class="order__title">{{ fn('pll_e', 'Доставка') }}</p> |
||||||
|
|
||||||
|
<div id="custom-shipping-methods" class="modal-map__control modal-map__control--delivery"></div> |
||||||
|
|
||||||
|
<div class="modal-map__address"> |
||||||
|
<div data-remote="official_cdek:136" class="shipping-add-info remote-control__item {% if shipping_method == 'official_cdek:136' %}active{% endif %}"> |
||||||
|
<div class="order-contacts-deliver__item"> |
||||||
|
<div class="modal-form-content-line__element modal-form-content-line__element--arrow"> |
||||||
|
<label class="label-name">{{ fn('pll_e', 'Пункт выдачи') }}</label> |
||||||
|
<input id="pvz_inp" class="form__input form__input--grey form-open mandatory input-read" type="text" name="" placeholder="{{ fn('pll_e', 'Выберите пункт выдачи') }}" required="" data-form="form-point" autocomplete="none"> |
||||||
|
</div> |
||||||
|
<div id="pvz-error" class="form-input__error"><span class="error-message"></span></div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div data-remote="official_cdek:137" class="shipping-add-info remote-control__item {% if shipping_method == 'official_cdek:137' %}active{% endif %}"> |
||||||
|
<div class="order-contacts-deliver__item"> |
||||||
|
<div class="modal-form-content-line__element modal-form-content-line__element--arrow"> |
||||||
|
<label class="label-name">{{ fn('pll_e', 'Адрес доставки') }}</label> |
||||||
|
<input class="form__input form__input--grey form-open mandatory input-read" id="addr_inp" type="text" name="name" placeholder="{{ fn('pll_e', 'Выберите адрес доставки') }}" data-form="form-address" autocomplete="none"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div id="adr-error" class="form-input__error"><span class="error-message"></span></div> |
||||||
|
<div class="order-contacts-deliver__item"> |
||||||
|
<div class="modal-form-content-line__element"> |
||||||
|
<label for="firstname" class="label-name">{{ fn('pll_e', 'Комментарий для доставки') }}</label> |
||||||
|
<textarea id="firstname" class="form__input form__input--textarea-72 form__input--grey" type="text" name="name" placeholder="{{ fn('pll_e', 'Для службы доставки') }}"></textarea> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="order__your"> |
||||||
|
<p class="order__title">{{ fn('pll_e', 'Ваш заказ') }}</p> |
||||||
|
<div class="order-your__products"> |
||||||
|
{% 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) %} |
||||||
|
<div class="order-your-products__item"> |
||||||
|
<div class="order-your-products__left"> |
||||||
|
<img src="{{ fn('wp_get_attachment_url', thumbnail_id) }}" alt="" class="order-your-products__img"> |
||||||
|
<div class="order-your-products__content"> |
||||||
|
<a href="{{ product.get_permalink() }}" class="order-your-products__name">{{ product.get_name() }}</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="order-your-products__right"> |
||||||
|
<p class="order-your-products__count"> |
||||||
|
{{ cart_item.quantity }} |
||||||
|
</p> |
||||||
|
<p class="order-your-products__price"> |
||||||
|
{{ fn('apply_filters', 'woocommerce_cart_item_subtotal', WC().cart.get_product_subtotal(product, cart_item.quantity), cart_item, cart_item_key) }} |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endif %} |
||||||
|
{% endfor %} |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="order-your__calculation"> |
||||||
|
{{ fn('woocommerce_checkout_coupon_form') }} |
||||||
|
|
||||||
|
<div id="order_review" class="woocommerce-checkout-review-order"> |
||||||
|
{{ fn('do_action', 'woocommerce_checkout_order_review') }} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
|
||||||
|
<div class="modalProfile" id="address_input"> |
||||||
|
<div class="popup-wrap"> |
||||||
|
<div class="modal-form form__full-mobile modal-form--white modal-form--height-100-phone form-data active"> |
||||||
|
<button class="modal-form__close"></button> |
||||||
|
<p class="modal-form__title">{{ fn('pll_e', 'Адрес') }}</p> |
||||||
|
|
||||||
|
<div class="modal-form__content" method="post" action="/send-telegram.php"> |
||||||
|
<div class="modal-form-content-line__element"> |
||||||
|
<label for="address" class="label-name">{{ fn('pll_e', 'Адрес') }}</label> |
||||||
|
<input id="f_address" class="form__input" type="text" placeholder="{{ fn('pll_e', 'Начните вводить ваш адрес') }}" required=""> |
||||||
|
<span class="form-input__error form-input__error--absolute">{{ fn('pll_e', 'Адрес введен неверно') }}</span> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="modal-form-content__line modal-form-content__line--two-mobile"> |
||||||
|
<div class="modal-form-content-line__element"> |
||||||
|
<label for="apartment" class="label-name">{{ fn('pll_e', 'Квартира') }}</label> |
||||||
|
<input id="f_apartment" class="form__input" type="text" placeholder="{{ fn('pll_e', 'Квартира') }}" required=""> |
||||||
|
<span class="form-input__error form-input__error--absolute">{{ fn('pll_e', 'Квартира введено неверно') }}</span> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="modal-form-content-line__element"> |
||||||
|
<label for="floor" class="label-name">{{ fn('pll_e', 'Этаж') }}</label> |
||||||
|
<input id="f_floor" class="form__input" type="text" placeholder="{{ fn('pll_e', 'Этаж') }}" required=""> |
||||||
|
<span class="form-input__error form-input__error--absolute">{{ fn('pll_e', 'Этаж введен неверно') }}</span> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="modal-form-content__line modal-form-content__line--two-mobile"> |
||||||
|
<div class="modal-form-content-line__element"> |
||||||
|
<label for="entrance" class="label-name">{{ fn('pll_e', 'Подъезд') }}</label> |
||||||
|
<input id="f_entrance" class="form__input" type="text" placeholder="{{ fn('pll_e', 'Подъезд') }}" required=""> |
||||||
|
<span class="form-input__error form-input__error--absolute">{{ fn('pll_e', 'Подъезд введен неверно') }}</span> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="modal-form-content-line__element"> |
||||||
|
<label for="number-phone" class="label-name">{{ fn('pll_e', 'Домофон') }}</label> |
||||||
|
<input id="f_number-phone" class="form__input" type="text" placeholder="{{ fn('pll_e', 'Код домофона') }}" required=""> |
||||||
|
<span class="form-input__error form-input__error--absolute">{{ fn('pll_e', 'Код домофона введен неверно') }}</span> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="modal-form__buttons"> |
||||||
|
<button class="button button--gradient button--high button--100-perc close-btn"> |
||||||
|
<span>{{ fn('pll_e', 'Доставить сюда') }}</span> |
||||||
|
</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
@ -1 +0,0 @@ |
|||||||
123 |
|
@ -0,0 +1,66 @@ |
|||||||
|
<table class="shop_table woocommerce-checkout-review-order-table"> |
||||||
|
<tfoot> |
||||||
|
<tr class="order-your-calculation__item"> |
||||||
|
<th class="order-your-calculation__title">{{ pll_e('Товары') }}</th> |
||||||
|
<td class="order-your-calculation__value order-your-calculation__value--price">{{ fn('wc_cart_totals_subtotal_html') }}</td> |
||||||
|
</tr> |
||||||
|
|
||||||
|
{% for code, coupon in fn('WC').cart.get_coupons() %} |
||||||
|
<tr class="order-your-calculation__item cart-discount coupon-{{ code|sanitize_title|e('html_attr') }}"> |
||||||
|
<th class="order-your-calculation__title">{{ fn('wc_cart_totals_coupon_label', coupon) }}</th> |
||||||
|
<td class="order-your-calculation__value order-your-calculation__value--price order-your-calculation__value--discount">{{ fn('wc_cart_totals_coupon_html', coupon) }}</td> |
||||||
|
</tr> |
||||||
|
{% 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 %} |
||||||
|
|
||||||
|
<tr class="order-your-calculation__item"> |
||||||
|
<th class="order-your-calculation__title">{{ fn('pll_e', 'Доставка') }}</th> |
||||||
|
{% set chosen_shipping_methods = fn('WC').session.get('chosen_shipping_methods') %} |
||||||
|
{% if not chosen_shipping_methods[0] is defined %} |
||||||
|
<td class="order-your-calculation__description">{{ fn('pll_e', 'Введите адрес доставки') }}</td> |
||||||
|
{% else %} |
||||||
|
<td class="order-your-calculation__value order-your-calculation__value--price">{{ fn('WC').cart.get_shipping_total() }} ₽</td> |
||||||
|
{% endif %} |
||||||
|
</tr> |
||||||
|
|
||||||
|
{% for fee in fn('WC').cart.get_fees() %} |
||||||
|
<tr class="fee"> |
||||||
|
<th>{{ fee.name|e }}</th> |
||||||
|
<td>{{ fn('wc_cart_totals_fee_html', fee) }}</td> |
||||||
|
</tr> |
||||||
|
{% 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() %} |
||||||
|
<tr class="tax-rate tax-rate-{{ code|sanitize_title|e('html_attr') }}"> |
||||||
|
<th>{{ tax.label|e }}</th> |
||||||
|
<td>{{ tax.formatted_amount|raw }}</td> |
||||||
|
</tr> |
||||||
|
{% endfor %} |
||||||
|
{% else %} |
||||||
|
<tr class="tax-total"> |
||||||
|
<th>{{ fn('WC').countries.tax_or_vat()|e }}</th> |
||||||
|
<td>{{ fn('wc_cart_totals_taxes_total_html') }}</td> |
||||||
|
</tr> |
||||||
|
{% endif %} |
||||||
|
{% endif %} |
||||||
|
|
||||||
|
{{ do_action('woocommerce_review_order_before_order_total') }} |
||||||
|
|
||||||
|
<tr class="order-your-calculation__line"></tr> |
||||||
|
<tr class="order-your-calculation__item"> |
||||||
|
<th class="order-your-calculation__result">{{ fn('pll_e', 'Total') }}</th> |
||||||
|
<td class="order-your-calculation__result order-your-calculation__value--price">{{ fn('wc_cart_totals_order_total_html') }}</td> |
||||||
|
</tr> |
||||||
|
|
||||||
|
{{ do_action('woocommerce_review_order_after_order_total') }} |
||||||
|
</tfoot> |
||||||
|
</table> |
@ -1 +0,0 @@ |
|||||||
123 |
|