Merge из web_10 на RU стенде от 6.06.2025

pull/29/head
commit 0db6c60878
  1. 200
      wp-content/themes/cosmopet/modules/blog/components/editorial/assets/css/style.css
  2. 957
      wp-content/themes/cosmopet/modules/footer/assets/js/footer.js
  3. 3240
      wp-content/themes/cosmopet/modules/profile/assets/css/profile.css
  4. BIN
      wp-content/themes/cosmopet/modules/profile/assets/img/modal/about_slider.png
  5. BIN
      wp-content/themes/cosmopet/modules/profile/assets/img/pet/cat.png
  6. BIN
      wp-content/themes/cosmopet/modules/profile/assets/img/pet/dog.png
  7. BIN
      wp-content/themes/cosmopet/modules/profile/assets/img/pet/mini-cat.png
  8. BIN
      wp-content/themes/cosmopet/modules/profile/assets/img/pet/mini-dog.png
  9. BIN
      wp-content/themes/cosmopet/modules/profile/assets/img/product/image.png
  10. BIN
      wp-content/themes/cosmopet/modules/profile/assets/img/product/mini-card.png
  11. 13
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/country/ar.svg
  12. 13
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/country/ru.svg
  13. 4
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/logo/logo-black.svg
  14. 18
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/logo/logo-gradient.svg
  15. 4
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/logo/logo-white.svg
  16. 5
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/arrow-back.svg
  17. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/arrow-black.svg
  18. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/arrow-breadcrumbs-black.svg
  19. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/arrow-breadcrumbs.svg
  20. 5
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/arrow-left.svg
  21. 5
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/arrow-right.svg
  22. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/arrow-selected-white.svg
  23. 11
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/arrow-selected.svg
  24. 13
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/basket.svg
  25. 11
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/black-x.svg
  26. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/change-dot.svg
  27. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/filter.svg
  28. 6
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/google-white.svg
  29. 11
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/gradient-x.svg
  30. 10
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/minus.svg
  31. 11
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/plus-grey.svg
  32. 11
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/plus.svg
  33. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/question.svg
  34. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/status-cancelled.svg
  35. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/status-chek.svg
  36. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/triangle-grey.svg
  37. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/vk-white.svg
  38. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/white-x.svg
  39. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/main/ya-white.svg
  40. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/mini-profile/basket-w.svg
  41. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/mini-profile/basket.svg
  42. 4
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/mini-profile/profile-w.svg
  43. 4
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/mini-profile/profile.svg
  44. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/social-media/tg.svg
  45. 3
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/social-media/vk.svg
  46. 6
      wp-content/themes/cosmopet/modules/profile/assets/img/svg/social-media/ya.svg
  47. 96
      wp-content/themes/cosmopet/modules/profile/assets/js/profile.js
  48. 193
      wp-content/themes/cosmopet/modules/profile/components/profile/component-controller.php
  49. 143
      wp-content/themes/cosmopet/modules/profile/components/subscription_single/component-controller.php
  50. 107
      wp-content/themes/cosmopet/modules/profile/components/subscriptions/component-controller.php
  51. 134
      wp-content/themes/cosmopet/modules/profile/module-ajax-controller.php
  52. 2
      wp-content/themes/cosmopet/modules/profile/module-controller.php
  53. 142
      wp-content/themes/cosmopet/modules/shop/components/cart/assets/js/cart.js
  54. 36
      wp-content/themes/cosmopet/modules/shop/components/checkout/assets/css/checkout.css
  55. 173
      wp-content/themes/cosmopet/modules/shop/components/checkout/assets/js/script.js
  56. 65
      wp-content/themes/cosmopet/static/assets/css/thankyou.css
  57. 55
      wp-content/themes/cosmopet/static/assets/js/telegram-auth.js
  58. BIN
      wp-content/themes/cosmopet/static/img/pet/mini-cat.png
  59. 47
      wp-content/themes/cosmopet/templates/modal/basket.twig
  60. 51
      wp-content/themes/cosmopet/templates/modal/login.twig
  61. 611
      wp-content/themes/cosmopet/templates/profile/profile-base.twig
  62. 106
      wp-content/themes/cosmopet/templates/profile/profile-orders.twig
  63. 133
      wp-content/themes/cosmopet/templates/profile/profile-subs-single.twig
  64. 78
      wp-content/themes/cosmopet/templates/profile/profile-subs.twig
  65. 414
      wp-content/themes/cosmopet/templates/profile/profile.twig
  66. 0
      wp-content/themes/cosmopet/templates/profile/template-profile.php
  67. 502
      wp-content/themes/cosmopet/templates/where_to_buy/template_wtb.php
  68. 0
      wp-content/themes/cosmopet/templates/where_to_buy/wtb.twig
  69. 29
      wp-content/themes/cosmopet/woocommerce/assets/js/gp-main.js
  70. 2
      wp-content/themes/cosmopet/woocommerce/cart/cart-shipping.php
  71. 47
      wp-content/themes/cosmopet/woocommerce/checkout/order-receipt.php
  72. 90
      wp-content/themes/cosmopet/woocommerce/checkout/thankyou copy.php
  73. 108
      wp-content/themes/cosmopet/woocommerce/checkout/thankyou.php
  74. 119
      wp-content/themes/cosmopet/woocommerce/myaccount/form-login.php
  75. 4
      wp-content/themes/cosmopet/woocommerce/myaccount/my-account.php
  76. 93
      wp-content/themes/cosmopet/woocommerce/myaccount/my-address.php
  77. 0
      wp-content/themes/cosmopet/woocommerce/myaccount/my-subscriptions.php

@ -0,0 +1,200 @@
/* Editorial */
.editorial {
padding-bottom: 68px;
}
.editorial-head {
position: relative;
z-index: 1;
max-width: 841px;
margin-bottom: 37px;
}
.editorial-head__title {
font-size: 82px;
line-height: 96px;
font-weight: bold;
color: var(--main_white);
text-transform: uppercase;
}
.editorial-head__img {
position: absolute;
z-index: -1;
top: -14px;
right: -20px;
width: 221px;
}
.editorial-head__star {
position: absolute;
top: 8.26px;
right: -13.5px;
transform: translateX(100%);
width: 87.5px;
}
.editorial-card__wrap {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 31px 25px;
position: relative;
z-index: 1;
}
.editorial-card {
border: 2px solid var(--creme-white);
border-radius: 30px;
display: flex;
align-items: stretch;
overflow: hidden;
background: var(--linear);
backdrop-filter: blur(28px);
}
.editorial-card .main-img {
min-height: 282px;
width: 207px;
border-radius: 29px;
overflow: hidden;
flex-shrink: 0;
}
.editorial-card:hover .main-img img{
width: 120%;
height: 120%;
}
.editorial-card .main-img img {
width: 100%;
height: 100%;
object-fit: cover;
transition: all .5s;
}
.editorial-card__content {
padding: 42px 19px 19px 35px;
}
.editorial-card__content-alerts {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 7px;
margin-bottom: 17px;
}
.editorial-card__content-alerts a {
background: var(--main_black);
border-radius: 16px;
padding: 6px 8px;
font-size: 16px;
font-weight: 500;
line-height: 20px;
color: var(--background);
}
.editorial-card__content-title {
font-size: 28px;
font-weight: bold;
line-height: 32px;
color: var(--grey-black);
text-transform: uppercase;
margin-bottom: 17px;
}
.editorial-card__content-data {
display: flex;
flex-wrap: wrap;
gap: 5px 16px;
color: var(--interface_hover);
font-size: 16px;
font-weight: 500;
line-height: 20px;
}
.editorial-card__content-data ul {
display: flex;
align-items: center;
gap: 16px;
}
.editorial-card__content-data li {
display: flex;
align-items: center;
gap: 5px;
}
.editorial-card__content-data .logo img {
width: 24px;
height: 24px;
border-radius: 50%;
object-fit: cover;
}
/* Editorial end */
@media (max-width: 1200px) {
.editorial-card__wrap {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
}
@media (max-width: 992px) {
.editorial {
padding-bottom: 36px;
}
.editorial-head {
margin-bottom: 36px;
max-width: 313px;
}
.editorial-head__title {
font-size: 32px;
line-height: 38px;
}
.editorial-head__img {
width: 100px;
top: -14px;
right: -22.5px;
}
.editorial-head__star {
display: none;
}
}
@media (max-width: 576px) {
.editorial-card {
flex-direction: column;
border-radius: 30px;
position: relative;
}
.editorial-card .main-img {
width: 100%;
height: 203px;
}
.editorial-card__content {
padding: 17px 13px 24px;
}
.editorial-card__content-alerts {
position: absolute;
top: 13px;
left: 8px;
width: calc(100% - 16px);
}
.editorial-card__content-title {
font-size: 20px;
line-height: 24px;
margin-bottom: 17px;
}
.editorial-card__content-data {
gap: 5px 16px;
}
}

@ -0,0 +1,957 @@
'use strict';
(function ($) {
const metaLocale = document.querySelector('meta[property="og:locale"]');
const localeValue = metaLocale.getAttribute('content');
function wc_cart_summary_upd(){
let total = 0
$('.cart_item').each(function(){
total += Number($(this).data('cost'))
})
return total
}
$('[data-pname]').on('click', function(){
$('#sub_product_name').val($(this).data('pname'))
})
$(document).on('submit', '.product-item__form, .detail-block__form', function (e) {
e.preventDefault();
var $form = $(this)
var product_qty = $form.find('input[name=quantity]').val() || 1
var product_id = $form.find('input[name=product_id]').val()
var variation_id = $form.find('input[name=variation_id]').val() || 0;
var title = $(this).data('name')
var data = {
action: 'woocommerce_ajax_add_to_cart',
product_id: product_id,
product_sku: '',
quantity: product_qty,
variation_id: variation_id,
};
dataLayer.push({
"ecommerce": {
"currencyCode": "RUB",
"add": {
"products": [
{
"id": product_id,
"name": title,
"quantity": product_qty,
}
]
}
}
});
// $(document.body).trigger('adding_to_cart', [$thisbutton, data]);
$.ajax({
type: 'post',
url: woocommerce_params.ajax_url,
data: data,
beforeSend: function (response) {
$form.find('.detail-block-form__submit, .store-add-to-cart').addClass('loading').attr('disabled', true)
},
complete: function (response) {
$form.find('.detail-block-form__submit, .store-add-to-cart').removeClass('loading').attr('disabled', false)
},
success: function (response) {
$('.modal__item.modal__basket').html(response['cart']);
if(response['cart_count'] > 0){
$('.mini-profile__button--counter').removeClass('disabled').html(response['cart_count'])
}
else{
$('.mini-profile__button--counter').addClass('disabled').html(response['cart_count'])
}
initCounters();
let modalF = document.querySelector('.modal'),
aside = document.querySelector('.modal__aside'),
device = window.screen.width;
if(!$.cookie('gp-cosmopet-cartadd')){
modalF.classList.add('active');
$('.modal__basket').addClass('active');
let thisContentElement = document.querySelector('.modal__basket');
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);
$.cookie('gp-cosmopet-cartadd', 'true', { expires: 2 });
}
modalClose('.modal__close');
},
});
return false;
});
$(document).on('submit', '.modal__form-sub', function (e) {
e.preventDefault();
var email = $(this).find('input[name="email"]').val()
var data = $(this).serialize()
$.ajax({
type: 'post',
url: woocommerce_params.ajax_url,
data: data,
beforeSend: function (response) {
// $thisbutton.removeClass('added').addClass('loading');
},
complete: function (response) {
// $thisbutton.addClass('added').removeClass('loading');
},
success: function (response) {
$('.modal__to-know').removeClass('active')
$('#sub-result-email').html(email)
$('.modal__to-know-submit').addClass('active').css('filter', 'blur(0px)')
},
});
});
$(document).on('submit', '.form--contact', function (e) {
e.preventDefault();
var form = this;
var data = $(this).serialize()
$.ajax({
type: 'post',
url: woocommerce_params.ajax_url,
data: data,
beforeSend: function (response) {
// $thisbutton.removeClass('added').addClass('loading');
},
complete: function (response) {
// $thisbutton.addClass('added').removeClass('loading');
},
success: function (response) {
$(form).addClass('submited')
},
});
});
$('body').on('click', '.modal-basket__item .counter__button', function(){
var input = $(this).closest('.counter').find('.counter__input').val()
var price = $(this).closest('.modal-basket-item__control').find('.modal-basket-item__price')
var productID = $(this).data('id')
var pr = $(this).closest('.modal-basket__item').find('.modal-basket__item-before').data('pr')
$(price).html(Number(input) * $(price).data('basecost'))
$(this).closest('.modal-basket__item').data('cost', Number(price.html()))
$('#cart_total').html(wc_cart_summary_upd())
var title = $(this).closest('.cart_item').find('.modal-basket-item__title').html()
if ($(this).hasClass('minus')){
$(this).attr('data-value', Number( $(this).attr('data-value')) - 1)
if(Number($(this).attr('data-value')) == 0){
$(this).closest('.modal-basket__item').find('.modal-basket__item-before').click()
}
dataLayer.push({
"ecommerce": {
"currencyCode": "RUB",
"remove": {
"products": [
{
"id": pr,
"name": title,
"quantity": 1,
}
]
}
}
});
}
else{
var min = $(this).closest('.counter--small').find('.minus')
$(min).attr('data-value', Number($(min).attr('data-value')) + 1)
dataLayer.push({
"ecommerce": {
"currencyCode": "RUB",
"add": {
"products": [
{
"id": pr,
"name": title,
"quantity": 1,
}
]
}
}
});
}
// if ($(this).hasClass('minus') && Number(input) == 1){
// $(this).closest('.modal-basket__item').find('.modal-basket__item-before').click()
// }
var data = {
action: 'get_cartprice',
quantity: input,
product: productID
};
$.ajax({
type: 'post',
url: '/wp-admin/admin-ajax.php',
data: data,
beforeSend: function (response) {
// $thisbutton.removeClass('added').addClass('loading');
},
complete: function (response) {
// $thisbutton.addClass('added').removeClass('loading');
},
success: function (response) {
if (response.error) {
} else {
// $('#cart_total').html(response)
initCounters()
if(response['cart_count'] > 0){
$('.mini-profile__button--counter').removeClass('disabled').html(response['cart_count'])
}
else{
$('.mini-profile__button--counter').addClass('disabled').html(response['cart_count'])
}
}
},
});
})
$('body').on('click', '.product-item-overlay__field .counter__button', function(){
var input = $(this).closest('.counter').find('.counter__input').val()
var price = $(this).closest('.product-item__form').find('.product-item-overlay__price')
$(price).html(Number(input) * $(price).data('basecost'))
})
$('body').on('click', '.modal-basket__item-before', function(){
var key = $(this).data('id')
var p_ID = $(this).data('pr');
var var_ID = $(this).data('var');
var quantity = $(this).closest('.modal-basket__item').find('.counter__input').val()
var layout = `
<p class="modal-basket-item__title">
Удаление товара из корзины: <span id="${key}_timer" class="timer_counter">5</span>с
</p>
<button class="modal-basket-item__return" id="${key}_return" data-id="${p_ID}" data-var="${var_ID}" data-quantity="${quantity}">
Восстановить
</button>
`
if(localeValue == 'en_US'){
var layout = `
<p class="modal-basket-item__title">
Removing product from cart: <span id="${key}_timer" class="timer_counter">5</span>s
</p>
<button class="modal-basket-item__return" id="${key}_return" data-id="${p_ID}" data-var="${var_ID}" data-quantity="${quantity}">
Restore
</button>
`
}
var old_html = $(this).closest('.modal-basket__item').html()
$(this).closest('.modal-basket__item').addClass('.modal-basket__item--return').html(layout)
var title = $(this).closest('.cart_item').find('.modal-basket-item__title').html()
var timerVal = 5;
var interval = setInterval(function(){
timerVal -= 1;
if (timerVal > 0){
$(`#${key}_timer`).html(timerVal)
}
else{
dataLayer.push({
"ecommerce": {
"currencyCode": "RUB",
"remove": {
"products": [
{
"id": p_ID,
"name": title,
"quantity": quantity,
}
]
}
}
});
var input = 0;
var productID = key;
var data = {
action: 'get_cartprice',
quantity: input,
product: productID
};
$.ajax({
type: 'post',
url: '/wp-admin/admin-ajax.php',
data: data,
beforeSend: function (response) {
// $thisbutton.removeClass('added').addClass('loading');
},
complete: function (response) {
// $thisbutton.addClass('added').removeClass('loading');
},
success: function (response) {
if(response['cart_count'] > 0){
$('.mini-profile__button--counter').removeClass('disabled').html(response['cart_count'])
}
else{
$('.mini-profile__button--counter').addClass('disabled').html(response['cart_count'])
}
},
});
$(`#${key}_timer`).closest('.modal-basket__item').remove()
if (Number(wc_cart_summary_upd()) > 0){
$('#cart_total').html(wc_cart_summary_upd())
}
else{
var tmpl = `<div class="modal__header --nb">
<p class="modal__title">Корзина</p>
<p class="modal__text">Ваша корзина пуста</p>
</div>
<div class="modal__footer">
<div class="modal__block-button">
<div class="modal__button">
<a href="/shop/" class="button button--100-perc button--link button--white">
Продолжить покупки
</a>
</div>
</div>
</div>`
if(localeValue == 'en_US'){
var tmpl = `<div class="modal__header --nb">
<p class="modal__title">Cart</p>
<p class="modal__text">Your cart is empty</p>
</div>
<div class="modal__footer">
<div class="modal__block-button">
<div class="modal__button">
<a href="/en/shop-3/" class="button button--100-perc button--link button--white">
Return to catalog
</a>
</div>
</div>
</div>`
}
$('.modal__basket').html(tmpl)
}
clearInterval(interval);
}
}, 1000)
$(`#${key}_return`).one('click', function(){
$(this).closest('.modal-basket__item').removeClass('.modal-basket__item--return').html(old_html)
clearInterval(interval);
})
})
$('body').on('click', '.state__button', function(){
var s = $(this).closest('.select')
var id = $(this).data('id')
var bc = $(this).data('bc')
var form = $(this).closest('.product-item__form')
$(form).find('input[name="variation_id"]').val(id)
$(form).find('.counter__input').data('maxcount', $(this).data('stock')).attr('data-maxcount', $(this).data('stock'))
if (Number($(form).find('.counter__input').val()) > Number($(form).find('.counter__input').data('maxcount'))){
$(form).find('.counter__input').val($(form).find('.counter__input').data('maxcount'))
}
var input = $(form).find('.counter__input').val()
$(form).find('.product-item-overlay__price').data('basecost', bc).html(Number(bc) * Number(input))
})
$('body').on('click', '.btn-load-ajax', function(){
var page = Number($(this).data('page')) + 1
var maxpage = Number($(this).data('maxpage'))
var data = {
ajax_load: 'ajax',
};
var btn = this
var baseUrl = jQuery(location).attr('origin') + jQuery(location).attr('pathname')
baseUrl += 'page/' + page + '/'
var searchUrl = baseUrl
if (jQuery(location).attr('search')){
searchUrl += jQuery(location).attr('search') + '&ajax_search=ajax'
}
else{
searchUrl += '?ajax_search=ajax'
}
$.ajax({
type: 'get',
url: searchUrl,
data: data,
beforeSend: function (response) {
$(btn).attr('disabled', true)
$(btn).attr('data-page', page)
$(btn).data('page', page)
},
complete: function (response) {
if (page >= maxpage){
$(btn).remove()
}
else{
$(btn).attr('disabled', false)
}
},
success: function (response) {
$('.products').append(response)
initCounters()
initOverlay()
initSelect()
modalOpen('.open-to-know', '.modal__to-know');
/// РЕШЕНИЕ ДЛЯ СТЕНДА AJAX ДЛЯ ПОДГРУЗКИ AJAX
document.querySelectorAll('img').forEach(img => {
var str = img.attributes['src'].value.replace('https://cosmopet.good-production.xyz/', 'https://cosmopet.shop/')
checkImage(str, function(){ img.attributes['src'].value = str });
if (img.attributes['srcset']){
img.attributes['srcset'].value = img.attributes['srcset'].value.replace('cosmopet.good-production.xyz', '<?=$main_host?>')
}
})
//
},
});
})
// $('body').on('click', '.singular-w-btn', function(){
// var wg = $(this).data('wg')
// var id = $(this).data('id')
// $('#variation_id').val(id)
// $('.detail__block-price').hide()
// $('.detail__block-price[data-wg="' + wg + '"]').show()
// if ($(this).data('available')){
// $('.detail-block-form__item--tn').hide()
// $('.detail-block-form__item--add').show()
// }
// else{
// $('.detail-block-form__item--tn').show()
// $('.detail-block-form__item--add').hide()
// }
// })
// асинхронный запрос при отправке формы
$( '#ajaxform' ).on( 'submit',function( event ) {
event.preventDefault();
const form = $(this);
$.ajax( {
type : 'POST',
url : woocommerce_params.ajax_url,
data : form.serialize(),
beforeSend : function( xhr ) {
$('.products').addClass('loading')
form.find('.button-submit').addClass('loading').attr('disabled', true)
},
success : function( data ) {
$( '.products' ).html( data.products );
$('.product__tag').html(data.tags);
$( '.btn-load-ajax' ).remove()
form.find('.button-submit').removeClass('loading').attr('disabled', false)
form.find('.modal__close').click()
$('.products').removeClass('loading')
if (data.err){
$('.product__error-button').show()
}
else{
$('.product__error-button').hide()
}
initCounters()
initOverlay()
initSelect()
modalOpen('.open-to-know', '.modal__to-know');
document.querySelectorAll('img').forEach(img => {
var str = img.attributes['src'].value.replace('https://cosmopet.good-production.xyz/', 'https://cosmopet.shop/')
checkImage(str, function(){ img.attributes['src'].value = str });
if (img.attributes['srcset']){
img.attributes['srcset'].value = img.attributes['srcset'].value.replace('cosmopet.good-production.xyz', '<?=$main_host?>')
}
})
}
} );
} );
$('body').on('click', '.product-tag__item', function(){
$('#tax_' + $(this).data('tag')).find('input').prop('checked', false)
$('#tax_' + $(this).data('tag')).removeClass('active');
$(this).remove()
$('#ajaxform').submit()
})
// Login
$('.login_popup').on('click', function(e){
e.preventDefault();
$('.login_modal').addClass('active');
});
$('.login_close').on('click', function(){
$('.login_modal').removeClass('active');
});
$('.login_back').on('click', function(){
if($(this).is('.disabled')) {
return false;
}
$('.login_wrap .step').toggleClass('active');
});
$('.login_input input').on('input keyup', function(){
$('.login_input').removeClass('error');
});
$('.js-get-code').on('click', function(){
$('.login_input').removeClass('error');
var email = $('.js-input-email input').val();
$('.sended_email').text(email);
if(email === '') {
$('.js-input-email').addClass('error');
$('.js-input-email .login_error').text(localeValue == 'en_US' ? 'Enter your email' : 'Укажите Email');
return false;
} else {
// Проверка Email
$.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: {action: 'email_validate', email:email},
success: function(data){
if(data['status'] === 'error') {
$('.js-input-email').addClass('error');
$('.js-input-email .login_error').text(data['text']);
return false;
} else {
$('.login_wrap .step').toggleClass('active');
send_code();
}
}
});
}
});
$('.js-repeat-code').on('click', function(){
$('.login_input').removeClass('error');
send_code();
});
function send_code(){
$('.login_timer').show();
$('.js-repeat-code').hide();
$('.login_back').addClass('disabled');
// Timer
var seconds = 15;
var interval = setInterval(function() {
if (seconds > 0) {
seconds--;
$('.seconds').text(seconds);
} else {
clearInterval(interval);
$('.login_timer').hide();
$('.js-repeat-code').show();
$('.login_back').removeClass('disabled');
$('.seconds').text(15);
}
}, 1000);
//Ajax отправка кода
$.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: {action: 'send_code', email: $('.js-input-email input').val()}
});
}
// Проверка кода и регистрация/авторизация
$('.js-input-code input').on('input keydown keyup propertychange paste cut copy change', function(){
var val = $(this).val();
var email = $('.js-input-email input').val();
if(val.length === 4) {
$.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: {action: 'check_code', code: val, email: email},
success: function(data){
console.log(data);
if(data['status'] == 'success_reg') {
$('.login_forms').addClass('hide');
$('.login_success').removeClass('hide');
if (typeof wc_checkout_params !== 'undefined') {
location.reload()
}
}
if(data['status'] == 'success_auth') {
$('.login_forms').addClass('hide');
$('.login_auth').removeClass('hide');
if (typeof wc_checkout_params !== 'undefined') {
location.reload()
}
}
if(data['status'] == 'error') {
$('.js-input-code').addClass('error');
$('.js-input-code .login_error').text(data['text']);
}
}
});
}
});
$('.email_link_form').on('submit', function(e){
e.preventDefault();
$('.cabinet-card_linked-email .error').remove();
var data = $(this).serializeArray();
$.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: data,
success: function(data){
if(data['error']) {
$('.cabinet-card_linked-email').append('<div class="cabinet-card__status cabinet-card__status--cancelled error">'+data['error']+'</div>');
} else {
location.reload();
}
}
});
});
})(jQuery);
function checkImage(imageSrc, good) {
var img = new Image();
img.onload = good;
img.src = imageSrc;
}
// header
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');
// header
function initOverlay(){
// 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
}
initOverlay()
function initSelect(){
// 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
}
initSelect()
// counter
function initCounters(){
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;
input.setAttribute('value', input.value)
}
}
plus.onclick = function (e) {
e.preventDefault();
let number = input.value;
let max = input.dataset.maxcount
if (number <= max - 1) {
input.value = Number(number) + 1;
input.setAttribute('value', input.value)
}
}
})
}
initCounters()
// counter
// checkbox
let checkbox = document.querySelectorAll('.checkbox');
checkbox.forEach(e => {
e.onclick = function (event) {
let input = e.querySelector('.checkbox__input');
if (!e.classList.contains('active')) {
input.checked = 1;
}else{
input.checked = 0;
}
e.classList.toggle('active');
}
})
// checkbox
// 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;
}
}
// resize
window.addEventListener('resize', (e) => {
let width = window.screen.width;
// media
modalOpen('.button--filter', '.modal__filter');
modalOpen('.basket-open', '.modal__basket');
modalOpen('.login-open', '.modal__login');
modalOpen('.open-to-know', '.modal__to-know');
modalClose('.modal__close');
modalClose('.modal-form-sub__close');
let modalItem = document.querySelectorAll('.modal__item');
// if (width <= 720) {
modalItem.forEach(modal => {
if (modal.classList.contains('active')) {
let aside = document.querySelector('.modal__aside');
if (width <= 720) {
aside.style.width = `${width}px`
}else{
let openAside = document.querySelector('.modal__item.active'),
newWidth = openAside.clientWidth;
aside.style.width = `${newWidth}px`
}
}
})
// }
});
// resize
//
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')
}
}
});
}
// scroll

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

@ -0,0 +1,13 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_230_9775)">
<path d="M0 0H16V5.33437H0V0Z" fill="#D90012"/>
<path d="M0 5.33447H16V10.6657H0V5.33447Z" fill="#0033A0"/>
<path d="M0 10.6655H16V15.9999H0V10.6655Z" fill="#F2A800"/>
</g>
<rect x="0.1" y="0.1" width="15.8" height="15.8" stroke="#999999" stroke-width="0.2"/>
<defs>
<clipPath id="clip0_230_9775">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 502 B

@ -0,0 +1,13 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_230_9627)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H16V16H0V0Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.33447H16V16.0001H0V5.33447Z" fill="#0039A6"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 10.6655H16V15.9999H0V10.6655Z" fill="#D52B1E"/>
</g>
<rect x="0.1" y="0.1" width="15.8" height="15.8" stroke="#999999" stroke-width="0.2"/>
<defs>
<clipPath id="clip0_230_9627">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 615 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.0 KiB

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.5 12.3643H21" stroke="#121212" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.5 12.3643L10.864 18.7282" stroke="#121212" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.5 12.3643L10.864 6.0003" stroke="#121212" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 459 B

@ -0,0 +1,3 @@
<svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.46967 0.46967C0.762563 0.176777 1.23744 0.176777 1.53033 0.46967L5 3.93934L8.46967 0.46967C8.76256 0.176777 9.23744 0.176777 9.53033 0.46967C9.82322 0.762563 9.82322 1.23744 9.53033 1.53033L5.53033 5.53033C5.23744 5.82322 4.76256 5.82322 4.46967 5.53033L0.46967 1.53033C0.176777 1.23744 0.176777 0.762563 0.46967 0.46967Z" fill="#333333"/>
</svg>

After

Width:  |  Height:  |  Size: 493 B

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.94673 2.74797C9.26993 2.62677 9.63019 2.79052 9.75139 3.11373L12.2514 9.78039C12.3045 9.92188 12.3045 10.0778 12.2514 10.2193L9.75139 16.886C9.63019 17.2092 9.26993 17.3729 8.94673 17.2517C8.62353 17.1305 8.45978 16.7703 8.58098 16.4471L10.9987 9.99984L8.58098 3.55263C8.45978 3.22943 8.62353 2.86917 8.94673 2.74797Z" fill="#333333"/>
</svg>

After

Width:  |  Height:  |  Size: 491 B

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7369 3.29777C11.1247 3.15233 11.557 3.34884 11.7025 3.73668L14.7025 11.7367C14.7661 11.9065 14.7661 12.0936 14.7025 12.2634L11.7025 20.2634C11.557 20.6512 11.1247 20.8477 10.7369 20.7023C10.349 20.5568 10.1525 20.1245 10.298 19.7367L13.1992 12L10.298 4.26336C10.1525 3.87552 10.349 3.44321 10.7369 3.29777Z" fill="#666666"/>
</svg>

After

Width:  |  Height:  |  Size: 481 B

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 16.4854H28" stroke="#666666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6 16.4854L14.4853 24.9706" stroke="#666666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6 16.4854L14.4853 8.00007" stroke="#666666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 456 B

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M26 16.4854H4" stroke="#666666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M26 16.4854L17.5147 24.9706" stroke="#666666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M26 16.4854L17.5147 8.00007" stroke="#666666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 458 B

@ -0,0 +1,3 @@
<svg width="10" height="8" viewBox="0 0 10 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<path 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"/>
</svg>

After

Width:  |  Height:  |  Size: 495 B

@ -0,0 +1,11 @@
<svg width="16" height="12" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.7071 0.292893C16.0976 0.683417 16.0976 1.31658 15.7071 1.70711L5.70711 11.7071C5.31658 12.0976 4.68342 12.0976 4.29289 11.7071L0.292893 7.70711C-0.0976311 7.31658 -0.0976311 6.68342 0.292893 6.29289C0.683417 5.90237 1.31658 5.90237 1.70711 6.29289L5 9.58579L14.2929 0.292893C14.6834 -0.0976311 15.3166 -0.0976311 15.7071 0.292893Z" fill="url(#paint0_radial_79_10214)" />
<defs>
<radialGradient id="paint0_radial_79_10214" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(23.9562 -7.00625) rotate(143.344) scale(34.5677 45.2811)">
<stop stop-color="#0F5881" />
<stop offset="0.512169" stop-color="#1EA49C" />
<stop offset="0.807073" stop-color="#76CE75" />
<stop offset="0.911458" stop-color="#ECF39F" />
</radialGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 954 B

@ -0,0 +1,13 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_3176)">
<path d="M4 7H20" stroke="#2C3E50" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5 7L6 19C6 19.5304 6.21071 20.0391 6.58579 20.4142C6.96086 20.7893 7.46957 21 8 21H16C16.5304 21 17.0391 20.7893 17.4142 20.4142C17.7893 20.0391 18 19.5304 18 19L19 7" stroke="#2C3E50" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9 7V4C9 3.73478 9.10536 3.48043 9.29289 3.29289C9.48043 3.10536 9.73478 3 10 3H14C14.2652 3 14.5196 3.10536 14.7071 3.29289C14.8946 3.48043 15 3.73478 15 4V7" stroke="#2C3E50" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10 12L14 16M14 12L10 16" stroke="#2C3E50" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_1_3176">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 983 B

@ -0,0 +1,11 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_2483)">
<path d="M18 6L6 18" stroke="#121212" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6 6L18 18" stroke="#121212" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_1_2483">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 455 B

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.2929 5.70711C11.1054 5.51957 11 5.26522 11 5C11 4.73478 11.1054 4.48043 11.2929 4.29289C11.4804 4.10536 11.7348 4 12 4C12.2652 4 12.5196 4.10536 12.7071 4.29289C12.8946 4.48043 13 4.73478 13 5C13 5.26522 12.8946 5.51957 12.7071 5.70711C12.5196 5.89464 12.2652 6 12 6C11.7348 6 11.4804 5.89464 11.2929 5.70711ZM11 12C11 12.2652 11.1054 12.5196 11.2929 12.7071C11.4804 12.8946 11.7348 13 12 13C12.2652 13 12.5196 12.8946 12.7071 12.7071C12.8946 12.5196 13 12.2652 13 12C13 11.7348 12.8946 11.4804 12.7071 11.2929C12.5196 11.1054 12.2652 11 12 11C11.7348 11 11.4804 11.1054 11.2929 11.2929C11.1054 11.4804 11 11.7348 11 12ZM11 19C11 19.2652 11.1054 19.5196 11.2929 19.7071C11.4804 19.8946 11.7348 20 12 20C12.2652 20 12.5196 19.8946 12.7071 19.7071C12.8946 19.5196 13 19.2652 13 19C13 18.7348 12.8946 18.4804 12.7071 18.2929C12.5196 18.1054 12.2652 18 12 18C11.7348 18 11.4804 18.1054 11.2929 18.2929C11.1054 18.4804 11 18.7348 11 19Z" fill="#121212"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 3.25C6.41421 3.25 6.75 3.58579 6.75 4V7.35424C7.19755 7.48113 7.60976 7.72067 7.94454 8.05546C8.46027 8.57118 8.75 9.27065 8.75 10C8.75 10.7293 8.46027 11.4288 7.94454 11.9445C7.60976 12.2793 7.19755 12.5189 6.75 12.6458V20C6.75 20.4142 6.41421 20.75 6 20.75C5.58579 20.75 5.25 20.4142 5.25 20V12.6458C4.80245 12.5189 4.39024 12.2793 4.05546 11.9445C3.53973 11.4288 3.25 10.7293 3.25 10C3.25 9.27065 3.53973 8.57118 4.05546 8.05546C4.39024 7.72067 4.80245 7.48113 5.25 7.35424V4C5.25 3.58579 5.58579 3.25 6 3.25ZM12 3.25C12.4142 3.25 12.75 3.58579 12.75 4V13.3542C13.1975 13.4811 13.6098 13.7207 13.9445 14.0555C14.4603 14.5712 14.75 15.2707 14.75 16C14.75 16.7293 14.4603 17.4288 13.9445 17.9445C13.6098 18.2793 13.1975 18.5189 12.75 18.6458V20C12.75 20.4142 12.4142 20.75 12 20.75C11.5858 20.75 11.25 20.4142 11.25 20V18.6458C10.8025 18.5189 10.3902 18.2793 10.0555 17.9445C9.53973 17.4288 9.25 16.7293 9.25 16C9.25 15.2707 9.53973 14.5712 10.0555 14.0555C10.3902 13.7207 10.8025 13.4811 11.25 13.3542V4C11.25 3.58579 11.5858 3.25 12 3.25ZM18 3.25C18.4142 3.25 18.75 3.58579 18.75 4V4.35424C19.1975 4.48112 19.6098 4.72067 19.9445 5.05546C20.4603 5.57118 20.75 6.27065 20.75 7C20.75 7.72935 20.4603 8.42882 19.9445 8.94454C19.6098 9.27933 19.1975 9.51887 18.75 9.64576V20C18.75 20.4142 18.4142 20.75 18 20.75C17.5858 20.75 17.25 20.4142 17.25 20V9.64576C16.8025 9.51887 16.3902 9.27933 16.0555 8.94454C15.5397 8.42882 15.25 7.72935 15.25 7C15.25 6.27065 15.5397 5.57118 16.0555 5.05546C16.3902 4.72067 16.8025 4.48112 17.25 4.35424V4C17.25 3.58579 17.5858 3.25 18 3.25ZM18 5.75C17.6685 5.75 17.3505 5.8817 17.1161 6.11612C16.8817 6.35054 16.75 6.66848 16.75 7C16.75 7.33152 16.8817 7.64946 17.1161 7.88388C17.3505 8.1183 17.6685 8.25 18 8.25C18.3315 8.25 18.6495 8.1183 18.8839 7.88388C19.1183 7.64946 19.25 7.33152 19.25 7C19.25 6.66848 19.1183 6.35054 18.8839 6.11612C18.6495 5.8817 18.3315 5.75 18 5.75ZM6 8.75C5.66848 8.75 5.35054 8.8817 5.11612 9.11612C4.8817 9.35054 4.75 9.66848 4.75 10C4.75 10.3315 4.8817 10.6495 5.11612 10.8839C5.35054 11.1183 5.66848 11.25 6 11.25C6.33152 11.25 6.64946 11.1183 6.88388 10.8839C7.1183 10.6495 7.25 10.3315 7.25 10C7.25 9.66848 7.1183 9.35054 6.88388 9.11612C6.64946 8.8817 6.33152 8.75 6 8.75ZM12 14.75C11.6685 14.75 11.3505 14.8817 11.1161 15.1161C10.8817 15.3505 10.75 15.6685 10.75 16C10.75 16.3315 10.8817 16.6495 11.1161 16.8839C11.3505 17.1183 11.6685 17.25 12 17.25C12.3315 17.25 12.6495 17.1183 12.8839 16.8839C13.1183 16.6495 13.25 16.3315 13.25 16C13.25 15.6685 13.1183 15.3505 12.8839 15.1161C12.6495 14.8817 12.3315 14.75 12 14.75Z" fill="#121212"/>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

@ -0,0 +1,6 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.7875 10.2271C19.7875 9.51801 19.7239 8.83619 19.6057 8.18164H10.1875V12.0498H15.5693C15.3375 13.2998 14.633 14.3589 13.5739 15.068V17.5771H16.8057C18.6966 15.8362 19.7875 13.2726 19.7875 10.2271Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1864 20.0004C12.8864 20.0004 15.15 19.105 16.8046 17.5777L13.5728 15.0686C12.6773 15.6686 11.5318 16.0231 10.1864 16.0231C7.58183 16.0231 5.37728 14.264 4.59092 11.9004H1.25V14.4913C2.89546 17.7595 6.27728 20.0004 10.1864 20.0004Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.59205 11.8997C4.39205 11.2997 4.27842 10.6588 4.27842 9.99971C4.27842 9.34062 4.39205 8.6997 4.59205 8.0997V5.50879H1.25114C0.573864 6.85879 0.1875 8.38607 0.1875 9.99971C0.1875 11.6133 0.573864 13.1406 1.25114 14.4906L4.59205 11.8997Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1864 3.97728C11.6546 3.97728 12.9728 4.48183 14.0091 5.47274L16.8773 2.60455C15.1455 0.990911 12.8818 0 10.1864 0C6.27728 0 2.89546 2.24091 1.25 5.5091L4.59092 8.10002C5.37728 5.73638 7.58183 3.97728 10.1864 3.97728Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,11 @@
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.42433 0.575954C1.18837 0.343303 0.807128 0.344651 0.572814 0.578965C0.338499 0.81328 0.339838 1.19183 0.575804 1.42448L5.84223 6.61694L0.575803 11.8094C0.339837 12.042 0.338499 12.4206 0.572813 12.6549C0.807128 12.8892 1.18837 12.8906 1.42433 12.6579L6.6968 7.45951L11.9692 12.6579C12.2052 12.8905 12.5864 12.8892 12.8208 12.6549C13.0551 12.4206 13.0537 12.042 12.8178 11.8094L7.55137 6.61694L12.8178 1.42451C13.0537 1.19186 13.0551 0.813306 12.8208 0.578991C12.5864 0.344677 12.2052 0.343328 11.9692 0.57598L6.6968 5.77437L1.42433 0.575954Z" fill="url(#paint0_radial_61_3534)"/>
<defs>
<radialGradient id="paint0_radial_61_3534" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(19.26 -6.85449) rotate(135.608) scale(30.5558 41.776)">
<stop stop-color="#0F5881"/>
<stop offset="0.512169" stop-color="#1EA49C"/>
<stop offset="0.807073" stop-color="#76CE75"/>
<stop offset="0.911458" stop-color="#ECF39F"/>
</radialGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_61_7537)">
<path d="M5 12H19" stroke="#121212" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_61_7537">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 349 B

@ -0,0 +1,11 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_178_5112)">
<path d="M12 5V19" stroke="#666666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5 12H19" stroke="#666666" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_178_5112">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 455 B

@ -0,0 +1,11 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_61_7542)">
<path d="M12 5V19" stroke="#121212" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5 12H19" stroke="#121212" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_61_7542">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 453 B

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00005 1.2498C4.27213 1.2498 1.25005 4.27188 1.25005 7.9998C1.25005 11.7277 4.27213 14.7498 8.00005 14.7498C11.728 14.7498 14.75 11.7277 14.75 7.9998C14.75 4.27188 11.728 1.2498 8.00005 1.2498ZM0.0500488 7.9998C0.0500488 3.60914 3.60939 0.0498047 8.00005 0.0498047C12.3907 0.0498047 15.9501 3.60914 15.9501 7.9998C15.9501 12.3905 12.3907 15.9498 8.00005 15.9498C3.60938 15.9498 0.0500488 12.3905 0.0500488 7.9998ZM8.75664 11.8914C8.75664 12.3056 8.42085 12.6414 8.00664 12.6414C7.59243 12.6414 7.25664 12.3056 7.25664 11.8914C7.25664 11.4772 7.59243 11.1414 8.00664 11.1414C8.42085 11.1414 8.75664 11.4772 8.75664 11.8914ZM6.35884 6.22749C6.35879 5.76088 6.51651 5.31995 6.80394 5.00253C7.08243 4.69497 7.51419 4.46749 8.14659 4.46748C9.28878 4.46747 10.0031 5.57665 9.44696 6.64451C9.21979 7.08066 8.93274 7.37811 8.60211 7.7207L8.60206 7.72075C8.49777 7.82881 8.38915 7.94137 8.27671 8.06418C7.82078 8.56216 7.37999 9.17405 7.37999 10.1425C7.37999 10.4738 7.64862 10.7425 7.97999 10.7425C8.31136 10.7425 8.57999 10.4738 8.57999 10.1425C8.57999 9.61088 8.79169 9.27875 9.16178 8.87452C9.23347 8.79622 9.31482 8.71242 9.40228 8.62233C9.75046 8.26368 10.1953 7.80545 10.5113 7.19883C11.4927 5.31454 10.1697 3.26746 8.14658 3.26748C7.19634 3.26749 6.43417 3.62308 5.91442 4.19707C5.4036 4.7612 5.15877 5.5003 5.15884 6.22761C5.15887 6.55898 5.42753 6.82758 5.7589 6.82755C6.09027 6.82752 6.35887 6.55886 6.35884 6.22749Z" fill="#121212"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,3 @@
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.5 1.5C7.64641 1.5 6.80117 1.66813 6.01256 1.99478C5.22394 2.32144 4.50739 2.80023 3.90381 3.40381C3.30023 4.00739 2.82144 4.72394 2.49478 5.51256C2.16813 6.30117 2 7.14641 2 8C2 8.85359 2.16813 9.69883 2.49478 10.4874C2.82144 11.2761 3.30023 11.9926 3.90381 12.5962C4.50739 13.1998 5.22394 13.6786 6.01256 14.0052C6.80117 14.3319 7.64641 14.5 8.5 14.5C9.35359 14.5 10.1988 14.3319 10.9874 14.0052C11.7761 13.6786 12.4926 13.1998 13.0962 12.5962C13.6998 11.9926 14.1786 11.2761 14.5052 10.4874C14.8319 9.69883 15 8.85359 15 8C15 7.14641 14.8319 6.30117 14.5052 5.51256C14.1786 4.72394 13.6998 4.00739 13.0962 3.40381C12.4926 2.80023 11.7761 2.32144 10.9874 1.99478C10.1988 1.66813 9.35359 1.5 8.5 1.5ZM6.39524 2.91866C7.06253 2.64226 7.77773 2.5 8.5 2.5C9.22227 2.5 9.93747 2.64226 10.6048 2.91866C11.272 3.19506 11.8784 3.60019 12.3891 4.11091C12.8998 4.62164 13.3049 5.22795 13.5813 5.89524C13.8577 6.56253 14 7.27773 14 8C14 8.72227 13.8577 9.43747 13.5813 10.1048C13.3049 10.772 12.8998 11.3784 12.3891 11.8891C11.8784 12.3998 11.272 12.8049 10.6048 13.0813C9.93747 13.3577 9.22227 13.5 8.5 13.5C7.77773 13.5 7.06253 13.3577 6.39524 13.0813C5.72795 12.8049 5.12164 12.3998 4.61091 11.8891C4.10019 11.3784 3.69506 10.772 3.41866 10.1048C3.14226 9.43747 3 8.72227 3 8C3 7.27773 3.14226 6.56253 3.41866 5.89524C3.69506 5.22795 4.10019 4.62163 4.61091 4.11091C5.12163 3.60019 5.72795 3.19506 6.39524 2.91866ZM7.52022 6.31311C7.32496 6.11785 7.00838 6.11785 6.81311 6.31311C6.61785 6.50838 6.61785 6.82496 6.81311 7.02022L7.79289 8L6.81311 8.97978C6.61785 9.17504 6.61785 9.49162 6.81311 9.68689C7.00838 9.88215 7.32496 9.88215 7.52022 9.68689L8.5 8.70711L9.47978 9.68689C9.67504 9.88215 9.99162 9.88215 10.1869 9.68689C10.3821 9.49162 10.3821 9.17504 10.1869 8.97978L9.20711 8L10.1869 7.02022C10.3821 6.82496 10.3821 6.50838 10.1869 6.31311C9.99162 6.11785 9.67504 6.11785 9.47978 6.31311L8.5 7.29289L7.52022 6.31311Z" fill="#F60909"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,3 @@
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.5 1.5C7.64641 1.5 6.80117 1.66813 6.01256 1.99478C5.22394 2.32144 4.50739 2.80023 3.90381 3.40381C3.30023 4.00739 2.82144 4.72394 2.49478 5.51256C2.16813 6.30117 2 7.14641 2 8C2 8.85359 2.16813 9.69883 2.49478 10.4874C2.82144 11.2761 3.30023 11.9926 3.90381 12.5962C4.50739 13.1998 5.22394 13.6786 6.01256 14.0052C6.80117 14.3319 7.64641 14.5 8.5 14.5C9.35359 14.5 10.1988 14.3319 10.9874 14.0052C11.7761 13.6786 12.4926 13.1998 13.0962 12.5962C13.6998 11.9926 14.1786 11.2761 14.5052 10.4874C14.8319 9.69883 15 8.85359 15 8C15 7.14641 14.8319 6.30117 14.5052 5.51256C14.1786 4.72394 13.6998 4.00739 13.0962 3.40381C12.4926 2.80023 11.7761 2.32144 10.9874 1.99478C10.1988 1.66813 9.35359 1.5 8.5 1.5ZM6.39524 2.91866C7.06253 2.64226 7.77773 2.5 8.5 2.5C9.22227 2.5 9.93747 2.64226 10.6048 2.91866C11.272 3.19506 11.8784 3.60019 12.3891 4.11091C12.8998 4.62164 13.3049 5.22795 13.5813 5.89524C13.8577 6.56253 14 7.27773 14 8C14 8.72227 13.8577 9.43747 13.5813 10.1048C13.3049 10.772 12.8998 11.3784 12.3891 11.8891C11.8784 12.3998 11.272 12.8049 10.6048 13.0813C9.93747 13.3577 9.22227 13.5 8.5 13.5C7.77773 13.5 7.06253 13.3577 6.39524 13.0813C5.72795 12.8049 5.12164 12.3998 4.61091 11.8891C4.10019 11.3784 3.69506 10.772 3.41866 10.1048C3.14226 9.43747 3 8.72227 3 8C3 7.27773 3.14226 6.56253 3.41866 5.89524C3.69506 5.22795 4.10019 4.62163 4.61091 4.11091C5.12163 3.60019 5.72795 3.19506 6.39524 2.91866ZM10.8536 7.02022C11.0488 6.82496 11.0488 6.50838 10.8536 6.31311C10.6583 6.11785 10.3417 6.11785 10.1464 6.31311L7.83333 8.62623L6.85355 7.64645C6.65829 7.45118 6.34171 7.45118 6.14645 7.64645C5.95118 7.84171 5.95118 8.15829 6.14645 8.35355L7.47978 9.68689C7.67504 9.88215 7.99162 9.88215 8.18689 9.68689L10.8536 7.02022Z" fill="#2ED15D"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -0,0 +1,3 @@
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.75 5.25L1.25 2.75L6.25 2.75L3.75 5.25Z" fill="#999999"/>
</svg>

After

Width:  |  Height:  |  Size: 168 B

@ -0,0 +1,3 @@
<svg width="22" height="14" viewBox="0 0 22 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.9825 14C4.46596 14 0.178638 8.74474 0 0H3.76515C3.88882 6.41842 6.66459 9.13714 8.86321 9.6977V0H12.4085V5.53553C14.5796 5.2973 16.8607 2.77477 17.6302 0H21.1755C20.8855 1.43908 20.3075 2.80165 19.4776 4.0025C18.6477 5.20335 17.5837 6.21663 16.3523 6.97898C17.7269 7.67555 18.941 8.6615 19.9145 9.87175C20.888 11.082 21.5988 12.489 22 14H18.0974C17.7373 12.6876 17.0054 11.5128 15.9934 10.6228C14.9814 9.73284 13.7343 9.16727 12.4085 8.997V14H11.9825Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 584 B

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.62404 2.77566C3.38807 2.54301 3.00683 2.54436 2.77252 2.77867C2.53821 3.01299 2.53954 3.39154 2.77551 3.62419L6.90259 7.6933L2.77551 11.7624C2.53954 11.9951 2.53821 12.3736 2.77252 12.6079C3.00684 12.8422 3.38807 12.8436 3.62404 12.6109L7.75716 8.53587L11.8903 12.6109C12.1262 12.8436 12.5075 12.8422 12.7418 12.6079C12.9761 12.3736 12.9748 11.995 12.7388 11.7624L8.61173 7.6933L12.7388 3.62421C12.9748 3.39156 12.9761 3.01301 12.7418 2.77869C12.5075 2.54438 12.1262 2.54303 11.8903 2.77568L7.75716 6.85073L3.62404 2.77566Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 695 B

@ -0,0 +1,3 @@
<svg width="14" height="20" viewBox="0 0 14 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.1991 2.77628H8.65909C5.83576 2.77628 4.35076 4.20628 4.35076 6.31461C4.35076 8.69794 5.37742 9.81461 7.48576 11.2463L9.22742 12.4196L4.22242 19.8979H0.482422L4.97409 13.2079C2.39076 11.3563 0.940755 9.55794 0.940755 6.51628C0.940755 2.70294 3.59909 0.0996094 8.64076 0.0996094H13.6458V19.8796H10.1991V2.77628Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 442 B

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9995 3.53846C11.3616 3.53846 10.7499 3.78159 10.2988 4.21437C9.84778 4.64715 9.59439 5.23412 9.59439 5.84615V7.12821H14.4045V5.84615C14.4045 5.23412 14.1511 4.64715 13.7001 4.21437C13.2491 3.78159 12.6373 3.53846 11.9995 3.53846ZM16.0079 7.12821V5.84615C16.0079 4.82609 15.5856 3.84781 14.8339 3.12651C14.0821 2.40522 13.0626 2 11.9995 2C10.9364 2 9.91679 2.40522 9.16506 3.12651C8.41333 3.84781 7.99102 4.82609 7.99102 5.84615V7.12821H5.93986M7.99102 8.66667H5.93976C5.74711 8.66665 5.55664 8.7066 5.38159 8.78378C5.20654 8.86097 5.05095 8.97356 4.9255 9.11385C4.80004 9.25413 4.70769 9.41879 4.65477 9.59653C4.60186 9.77423 4.58961 9.9608 4.61887 10.1435C4.61886 10.1434 4.61888 10.1435 4.61887 10.1435L5.96036 18.5045C6.04768 19.0493 6.33539 19.5463 6.77139 19.9052C7.20738 20.2642 7.76287 20.4615 8.33735 20.4615C8.33734 20.4615 8.33736 20.4615 8.33735 20.4615H15.6616C16.2362 20.4617 16.7921 20.2644 17.2283 19.9055C17.6645 19.5465 17.9523 19.0496 18.0396 18.5046L19.3811 10.1436C19.3811 10.1436 19.3811 10.1435 19.3811 10.1436C19.4104 9.96093 19.3981 9.77423 19.3452 9.59653C19.2923 9.41879 19.1999 9.25413 19.0745 9.11385C18.949 8.97356 18.7935 8.86097 18.6184 8.78378C18.4433 8.7066 18.253 8.66665 18.0603 8.66667H16.0079V10.9744C16.0079 11.3992 15.649 11.7436 15.2062 11.7436C14.7635 11.7436 14.4045 11.3992 14.4045 10.9744V8.66667H9.59439V10.9744C9.59439 11.3992 9.23547 11.7436 8.79271 11.7436C8.34995 11.7436 7.99102 11.3992 7.99102 10.9744V8.66667ZM16.0079 7.12821H18.0601C18.0601 7.12821 18.0602 7.12821 18.0601 7.12821C18.4839 7.12817 18.9028 7.21606 19.2879 7.38586C19.673 7.55567 20.0153 7.80338 20.2913 8.11201C20.5673 8.42063 20.7705 8.78288 20.8869 9.1739C21.0033 9.56493 21.0303 9.97549 20.9658 10.3774L19.6244 18.7385C19.6243 18.7385 19.6244 18.7384 19.6244 18.7385C19.4788 19.6467 18.9991 20.475 18.2722 21.0732C17.5453 21.6715 16.6192 22.0002 15.6616 22C15.6615 22 15.6616 22 15.6616 22H8.33735C7.37986 22 6.45398 21.6711 5.72732 21.0728C5.00069 20.4746 4.52121 19.6466 4.37565 18.7386C4.37565 18.7385 4.37566 18.7386 4.37565 18.7386L3.03416 10.3776C2.96974 9.97561 2.99665 9.56493 3.11308 9.1739C3.22951 8.78288 3.43268 8.42063 3.70868 8.11201C3.98468 7.80338 4.32697 7.55567 4.71208 7.38586C5.09717 7.21606 5.51606 7.12817 5.93986 7.12821" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9995 3.53846C11.3616 3.53846 10.7499 3.78159 10.2988 4.21437C9.84778 4.64715 9.59439 5.23412 9.59439 5.84615V7.12821H14.4045V5.84615C14.4045 5.23412 14.1511 4.64715 13.7001 4.21437C13.2491 3.78159 12.6373 3.53846 11.9995 3.53846ZM16.0079 7.12821V5.84615C16.0079 4.82609 15.5856 3.84781 14.8339 3.12651C14.0821 2.40522 13.0626 2 11.9995 2C10.9364 2 9.91679 2.40522 9.16506 3.12651C8.41333 3.84781 7.99102 4.82609 7.99102 5.84615V7.12821H5.93986M7.99102 8.66667H5.93976C5.74711 8.66665 5.55664 8.7066 5.38159 8.78378C5.20654 8.86097 5.05095 8.97356 4.9255 9.11385C4.80004 9.25413 4.70769 9.41879 4.65477 9.59653C4.60186 9.77423 4.58961 9.9608 4.61887 10.1435C4.61886 10.1434 4.61888 10.1435 4.61887 10.1435L5.96036 18.5045C6.04768 19.0493 6.33539 19.5463 6.77139 19.9052C7.20738 20.2642 7.76287 20.4615 8.33735 20.4615C8.33734 20.4615 8.33736 20.4615 8.33735 20.4615H15.6616C16.2362 20.4617 16.7921 20.2644 17.2283 19.9055C17.6645 19.5465 17.9523 19.0496 18.0396 18.5046L19.3811 10.1436C19.3811 10.1436 19.3811 10.1435 19.3811 10.1436C19.4104 9.96093 19.3981 9.77423 19.3452 9.59653C19.2923 9.41879 19.1999 9.25413 19.0745 9.11385C18.949 8.97356 18.7935 8.86097 18.6184 8.78378C18.4433 8.7066 18.253 8.66665 18.0603 8.66667H16.0079V10.9744C16.0079 11.3992 15.649 11.7436 15.2062 11.7436C14.7635 11.7436 14.4045 11.3992 14.4045 10.9744V8.66667H9.59439V10.9744C9.59439 11.3992 9.23547 11.7436 8.79271 11.7436C8.34995 11.7436 7.99102 11.3992 7.99102 10.9744V8.66667ZM16.0079 7.12821H18.0601C18.0601 7.12821 18.0602 7.12821 18.0601 7.12821C18.4839 7.12817 18.9028 7.21606 19.2879 7.38586C19.673 7.55567 20.0153 7.80338 20.2913 8.11201C20.5673 8.42063 20.7705 8.78288 20.8869 9.1739C21.0033 9.56493 21.0303 9.97549 20.9658 10.3774L19.6244 18.7385C19.6243 18.7385 19.6244 18.7384 19.6244 18.7385C19.4788 19.6467 18.9991 20.475 18.2722 21.0732C17.5453 21.6715 16.6192 22.0002 15.6616 22C15.6615 22 15.6616 22 15.6616 22H8.33735C7.37986 22 6.45398 21.6711 5.72732 21.0728C5.00069 20.4746 4.52121 19.6466 4.37565 18.7386C4.37565 18.7385 4.37566 18.7386 4.37565 18.7386L3.03416 10.3776C2.96974 9.97561 2.99665 9.56493 3.11308 9.1739C3.22951 8.78288 3.43268 8.42063 3.70868 8.11201C3.98468 7.80338 4.32697 7.55567 4.71208 7.38586C5.09717 7.21606 5.51606 7.12817 5.93986 7.12821" fill="#333333"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.64124 3.64124C9.53204 2.75044 10.7402 2.25 12 2.25C13.2598 2.25 14.468 2.75044 15.3588 3.64124C16.2496 4.53204 16.75 5.74022 16.75 7C16.75 8.25978 16.2496 9.46796 15.3588 10.3588C14.468 11.2496 13.2598 11.75 12 11.75C10.7402 11.75 9.53204 11.2496 8.64124 10.3588C7.75044 9.46796 7.25 8.25978 7.25 7C7.25 5.74022 7.75044 4.53204 8.64124 3.64124ZM12 3.75C11.138 3.75 10.3114 4.09241 9.7019 4.7019C9.09241 5.3114 8.75 6.13805 8.75 7C8.75 7.86195 9.09241 8.6886 9.7019 9.2981C10.3114 9.90759 11.138 10.25 12 10.25C12.862 10.25 13.6886 9.90759 14.2981 9.2981C14.9076 8.6886 15.25 7.86195 15.25 7C15.25 6.13805 14.9076 5.3114 14.2981 4.7019C13.6886 4.09241 12.862 3.75 12 3.75Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 15.75C9.13805 15.75 8.3114 16.0924 7.7019 16.7019C7.09241 17.3114 6.75 18.138 6.75 19V21C6.75 21.4142 6.41421 21.75 6 21.75C5.58579 21.75 5.25 21.4142 5.25 21V19C5.25 17.7402 5.75044 16.532 6.64124 15.6412C7.53204 14.7504 8.74022 14.25 10 14.25H14C15.2598 14.25 16.468 14.7504 17.3588 15.6412C18.2496 16.532 18.75 17.7402 18.75 19V21C18.75 21.4142 18.4142 21.75 18 21.75C17.5858 21.75 17.25 21.4142 17.25 21V19C17.25 18.138 16.9076 17.3114 16.2981 16.7019C15.6886 16.0924 14.862 15.75 14 15.75H10Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.64124 3.64124C9.53204 2.75044 10.7402 2.25 12 2.25C13.2598 2.25 14.468 2.75044 15.3588 3.64124C16.2496 4.53204 16.75 5.74022 16.75 7C16.75 8.25978 16.2496 9.46796 15.3588 10.3588C14.468 11.2496 13.2598 11.75 12 11.75C10.7402 11.75 9.53204 11.2496 8.64124 10.3588C7.75044 9.46796 7.25 8.25978 7.25 7C7.25 5.74022 7.75044 4.53204 8.64124 3.64124ZM12 3.75C11.138 3.75 10.3114 4.09241 9.7019 4.7019C9.09241 5.3114 8.75 6.13805 8.75 7C8.75 7.86195 9.09241 8.6886 9.7019 9.2981C10.3114 9.90759 11.138 10.25 12 10.25C12.862 10.25 13.6886 9.90759 14.2981 9.2981C14.9076 8.6886 15.25 7.86195 15.25 7C15.25 6.13805 14.9076 5.3114 14.2981 4.7019C13.6886 4.09241 12.862 3.75 12 3.75Z" fill="#333333"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 15.75C9.13805 15.75 8.3114 16.0924 7.7019 16.7019C7.09241 17.3114 6.75 18.138 6.75 19V21C6.75 21.4142 6.41421 21.75 6 21.75C5.58579 21.75 5.25 21.4142 5.25 21V19C5.25 17.7402 5.75044 16.532 6.64124 15.6412C7.53204 14.7504 8.74022 14.25 10 14.25H14C15.2598 14.25 16.468 14.7504 17.3588 15.6412C18.2496 16.532 18.75 17.7402 18.75 19V21C18.75 21.4142 18.4142 21.75 18 21.75C17.5858 21.75 17.25 21.4142 17.25 21V19C17.25 18.138 16.9076 17.3114 16.2981 16.7019C15.6886 16.0924 14.862 15.75 14 15.75H10Z" fill="#333333"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0C7.16387 0 0 7.16387 0 16C0 24.8361 7.16387 32 16 32C24.8361 32 32 24.8361 32 16C32 7.16387 24.8361 0 16 0ZM23.8555 10.9626L21.2335 23.3394C21.0374 24.2168 20.5213 24.4335 19.7884 24.0206L15.7832 21.0684L13.8529 22.9265C13.6361 23.1432 13.4606 23.3187 13.0477 23.3187L13.3265 19.2516L20.7381 12.5523C21.0581 12.2735 20.6658 12.1084 20.2426 12.3871L11.0761 18.1574L7.1329 16.929C6.27613 16.6606 6.25548 16.0723 7.31871 15.6594L22.751 9.70323C23.4632 9.44516 24.0929 9.87871 23.8555 10.9626Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 623 B

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25023 2.25053C0 4.50106 0 8.1189 0 15.3588V16.6369C0 23.8769 0 27.4989 2.25023 29.7495C4.50046 32 8.11782 32 15.361 32H16.639C23.8779 32 27.4995 32 29.7498 29.7495C32 27.4989 32 23.8811 32 16.6369V15.3588C32 8.1189 32 4.49682 29.7498 2.24628C27.4995 0 23.8779 0 16.639 0H15.361C8.11782 0 4.50046 0 2.25023 2.25053ZM5.40056 9.73673C5.57463 18.0552 9.73544 23.0573 17.0253 23.0573H17.4372V18.2972C20.1162 18.5648 22.1414 20.5223 22.9566 23.0573H26.7438C25.7036 19.2696 22.9694 17.1762 21.2626 16.3779C22.9694 15.3928 25.3682 12.9894 25.9414 9.73673H22.5023C21.7551 12.3779 19.5431 14.7771 17.4372 15.0021V9.73673H13.9981V18.9639C11.8668 18.4289 9.17076 15.8429 9.05188 9.73673H5.40056Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 855 B

@ -0,0 +1,6 @@
<svg width="33" height="32" viewBox="0 0 33 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.568 0C15.3825 2.50628 15.3939 5.04672 14.9687 7.51149C14.1605 12.1873 11.5304 14.5683 6.79636 15.1227C4.54453 15.3866 2.2659 15.4261 0 15.5674C0 15.0765 0.160702 13.7889 0.188825 13.6262C1.18518 7.88646 4.32691 3.76713 9.62271 1.37266C11.0322 0.736552 15.0772 0 15.568 0Z" fill="white"/>
<path d="M0 16.4092C1.98668 16.5478 3.98207 16.6134 5.9567 16.8504C7.26575 17.0071 8.59221 17.2817 9.82962 17.7276C12.4651 18.6778 14.1652 20.6477 14.6935 23.3508C15.2399 26.1477 15.4375 29.0136 15.8051 31.9933C13.2814 32.0689 11.2063 31.5179 9.25913 30.5624C4.19768 28.0795 1.14634 24.0512 0.190834 18.4682C0.156685 18.268 0 16.9007 0 16.4092Z" fill="white"/>
<path d="M19.7049 0.420142C26.3895 1.89994 31.7127 8.12046 32.0114 14.8057C32.0207 15.0126 32.0127 15.2201 32.0127 15.5657C28.4491 15.4398 24.8916 15.6045 21.5845 14.0684C18.8217 12.7848 17.514 10.3837 17.0841 7.51381C16.7741 5.44276 16.7259 3.33287 16.5545 1.24039C16.5203 0.825915 16.4587 0.414116 16.4092 0.000977742C16.9 0.00030815 19.0963 0.284885 19.7049 0.420142Z" fill="white"/>
<path d="M16.3945 31.937C16.6202 29.4173 16.7032 26.9653 17.0862 24.5608C17.7719 20.2546 20.1751 17.8106 24.4544 17.1008C26.8897 16.6971 29.3799 16.6221 31.844 16.3984C32.5009 23.4211 25.5157 32.1385 16.3945 31.937Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,96 @@
'use strict';
let widthPhoneCabinet = 1200;
toggleOpenX('.cabinet-card__order', '.cabinet-card-order__open-detail', '.cabinet-card-order__detail', '.cabinet-card-order__block-detail');
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);
if (thisButtonElement){
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');
}
}
}
});
}
jQuery('.cabinet-card__button').on('click', function(){
var id = jQuery(this).data('edit')
jQuery(`#pet_edit_` + id).addClass('active')
})
jQuery('.form-sub__btn').on('click', function(){
jQuery(`#subForm`).addClass('active')
})
jQuery('.user-edit-open').on('click', function(){
jQuery(`#user_edit`).addClass('active')
})
jQuery('.cabinet-card__block-add-pets').on('click', function(){
jQuery(`#pet_add_form`).addClass('active')
})
jQuery(document).ready(function ($) {
$('.subscription-address-form').on('submit', function (e) {
e.preventDefault();
var $form = $(this);
var $message = $form.find('.form-message');
var subscriptionId = $form.data('subscription-id');
var address = $form.find('input[name="address"]').val();
var comment = $form.find('textarea[name="comment"]').val();
var nonce = $form.find('input[name="address_nonce"]').val();
$message.hide().removeClass('success error').empty();
$.ajax({
url: '/wp-admin/admin-ajax.php', // Defined in wp_localize_script
type: 'POST',
data: {
action: 'update_subscription_address',
subscription_id: subscriptionId,
address: address,
comment: comment,
address_nonce: nonce
},
success: function (response) {
if (response.success) {
$message.addClass('success').text(response.data.message).show();
} else {
$message.addClass('error').text(response.data.message).show();
}
},
error: function () {
}
});
});
});

@ -0,0 +1,193 @@
<?php
// namespace Cdek\UI;
// use Cdek\UI\Cdek\CdekApi;
// use Cdek\UI\Cdek\Config;
// use Cdek\UI\Cdek\Helpers\WeightCalc;
// use Cdek\UI\Cdek\MetaKeys;
// use Cdek\UI\Exception;
// use Cdek\UI\WC_Order_Item_Shipping;
// $api = new CdekApi();
$context = Timber::get_context();
$current_user = wp_get_current_user();
$context['current_user'] = $current_user;
$context['first_name'] = $current_user->user_firstname;
$context['last_name'] = $current_user->user_lastname;
$context['email'] = $current_user->user_email;
$context['phone'] = get_user_meta($current_user->ID, 'billing_phone', true);
$context['tg_account'] = get_user_meta($current_user->ID, 'tg_account', true);
// ACF поля для пользователя
$context['activated'] = get_field('activated', 'user_' . get_current_user_id());
$context['uuid'] = get_field('uuid', 'user_' . get_current_user_id());
// Запрос для питомцев
$current_user_id = get_current_user_id();
if ($current_user_id) {
$args = [
'post_type' => 'pets',
'meta_query' => [
[
'key' => 'user',
'value' => $current_user_id,
'compare' => '='
]
]
];
$context['pets'] = Timber::get_posts($args);
}
// Заказы пользователя
$context['customer_orders'] = wc_get_orders(['customer_id' => $current_user->ID]);
// В page-profile.php, внутри цикла заказов
// foreach ($context['customer_orders'] as &$order) {
// $meta_data = get_post_meta($order->get_id(), 'order_data', true);
// if (isset($meta_data['office_code'])) {
// $office_data = json_decode($api->getOffices(['code' => $meta_data['office_code']])['body'], true);
// $order->office_name = $office_data[0]['name'] ?? '';
// }
// }
$context['bot_username'] = defined('BOT_USERNAME') ? BOT_USERNAME : '';
// Текущий пользователь
$current_user_id = get_current_user_id();
$context['current_user_id'] = $current_user_id;
// Запрос для питомцев
// if ($current_user_id) {
// $args = [
// 'post_type' => 'pets',
// 'meta_query' => [
// [
// 'key' => 'user',
// 'value' => $current_user_id,
// 'compare' => '='
// ]
// ]
// ];
// $pets = Timber::get_posts($args);
// // Обработка ACF-полей для каждого питомца
// foreach ($pets as &$pet) {
// // ACF-поля
// $pet->weight = get_field('weight', $pet->ID);
// $pet->old = get_field('old', $pet->ID);
// $pet->activity = get_field('activity', $pet->ID);
// // Перевод веса
// switch ($pet->weight) {
// case 'below_1_5':
// $pet->weight_text = __('from 0,5 kg to 1,5 kg', 'woodmart');
// break;
// case '1_5-3':
// $pet->weight_text = __('from 1.5 to 3 kg', 'woodmart');
// break;
// case '3-5':
// $pet->weight_text = __('from 3 to 5 kg', 'woodmart');
// break;
// case '5-8':
// $pet->weight_text = __('from 5 to 8 kg', 'woodmart');
// break;
// case '8-11':
// $pet->weight_text = __('from 8 to 11 kg', 'woodmart');
// break;
// case '11-15':
// $pet->weight_text = __('from 11 to 15 kg', 'woodmart');
// break;
// case '15-20':
// $pet->weight_text = __('from 15 to 20 kg', 'woodmart');
// break;
// case '20-25':
// $pet->weight_text = __('from 20 to 25 kg', 'woodmart');
// break;
// case '25-35':
// $pet->weight_text = __('from 25 to 35 kg', 'woodmart');
// break;
// case 'more_35':
// $pet->weight_text = __('More than 35 kg', 'woodmart');
// break;
// default:
// $pet->weight_text = '';
// }
// // Перевод возраста
// switch ($pet->old) {
// case 'normal':
// $pet->old_text = __('Adult (from 1 year to 7 years)', 'woodmart');
// break;
// case 'old':
// $pet->old_text = __('Elderly (from 7 to 12 years)', 'woodmart');
// break;
// case 'very_old':
// $pet->old_text = __('Aging (12 years and older)', 'woodmart');
// break;
// case 'baby':
// $pet->old_text = __('Baby (from 0 to 1 year)', 'woodmart');
// break;
// default:
// $pet->old_text = '';
// }
// // Перевод активности
// switch ($pet->activity) {
// case 'low':
// $pet->activity_text = __('Low', 'woodmart');
// break;
// case 'moderate':
// $pet->activity_text = __('Moderate', 'woodmart');
// break;
// case 'high':
// $pet->activity_text = __('High', 'woodmart');
// break;
// default:
// $pet->activity_text = '';
// }
// }
// $context['pets'] = $pets;
// }
// Месяцы для локализации
$context['months'] = [
__('january', 'woodmart'),
__('february', 'woodmart'),
__('march', 'woodmart'),
__('april', 'woodmart'),
__('may', 'woodmart'), // Исправлено 'mail' на 'may'
__('june', 'woodmart'),
__('july', 'woodmart'),
__('august', 'woodmart'),
__('september', 'woodmart'),
__('october', 'woodmart'),
__('november', 'woodmart'),
__('december', 'woodmart'),
];
if ($orders_pg){
Timber::render('profile/profile-orders.twig', $context);
}
else{
Timber::render('profile/profile.twig', $context);
}
?>

@ -0,0 +1,143 @@
<?php
if (!defined('ABSPATH')) {
exit;
}
use Timber\Timber;
add_filter('timber/twig/filters', function ($filters) {
$filters['wp_get_attachment_image_src'] = [
'callable' => function ($attachment_id, $size = 'thumbnail', $icon = false) {
$image = wp_get_attachment_image_src($attachment_id, $size, $icon);
return $image ? $image[0] : ''; // Return the URL or empty string
},
];
return $filters;
});
add_filter('timber/twig/functions', function ($functions) {
$functions['wc_get_page_permalink'] = [
'callable' => 'wc_get_page_permalink',
];
$functions['wc_get_endpoint_url'] = [
'callable' => 'wc_get_endpoint_url',
];
$functions['is_wc_endpoint_url'] = [
'callable' => 'is_wc_endpoint_url',
];
$functions['get_permalink'] = [
'callable' => 'get_permalink',
];
$functions['get_the_ID'] = [
'callable' => 'get_the_ID',
];
$functions['pll_e'] = [
'callable' => 'pll_e',
];
return $functions;
});
// Get subscription ID from URL (e.g., /my-account/view-subscription/7632/)
$request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
if (preg_match('/view-subscription\/(\d+)/', $request_uri, $matches)) {
$subscription_id = absint($matches[1]);
}
$subscription = $subscription_id ? wcs_get_subscription($subscription_id) : null;
if (!$subscription || !wcs_is_subscription($subscription) || $subscription->get_user_id() !== get_current_user_id()) {
error_log('Invalid or inaccessible subscription ID: ' . $subscription_id);
$subscription = null;
} else {
error_log('Subscription ID: ' . $subscription->get_id() . ' | Status: ' . $subscription->get_status());
$items = array_map(function ($item) {
$product_id = $item->get_product_id();
$variation_id = $item->get_variation_id();
$wc_product = $product_id ? wc_get_product($variation_id ?: $product_id) : null;
$product_name = $wc_product ? $wc_product->get_name() : 'Unknown Product';
$image_id = $wc_product ? $wc_product->get_image_id() : 0;
$status = $product_id ? get_post_status($product_id) : 'N/A';
$permalink = $wc_product && $wc_product->is_visible() ? get_permalink($product_id) : '';
$variation_details = $variation_id ? wc_get_formatted_variation($wc_product, true) : '';
error_log('Item ID: ' . $item->get_id() . ' | Product ID: ' . $product_id . ' | Variation ID: ' . $variation_id . ' | Name: ' . $product_name . ' | Permalink: ' . $permalink . ' | Status: ' . $status);
return [
'product' => [
'id' => $product_id ?: 0,
'name' => $product_name,
'image_id' => $image_id,
'variation_details' => $variation_details,
],
'quantity' => $item->get_quantity(),
'total' => $item->get_total(),
];
}, $subscription->get_items());
$cancel_url = '';
if ($subscription->can_be_updated_to('cancelled')) {
$cancel_url = add_query_arg(
[
'subscription_id' => $subscription->get_id(),
'change_subscription_to' => 'cancelled',
'_wpnonce' => wp_create_nonce('wcs_switch_request'),
],
wc_get_endpoint_url('view-subscription', $subscription->get_id(), wc_get_page_permalink('myaccount'))
);
}
$subscription_data = [
'id' => $subscription->get_id(),
'status' => $subscription->get_status(),
'date_created' => $subscription->get_date_created(),
'last_order_date' => $subscription->get_date('last_order_date_created'),
'next_payment_date' => $subscription->get_date('next_payment'),
'payment_method_title' => $subscription->get_payment_method_title(),
'total' => $subscription->get_total(),
'currency' => $subscription->get_currency(),
'items' => $items,
'cancel_url' => $cancel_url,
'shipping_address' => $subscription->get_formatted_shipping_address(),
'shipping_comment' => $subscription->get_customer_note(),
];
}
// Timber context
$context = Timber::context();
$current_user = wp_get_current_user();
$context['current_user'] = $current_user;
$context['first_name'] = $current_user->user_firstname;
$context['last_name'] = $current_user->user_lastname;
$context['email'] = $current_user->user_email;
$context['phone'] = get_user_meta($current_user->ID, 'billing_phone', true);
$context['tg_account'] = get_user_meta($current_user->ID, 'tg_account', true);
// ACF поля для пользователя
$context['activated'] = get_field('activated', 'user_' . get_current_user_id());
$context['uuid'] = get_field('uuid', 'user_' . get_current_user_id());
// Запрос для питомцев
$current_user_id = get_current_user_id();
if ($current_user_id) {
$args = [
'post_type' => 'pets',
'meta_query' => [
[
'key' => 'user',
'value' => $current_user_id,
'compare' => '='
]
]
];
$context['pets'] = Timber::get_posts($args);
}
$context['bot_username'] = defined('BOT_USERNAME') ? BOT_USERNAME : '';
$context['subscription'] = $subscription_data;
// Debug: Log subscription data
error_log('Subscription Data: ' . print_r($subscription_data, true));
// Render the Twig template
Timber::render('profile/profile-subs-single.twig', $context);
?>

@ -0,0 +1,107 @@
<?php
if (!defined('ABSPATH')) {
exit;
}
add_filter('timber/twig/filters', function ($filters) {
$filters['wp_get_attachment_image_src'] = [
'callable' => function ($attachment_id, $size = 'thumbnail', $icon = false) {
$image = wp_get_attachment_image_src($attachment_id, $size, $icon);
return $image ? $image[0] : ''; // Return the URL or empty string
},
];
return $filters;
});
use Timber\Timber;
$context = Timber::context();
if (!class_exists('WC_Subscriptions')) {
error_log('WooCommerce Subscriptions plugin is not active.');
return;
}
// Get the current user’s subscriptions
$user_id = get_current_user_id();
$subscriptions = wcs_get_users_subscriptions($user_id);
$subscription_data = [];
foreach ($subscriptions as $subscription) {
$view_url = $subscription->get_view_order_url();
// Debug: Log the view_url to check its value
error_log('Subscription ID: ' . $subscription->get_id() . ' | View URL: ' . $view_url);
$subscription_data[] = [
'id' => $subscription->get_id(),
'date_created' => $subscription->get_date_created(),
'total' => $subscription->get_total(),
'currency' => $subscription->get_currency(),
'billing_period' => $subscription->get_billing_period(),
'next_payment_date' => $subscription->get_date('next_payment'),
'view_url' => esc_url($view_url), // Ensure URL is escaped for safety
'items' => array_map(function ($item) {
$product = $item->get_product();
return [
'product' => [
'name' => $product->get_name(),
'image_id' => $product->get_image_id(),
],
];
}, $subscription->get_items()),
];
}
$context['subscriptions'] = $subscription_data;
// Debug: Log the entire subscriptions array
error_log('Subscriptions Data: ' . print_r($subscription_data, true));
// Render the Twig template
$current_user = wp_get_current_user();
$context['current_user'] = $current_user;
$context['first_name'] = $current_user->user_firstname;
$context['last_name'] = $current_user->user_lastname;
$context['email'] = $current_user->user_email;
$context['phone'] = get_user_meta($current_user->ID, 'billing_phone', true);
$context['tg_account'] = get_user_meta($current_user->ID, 'tg_account', true);
// ACF поля для пользователя
$context['activated'] = get_field('activated', 'user_' . get_current_user_id());
$context['uuid'] = get_field('uuid', 'user_' . get_current_user_id());
$context['bot_username'] = defined('BOT_USERNAME') ? BOT_USERNAME : '';
// Запрос для питомцев
$current_user_id = get_current_user_id();
if ($current_user_id) {
$args = [
'post_type' => 'pets',
'meta_query' => [
[
'key' => 'user',
'value' => $current_user_id,
'compare' => '='
]
]
];
$context['pets'] = Timber::get_posts($args);
}
// Месяцы для локализации
$context['months'] = [
__('january', 'woodmart'),
__('february', 'woodmart'),
__('march', 'woodmart'),
__('april', 'woodmart'),
__('may', 'woodmart'),
__('june', 'woodmart'),
__('july', 'woodmart'),
__('august', 'woodmart'),
__('september', 'woodmart'),
__('october', 'woodmart'),
__('november', 'woodmart'),
__('december', 'woodmart'),
];
Timber::render('profile/profile-subs.twig', $context);
?>

@ -0,0 +1,134 @@
<?php
// include_module('profile');
// Сохранить значения полей
add_action('wp_ajax_edit_user', 'save_custom_user_profile_fields');
add_action('wp_ajax_nopriv_edit_user', 'save_custom_user_profile_fields'); //
function save_custom_user_profile_fields() {
// Проверка прав пользователя
wp_update_user( array(
'ID' => get_current_user_id(),
'first_name' => $_POST['name'],
'last_name' => $_POST['l_name'],
) );
$phone = update_user_meta( get_current_user_id(), 'billing_phone', $_POST['phone'] );
}
function ajax_add_pet() {
$current_user = wp_get_current_user();
// Подготовка данных
$pet_name = $_POST['name'];
$old_type = $_POST['old_type'];
if ($old_type == 'ex'){
$old= $_POST['old'];
}
$weight= $_POST['weight'];
$activity = $_POST['activity'];
$pet = $_POST['pet'];
$breed = $_POST['breed'];
$sex = $_POST['sex'];
$user = $current_user->ID;
$post_data = array(
'post_title' => $pet_name,
'post_type' => 'pets',
'post_status' => 'publish',
);
$post_id = wp_insert_post($post_data);
var_dump($post_id);
if ($post_id) {
// Добавление мета-полей
if ($old_type == 'ex'){
update_field( 'old', $old, $post_id );
}
else{
update_field( 'day', $_POST['day'], $post_id );
update_field( 'month', $_POST['month'], $post_id );
update_field( 'year', $_POST['year'], $post_id );
}
update_field( 'weight', $weight, $post_id );
update_field( 'breed', $breed, $post_id );
update_field( 'sex', $sex, $post_id );
update_field( 'type', $pet, $post_id );
update_field( 'user', $user, $post_id );
update_field( 'activity', $activity, $post_id );
if($_POST['sterilized']=='1' && $pet=='cat'){
update_field( 'sterilized', true );
}
else{
update_field( 'sterilized', false );
}
wp_send_json_success('Питомец успешно добавлен!');
} else {
wp_send_json_error('Ошибка при добавлении питомца.');
}
wp_die(); // Завершение работы
}
add_action('wp_ajax_add_pet', 'ajax_add_pet');
add_action('wp_ajax_nopriv_add_pet', 'ajax_add_pet'); // Если нужно разрешить для незалогиненных пользователей
function ajax_edit_pet() {
$current_user = wp_get_current_user();
// Подготовка данных
$pet_name = $_POST['name'];
$old_type = $_POST['old_type'];
if ($old_type == 'ex'){
$old= $_POST['old'];
}
else{
$old_acc = $_POST['day'] . ' ' . $_POST['month'] . ' ' . $_POST['year'];
}
$weight= $_POST['weight'];
$activity = $_POST['activity'];
$pet = $_POST['pet'];
$breed = $_POST['breed'];
$sex = $_POST['sex'];
$user = $current_user->ID;
$post_id = intval($_POST['pet_id']);
if (get_field('user', $post_id) == $user) {
// Добавление мета-полей
if ($old_type == 'ex'){
update_field( 'old', $old, $post_id );
}
else{
update_field( 'old', '', $post_id );
update_field( 'day', $_POST['day'], $post_id );
update_field( 'month', $_POST['month'], $post_id );
update_field( 'year', $_POST['year'], $post_id );
}
update_field( 'weight', $weight, $post_id );
update_field( 'breed', $breed, $post_id );
update_field( 'sex', $sex, $post_id );
update_field( 'type', $pet, $post_id );
update_field( 'activity', $activity, $post_id );
if($_POST['sterilized']=='1' && $pet=='cat'){
update_field( 'sterilized', true );
}
else{
update_field( 'sterilized', false );
}
wp_send_json_success('Питомец успешно отредактирован!');
} else {
wp_send_json_error('Ошибка при редактировании питомца.');
}
wp_die(); // Завершение работы
}
add_action('wp_ajax_edit_pet', 'ajax_edit_pet');
add_action('wp_ajax_nopriv_edit_pet', 'ajax_edit_pet');

@ -0,0 +1,2 @@
<?php
$context = Timber::get_context();

@ -18,9 +18,7 @@ jQuery(document).ready(function($) {
});
// Увеличение количества
$(document).on('click', '.modal__basket .counter__button.plus', function(e) {
e.preventDefault();
const key = $(this).data('key');
const input = $(this).siblings('.counter__input');
@ -29,20 +27,24 @@ jQuery(document).ready(function($) {
});
// Уменьшение количества
$(document).on('click', '.modal__basket .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');
if (quantity <= 0) {
removeItem(key); // Вызываем удаление, если количество становится 0
} else {
input.val(quantity).trigger('change'); // Обновляем количество, если больше 0
}
});
$(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) {
@ -57,55 +59,54 @@ jQuery(document).ready(function($) {
// Хранилище временно удалённых товаров
const removedItemsStorageKey = 'woocommerce_removed_items';
function restoreRemovedItems() {
const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || [];
if (removedItems.length === 0) return;
$('#modal-basket').addClass('loading');
const removedItems = JSON.parse(localStorage.getItem(removedItemsStorageKey)) || [];
if (removedItems.length === 0) return;
// Создаем копию массива для работы
let itemsToRemove = [...removedItems];
function processNextItem() {
if (itemsToRemove.length === 0) {
// Все элементы обработаны
localStorage.removeItem(removedItemsStorageKey);
updateCartFragment();
$('#modal-basket').removeClass('loading');
return;
}
$('#modal-basket').addClass('loading');
const element = itemsToRemove.shift(); // Берем первый элемент
// Создаем копию массива для работы
let itemsToRemove = [...removedItems];
$.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();
function processNextItem() {
if (itemsToRemove.length === 0) {
// Все элементы обработаны
localStorage.removeItem(removedItemsStorageKey);
updateCartFragment();
$('#modal-basket').removeClass('loading');
return;
}
});
}
// Начинаем обработку
processNextItem();
}
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();
@ -125,7 +126,7 @@ jQuery(document).ready(function($) {
// Показываем кнопку восстановления
$item.html(`
<p class="modal-basket-item__title">
Удаление товара из корзины: <span id="${key}_timer" class="timer_counter">5</span>с
Removing an item from the cart: <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}">
@ -134,14 +135,29 @@ jQuery(document).ready(function($) {
</div>
`);
// Проверяем количество товаров в корзине
$.ajax({
type: 'POST',
url: woocommerce_params.ajax_url,
data: {
action: 'check_cart_count'
},
success: function(response) {
if (response.success && response.data.count <= 1) {
// Если после удаления корзина станет пустой (1 товар сейчас, удаляем его)
$('.proceed-to-checkout').css('display', 'none');
}
}
});
// Удаляем через 5 секунд, если не восстановили
const removeTimeout = setTimeout(() => {
permanentRemoveItem(key, productId, variationId);
}, 5000);
const product_remove_timer = setInterval(() => {
let number = Number($(`#${key}_timer`).html()) - 1
$(`#${key}_timer`).html(number)
let number = Number($(`#${key}_timer`).html()) - 1;
$(`#${key}_timer`).html(number);
}, 1000);
// Обработчик восстановления
@ -207,6 +223,9 @@ jQuery(document).ready(function($) {
);
localStorage.setItem(removedItemsStorageKey, JSON.stringify(updatedItems));
// Показываем кнопку Proceed to checkout
$('.proceed-to-checkout').css('display', '');
updateCartFragment();
}
}
@ -318,19 +337,22 @@ jQuery(document).ready(function($) {
$('#modal-basket').removeClass('loading');
},
success: function(response) {
console.log(response)
console.log(response);
if (response.success) {
$('#modal-basket-content').html(response.data.contents);
$('.modal-block-price__price').html(response.data.total);
$('.mini-profile__button--counter').text(response.data.count);
if(response.data.count > 0){
$('.mini-profile__button--counter').removeClass('disabled')
if (response.data.count > 0) {
$('.mini-profile__button--counter').removeClass('disabled');
$('.proceed-to-checkout').css('display', ''); // Показываем кнопку, если есть товары
} else {
$('.mini-profile__button--counter').addClass('disabled');
$('.proceed-to-checkout').css('display', 'none'); // Скрываем кнопку, если корзина пуста
}
else(
$('.mini-profile__button--counter').addClass('disabled')
)
}
},
error: function(xhr, status, error) {
console.error('AJAX error:', error);
}
});
}
@ -356,6 +378,4 @@ jQuery(document).ready(function($) {
}
}
});
});
});

@ -1304,4 +1304,40 @@
.cdek-office-info{
display: none;
}
.quantity-control {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}
.quantity-decrease, .quantity-increase {
background: #f0f0f0;
border: none;
padding: 5px 10px;
cursor: pointer;
font-size: 16px;
border-radius: 4px;
}
.quantity-decrease:hover, .quantity-increase:hover {
background: #e0e0e0;
}
.quantity-input {
width: 50px;
text-align: center;
border: 1px solid #ccc;
border-radius: 4px;
padding: 5px;
}
.remove-item {
background: #ff4d4d;
color: white;
border: none;
padding: 5px 10px;
cursor: pointer;
border-radius: 4px;
}
.remove-item:hover {
background: #e63939;
}

@ -130,7 +130,7 @@ jQuery(document).ready(function ($) {
$('#billing_phone-error').addClass('active');
}
if (errorMessage == 'Order pickup point not selected.' || errorMessage == 'Не выбран ПВЗ для доставки заказа.'){
$('#pvz-error').html(errorMessage)
$('#pvz-error').html('Не выбран ПВЗ для доставки заказа.')
$('#pvz-error').addClass('active');
}
if (errorMessage == 'adress_error'){
@ -159,3 +159,174 @@ jQuery(document).ready(function ($) {
})
});
jQuery(document).ready(function($) {
// Функция для получения активных фильтров из URL
function getActiveFilters() {
const params = new URLSearchParams(window.location.search);
const filters = [];
params.forEach((value, key) => {
if (key.startsWith('filter_') || key === 'min_price' || key === 'max_price') {
let filterName = key.replace('filter_', '').replace('_', ' ');
let filterValue = value.split(',').map(val => decodeURIComponent(val.replace(/\+/g, ' ')));
if (key === 'min_price') {
filterName = 'Цена от';
filterValue = [value + ' ₽'];
} else if (key === 'max_price') {
filterName = 'Цена до';
filterValue = [value + ' ₽'];
}
filters.push({
key: key,
name: filterName.charAt( W1).toUpperCase() + filterName.slice(1),
values: filterValue
});
}
});
return filters;
}
// Функция для отображения активных фильтров
function displayActiveFilters() {
const $filterList = $('.active-filters__list');
const $filterContainer = $('.active-filters');
const $clearButton = $('.active-filters__clear');
$filterList.empty();
const activeFilters = getActiveFilters();
if (activeFilters.length > 0) {
$filterContainer.show();
$clearButton.show();
activeFilters.forEach(filter => {
filter.values.forEach(value => {
const $filterTag = $('<span>', {
class: 'active-filters__tag',
html: `${filter.name}: ${value} <span class="active-filters__remove" data-key="${filter.key}" data-value="${value}">&times;</span>`
});
$filterList.append($filterTag);
});
});
W2 else {
$filterContainer.hide();
$clearButton.hide();
}
}
// Инициализация при загрузке страницы
displayActiveFilters();
// Обновление фильтров после AJAX-фильтрации
$(document).on('wcpf_after_filtering', function() {
displayActiveFilters();
});
// Удаление фильтра
$(document).on('click', '.active-filters__remove', function() {
const key = $(this).data('key');
const value = $(this).data('value');
const params = new URLSearchParams(window.location.search);
if (key === 'min_price' || key === 'max_price') {
params.delete(key);
} else {
let values = params.get(key) ? params.get(key).split(',') : [];
values = values.filter(val => decodeURIComponent(val.replace(/\+/g, ' ')) !== value);
if (values.length > 0) {
params.set(key, values.join(','));
} else {
params.delete(key);
}
}
const newUrl = window.location.pathname + (params.toString() ? '?' + params.toString() : '');
window.history.pushState({}, '', newUrl);
// Запуск AJAX-фильтрации
$.ajax({
url: wc_checkout_params.ajax_url,
type: 'POST',
data: {
action: 'wcpf_filter',
query: params.toString(),
category_id: $('#load-more-products').data('category_id'),
category_type: $('#load-more-products').data('category_type')
},
success: function(response) {
if (response.success) {
$('.product__main').html(response.data.products);
displayActiveFilters();
$(document.body).trigger('wc_fragments_refreshed');
}
},
error: function() {
alert('Ошибка при обновлении фильтров');
}
});
});
// Очистка всех фильтров
$(document).on('click', '.active-filters__clear', function() {
const params = new URLSearchParams(window.location.search);
const newUrl = window.location.pathname;
window.history.pushState({}, '', newUrl);
$.ajax({
url: wc_checkout_params.ajax_url,
type: 'POST',
data: {
action: 'wcpf_filter',
query: '',
category_id: $('#load-more-products').data('category_id'),
category_type: $('#load-more-products').data('category_type')
},
success: function(response) {
if (response.success) {
$('.product__main').html(response.data.products);
displayActiveFilters();
$(document.body).trigger('wc_fragments_refreshed');
}
},
error: function() {
alert('Ошибка при очистке фильтров');
}
});
});
// Обработка загрузки дополнительных продуктов
$(document).on('click', '#load-more-products', function() {
const $button = $(this);
const categoryId = $button.data('category_id');
const categoryType = $button.data('category_type');
const page = parseInt($button.data('page') || 1) + 1;
$.ajax({
url: wc_checkout_params.ajax_url,
type: 'POST',
data: {
action: 'load_more_products',
category_id: categoryId,
category_type: categoryType,
page: page,
query: window.location.search
},
success: function(response) {
if (response.success) {
$('.product__main').append(response.data.products);
$button.data('page', page);
if (!response.data.has_more) {
$button.hide();
}
}
},
error: function() {
alert('Ошибка при загрузке продуктов');
}
});
});
});

@ -0,0 +1,65 @@
/* Основные стили страницы */
.woocommerce-order {
max-width: 800px;
margin: 2rem auto;
padding: 2rem;
background: #fff;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
border-radius: 8px;
}
/* Заголовок */
.woocommerce-order h2.woocommerce-order-details__title,
.woocommerce-order h2.woocommerce-column__title {
color: #333;
border-bottom: 2px solid #eee;
padding-bottom: 10px;
}
/* Детали заказа */
.woocommerce-order-overview {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 2rem;
}
.woocommerce-order-overview li {
flex: 1;
min-width: 200px;
background: #f9f9f9;
padding: 1rem;
border-radius: 4px;
}
/* Кнопка "Вернуться в магазин" */
.woocommerce-button.button.wc-backward {
background: #4CAF50;
color: white;
padding: 10px 20px;
border-radius: 4px;
text-decoration: none;
display: inline-block;
margin-top: 20px;
}
.woocommerce-button.button.wc-backward:hover {
background: #3e8e41;
}
@media (max-width: 768px) {
.woocommerce-order {
padding: 1rem;
margin: 1rem;
}
.woocommerce-order-overview li {
min-width: 100%;
}
.woocommerce-order-details,
.woocommerce-customer-details {
margin-top: 1rem;
}
}

@ -0,0 +1,55 @@
jQuery(document).ready(function($) {
window.onTelegramAuth = function(user) {
$.ajax({
type: 'POST',
url: telegram_auth_params.ajax_url,
data: {
action: 'ontelegramauth',
userid: user.id,
username: user.username || '',
fname: user.first_name || '',
lname: user.last_name || '',
photo_url: user.photo_url || '',
auth_date: user.auth_date,
hash: user.hash
},
success: function(response) {
if (response.success) {
window.location.href = telegram_auth_params.my_account_url;
} else {
alert(telegram_auth_params.i18n_error + ': ' + (response.data.message || 'Unknown error'));
}
},
error: function() {
alert(telegram_auth_params.i18n_error);
}
});
};
window.linkTelegram = function(user) {
$.ajax({
type: 'POST',
url: telegram_auth_params.ajax_url,
data: {
action: 'linktelegram',
userid: user.id,
username: user.username || '',
fname: user.first_name || '',
lname: user.last_name || '',
photo_url: user.photo_url || '',
auth_date: user.auth_date,
hash: user.hash
},
success: function(response) {
if (response.success) {
$('.cabinet-accounts').html('<svg width="40px" height="40px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z" fill="#40B3E0"></path><path d="M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308" fill="#FFFFFF"></path><path d="M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475" fill="#D2E5F1"></path><path d="M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624" fill="#B5CFE4"></path></g></svg>');
} else {
alert(telegram_auth_params.i18n_error_link + ': ' + (response.data.message || 'Unknown error'));
}
},
error: function() {
alert(telegram_auth_params.i18n_error_link);
}
});
};
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -15,33 +15,30 @@
</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') }}
{% if not fn('WC').cart.is_empty and fn('WC').cart.get_total('raw') > 0 %}
<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">
{{ __('Proceed to checkout', 'woocommerce') }}
</a>
</div>
</div>
{% else %}
<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>
</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>
{% endif %}
</div>
{% endif %}
</div>

@ -0,0 +1,51 @@
<div class="modal__item modal__login">
<button class="modal__close">
<img src="<?php bloginfo('template_url');?>/gp-include/assets/core/img/svg/main/black-x.svg" alt="">
</button>
<div class="login_wrap login_forms">
<div class="login_inner step active">
<h2 class="login_title">Войти или зарегистрироваться</h2>
<div class="login_subtitle">Подтвердите свой e-mail в письме</div>
<div class="login_input js-input-email">
<input type="text" name="email" placeholder="example@example.com"/>
<div class="login_error"></div>
</div>
<button class="login_btn btn_gradient js-get-code">Получить код</button>
{{ function('tgWidget') }}
</div>
<div class="login_inner step">
<div class="login_back">
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="32" height="32" rx="16" fill="#121212"/><path d="M8.5 16.3633H25" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.5 16.3633L14.864 22.7272" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.5 16.3633L14.864 9.99932" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
</div>
<h2 class="login_title">Введите код</h2>
<div class="login_subtitle">Код отправленный на e-mail:<span class="sended_email"></span></div>
<div class="login_input js-input-code">
<input type="text" name="code" placeholder="0000"/>
<div class="login_error"></div>
</div>
<div class="login_timer">Запросить новый код: <span class="seconds">15</span> секунд</div>
<button class="login_btn btn_gradient js-repeat-code">Запросить новый код</button>
</div>
<div class="login_privacy">
Нажимая на кнопку «Получить код», я даю согласие на обработку моих персональных данных в соответствии с <a href="/privacy-policy">политикой обработки персональных данных</a>
</div>
</div>
<div class="login_wrap login_success hide">
<div class="login_inner active">
<h2 class="login_title">Спасибо<br />за авторизацию</h2>
<div class="login_subtitle">Теперь вы можете получать промокоды за покупки.</div>
<img src="<?php bloginfo('template_url');?>/images/people.png" alt=""/>
<a href="/my-account" class="login_btn account_link">Заполнить профиль</a>
</div>
</div>
<div class="login_wrap login_auth hide">
<div class="login_inner active">
<h2 class="login_title --text-center">
Вы вошли в систему</h2>
<img src="<?php bloginfo('template_url');?>/images/people.png" alt=""/>
<a href="/my-account" class="login_btn account_link">Профиль</a>
</div>
</div>
</div>

@ -0,0 +1,611 @@
<main class="wrapper">
<div class="cabinet-card cabinet-card--green-white cabinet__subscription-mobile">
<div class="cabinet-card__content">
<p class="cabinet-card__title">
{{ function('pll_e', 'Feed subscription') }}
</p>
<div class="cabinet-card__element">
<p class="cabinet-card__text">{{ function('pll_e', 'Weekly food delivery for your pet') }}</p>
</div>
<div class="cabinet-card__element">
<button class="button button--gradient button--high-46 form-sub__btn">
{{ function('pll_e', 'Get details') }}
</button>
</div>
</div>
</div>
<div class="cabinet__control cabinet__control--column">
<a href="{{ fn('wc_get_page_permalink', 'myaccount') }}" class="to-know to-know--start button--100-perc to-know--background-none">
<p>{{ fn('pll_e', 'Перейти в профиль') }}</p>
</a>
<div class="form-input__tabs form-input__tabs--control form-input__tabs--white">
<a href="{{ fn('wc_get_endpoint_url', 'orders', '', fn('wc_get_page_permalink', 'myaccount')) }}" class="form-input-tabs__button {% if fn('is_wc_endpoint_url','orders') %}active{% endif %}">
{{ fn('pll_e', 'Заказы') }}
</a>
<a href="{{ fn('wc_get_page_permalink', 'myaccount') }}subscriptions" class="form-input-tabs__button {% if fn('is_wc_endpoint_url','subscriptions') %}active{% endif %}">
{{ fn('pll_e', 'Подписки') }}
</a>
</div>
</div>
<div class="cabinet">
<div class="cabinet__profile cabinet-content {% if not fn('is_wc_endpoint_url') %}active hide{% endif %}">
<div class="form-input__tabs form-input__tabs--control form-input__tabs--white">
<a href="{{ fn('wc_get_endpoint_url', '', '', fn('wc_get_page_permalink', 'myaccount')) }}" class="form-input-tabs__button {% if not fn('is_wc_endpoint_url') %}active{% endif %}">
{{ fn('pll_e', 'Заказы') }}
</a>
<a href="subscriptions" class="form-input-tabs__button {% if fn('is_wc_endpoint_url','subscriptions') %}active{% endif %}">
{{ fn('pll_e', 'Подписки') }}
</a>
</div>
<div class="cabinet-card cabinet-card--green">
<div class="cabinet-card__content">
<div class="cabinet-card__element">
<p class="cabinet-card__text {% if not first_name and not last_name %}cabinet-card__text--grey{% endif %}">
{% if first_name or last_name %}
{{ first_name }} {{ last_name }}
{% else %}
{{ function('pll_e', 'Name is not set') }}
{% endif %}
</p>
</div>
<div class="cabinet-card__element">
<p class="cabinet-card__label">{{ function('pll_e', 'Phone') }}:</p>
<p class="cabinet-card__text {% if not phone %}cabinet-card__text--grey{% endif %}">
{% if phone %}
{{ phone }}
{% else %}
{{ function('pll_e', 'Not filled') }}
{% endif %}
</p>
</div>
<div class="cabinet-card__element">
<p class="cabinet-card__label">{{ function('pll_e', 'Email') }}:</p>
{% if email %}
<p class="cabinet-card__text">{{ email }}</p>
{% if activated %}
<p class="cabinet-card__status cabinet-card__status--chek">{{ function('pll_e', 'Email is verified') }}</p>
{% else %}
<p class="cabinet-card__status cabinet-card__status--cancelled">{{ function('pll_e', 'Email is not verified') }}</p>
<form class="email_approve_form">
<input type="hidden" name="action" value="email_activate">
<button type="submit" class="cabinet-card__confirm">{{ function('pll_e', 'Verify') }}</button>
</form>
{% if uuid %}
<p class="cabinet-card__status">{{ function('pll_e', 'Email with verification link is sent to your email.') }}</p>
{% endif %}
{% endif %}
{% else %}
<div class="cabinet-card__label">
<form class="email_link_form">
<input type="hidden" name="action" value="email_link">
<div class="cabinet-card_linked-email">
<input class="form__input" type="text" name="email" placeholder="example@example.com" required>
</div>
<button class="cabinet-card__confirm" type="submit">{{ function('pll_e', 'Link email') }}</button>
</form>
</div>
{% endif %}
</div>
<div class="cabinet-card__element">
<p class="cabinet-card__label">{{ function('pll_e', 'Linked accounts') }}:</p>
<p class="cabinet-card__text cabinet-accounts">
{% if tg_account %}
<svg width="40px" height="40px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
<g>
<path d="M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z" fill="#40B3E0"></path>
<path d="M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308" fill="#FFFFFF"></path>
<path d="M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475" fill="#D2E5F1"></path>
<path d="M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624" fill="#B5CFE4"></path>
</g>
</svg>
{% else %}
<script async src="https://telegram.org/js/telegram-widget.js?2" data-telegram-login="{{ bot_username }}" data-size="large" data-onauth="linkTelegram(user)"></script>
{% endif %}
</p>
</div>
<div class="cabinet-card__element">
<div class="cabinet-card__block-buttons">
<button class="cabinet-card__button user-edit-open">{{ function('pll_e', 'Edit') }}</button>
<a href="{{ fn('wp_logout_url', fn('home_url')) }}" class="cabinet-card__button">{{ function('pll_e', 'Logout') }}</a>
</div>
</div>
</div>
</div>
{% if pets %}
{% for pet in pets %}
{% include 'pet-card.twig' with { 'item': pet } %}
{% endfor %}
{% endif %}
<div class="cabinet-card cabinet-card--green">
<div class="cabinet-card__content">
<button class="cabinet-card__block-add-pets form-open" data-form="form-pet">
<div class="cabinet-card-add-pets__circle">
<img src="{{ theme.link }}/static/img/svg/main/plus-grey.svg" alt="">
</div>
<p class="cabinet-card-add-pets__text">{{ function('pll_e', 'Add a pet') }}</p>
</button>
</div>
</div>
</div>
{% block profile_content %}
{% endblock %}
</main>
<div class="modalProfile" id="pet_add_form">
<div class="popup-wrap">
<div class="modal-form form__full-mobile modal-form--white modal-form--height-100-phone form-pet active">
<button class="modal-form__close"></button>
<p class="modal-form__title">{{ fn('pll_e', 'Добавить питомца') }}</p>
<form class="modal-form__content" id="add-pet-form" method="post" action="">
<input type="hidden" name="nonce" value="{{ fn('wp_create_nonce', 'add_pet_nonce') }}">
<input type="hidden" name="action" value="add_pet">
<div class="modal-form-content__line">
<label for="" class="label-name">{{ fn('pll_e', 'Вид животного') }}</label>
<div class="form-input__tabs">
<label for="pet_type_cat" class="form-input-tabs__button active">
{{ fn('pll_e', 'Кошка') }}
<input type="radio" value="cat" checked name="pet" id="pet_type_cat" class="form-input-tabs__input">
</label>
<label for="pet_type_dog" class="form-input-tabs__button">
{{ fn('pll_e', 'Собака') }}
<input type="radio" value="dog" name="pet" id="pet_type_dog" class="form-input-tabs__input">
</label>
</div>
</div>
<div class="modal-form-content__line sterilized">
<label for="" class="label-name">{{ fn('pll_e', 'Стерелизован') }}</label>
<div class="form-input__tabs">
<label for="sterilized_yes" class="form-input-tabs__button active">
{{ fn('pll_e', 'Да') }}
<input type="radio" value="1" checked name="sterilized" id="sterilized_yes" class="form-input-tabs__input">
</label>
<label for="sterilized_no" class="form-input-tabs__button">
{{ fn('pll_e', 'Нет') }}
<input type="radio" value="0" name="sterilized" id="sterilized_no" class="form-input-tabs__input">
</label>
</div>
</div>
<div class="modal-form-content__line">
<div class="modal-form-content-line__element">
<label for="pet_name" class="label-name">{{ fn('pll_e', 'Имя') }}</label>
<input id="pet_name" class="form__input" type="text" name="name" placeholder="{{ fn('pll_e', 'Имя питомца') }}" required>
</div>
</div>
<div class="modal-form-content__line">
<div class="modal-form-content-line__element">
<label for="pet_breed" class="label-name">{{ fn('pll_e', 'Порода') }}</label>
<input id="pet_breed" class="form__input" type="text" name="breed" placeholder="{{ fn('pll_e', 'Порода вашего питомца') }}" required>
</div>
</div>
<div class="modal-form-content__line">
<label for="" class="label-name">{{ fn('pll_e', 'Пол вашего питомца') }}</label>
<div class="form-input__tabs">
<label for="pet_sex_male" class="form-input-tabs__button active">
{{ fn('pll_e', 'Мальчик') }}
<input type="radio" value="male" checked name="sex" id="pet_sex_male" class="form-input-tabs__input">
</label>
<label for="pet_sex_female" class="form-input-tabs__button">
{{ fn('pll_e', 'Девочка') }}
<input type="radio" value="female" name="sex" id="pet_sex_female" class="form-input-tabs__input">
</label>
</div>
</div>
<div class="modal-form-content__line modal-form-content__line--two">
<div class="modal-form-content-line__element">
<label class="label-name">{{ fn('pll_e', 'Вид активности') }}</label>
<div class="form-input__list">
<div class="form-input-list__input">{{ fn('pll_e', 'Выберите из списка') }}</div>
<div class="form-input-list__block-content" style="height: 0px;">
<div class="form-input-list__content">
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Низкая') }}</p>
<input type="radio" required name="activity" value="low" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Средняя') }}</p>
<input type="radio" required name="activity" value="moderate" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Высокая') }}</p>
<input type="radio" required name="activity" value="high" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
</div>
</div>
</div>
</div>
<div class="modal-form-content-line__element">
<label for="pet_weight" class="label-name">{{ fn('pll_e', 'Вес') }}</label>
<div class="form-input__list">
<div class="form-input-list__input">{{ fn('pll_e', 'Выберите из списка') }}</div>
<div class="form-input-list__block-content" style="height: 0px;">
<div class="form-input-list__content">
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', '1-1.5 кг') }}</p>
<input type="radio" required name="weight" value="below_1_5" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', '1.5-3 кг') }}</p>
<input type="radio" required name="weight" value="1_5-3" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', '3-5 кг') }}</p>
<input type="radio" required name="weight" value="3-5" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', '5-8 кг') }}</p>
<input type="radio" required name="weight" value="5-8" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', '8-11 кг') }}</p>
<input type="radio" required name="weight" value="8-11" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', '11-15 кг') }}</p>
<input type="radio" required name="weight" value="11-15" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', '10-20кг') }}</p>
<input type="radio" required name="weight" value="15-20" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', '20-25кг') }}</p>
<input type="radio" required name="weight" value="20-25" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', '25-35 кг') }}</p>
<input type="radio" required name="weight" value="25-35" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Более 35 кг') }}</p>
<input type="radio" required name="weight" value="more_35" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="rm">
<div class="modal-form-content__line">
<label class="label-name">{{ fn('pll_e', 'Возраст питомца') }}</label>
<div class="form-input__tabs form-input__remote-control" data-content="modal__age">
<label for="age_type_exemplary" class="form-input-tabs__button active" data-rm="0">
{{ fn('pll_e', 'Примерный') }}
<input type="radio" checked value="ex" name="old_type" required id="age_type_exemplary" class="form-input-tabs__input">
</label>
<label for="age_type_accurate" class="form-input-tabs__button" data-rm="1">
{{ fn('pll_e', 'Точный') }}
<input type="radio" value="acc" name="old_type" required id="age_type_accurate" class="form-input-tabs__input">
</label>
</div>
</div>
<div class="modal__age">
<!-- Approximate age selection -->
<div class="form-input__radio remote-control__item active" data-rmcont="0">
<label class="form-input-radio__item active">
<input type="radio" name="old" value="baby" checked class="v-hidden">
<div class="form-input-radio__circle">
<div class="form-input-radio-circle__content"></div>
</div>
<p class="form-input-radio__title">{{ fn('pll_e', 'Малыш') }} <span>{{ fn('pll_e', '(от 0 до 1 года)') }}</span></p>
</label>
<label class="form-input-radio__item">
<input type="radio" name="old" value="normal" class="v-hidden">
<div class="form-input-radio__circle">
<div class="form-input-radio-circle__content"></div>
</div>
<p class="form-input-radio__title">{{ fn('pll_e', 'Взрослый') }} <span>{{ fn('pll_e', '(от 1 года до 7 лет)') }}</span></p>
</label>
<label class="form-input-radio__item">
<input type="radio" name="old" value="old" class="v-hidden">
<div class="form-input-radio__circle">
<div class="form-input-radio-circle__content"></div>
</div>
<p class="form-input-radio__title">{{ fn('pll_e', 'Пожилой') }} <span>{{ fn('pll_e', '(от 7 до 12 лет)') }}</span></p>
</label>
<label class="form-input-radio__item">
<input type="radio" name="old" value="very_old" class="v-hidden">
<div class="form-input-radio__circle">
<div class="form-input-radio-circle__content"></div>
</div>
<p class="form-input-radio__title">{{ fn('pll_e', 'Стареющий') }} <span>{{ fn('pll_e', '(от 12 лет и старше)') }}</span></p>
</label>
</div>
<!-- Exact age selection -->
<div data-rmcont="1" class="modal-form-content__line remote-control__item modal-form-content__line--three modal-form-content__line--margin-top-16">
<div class="modal-form-content-line__element">
<label for="pet_day" class="label-name">{{ fn('pll_e', 'День') }}</label>
<input id="pet_day" class="form__input form__input--center" maxlength="2" type="text" name="day" placeholder="{{ fn('pll_e', 'ДД') }}">
</div>
<div class="modal-form-content-line__element">
<label for="pet_month" class="label-name">{{ fn('pll_e', 'Месяц') }}</label>
<div class="form-input__list">
<div class="form-input-list__input">{{ fn('pll_e', 'Месяц') }}</div>
<div class="form-input-list__block-content">
<div class="form-input-list__content">
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Январь') }}</p>
<input type="radio" name="month" value="1" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Февраль') }}</p>
<input type="radio" name="month" value="2" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Март') }}</p>
<input type="radio" name="month" value="3" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Апрель') }}</p>
<input type="radio" name="month" value="4" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Май') }}</p>
<input type="radio" name="month" value="5" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Июнь') }}</p>
<input type="radio" name="month" value="6" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Июль') }}</p>
<input type="radio" name="month" value="7" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Август') }}</p>
<input type="radio" name="month" value="8" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Сентябрь') }}</p>
<input type="radio" name="month" value="9" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Октябрь') }}</p>
<input type="radio" name="month" value="10" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Ноябрь') }}</p>
<input type="radio" name="month" value="11" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Декабрь') }}</p>
<input type="radio" name="month" value="12" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
</div>
</div>
</div>
</div>
<div class="modal-form-content-line__element">
<label for="pet_year" class="label-name">{{ fn('pll_e', 'Год') }}</label>
<input id="pet_year" class="form__input form__input--center" maxlength="4" type="text" name="year" placeholder="{{ fn('pll_e', 'ГГГГ') }}">
</div>
</div>
</div>
</div>
<div class="modal-form__buttons">
<button class="button button--gradient button--high button--100-perc" type="submit">{{ fn('pll_e', 'Добавить') }}</button>
</div>
</form>
</div>
</div>
</div>
<div class="modalProfile" id="subForm">
<div class="popup-wrap">
<div class="modal-form modal__notification modal-form--green-gradient modal-form--width-584 form-sub active">
<button class="modal-form__close modal-form__close--white"></button>
<p class="modal-form__title modal-form__title--white">{{ fn('pll_e', 'Подписка на корм') }}</p>
<div class="modal-form__element modal-form__element--top-40">
<p class="modal-form__text modal-form__text--white">
{{ fn('pll_e', 'Спасибо за интерес к нашему новому виду услуг, данная функция находится в разработке, если вы хотите узнать первыми о запуске подпишитесь на рассылку.') }}
</p>
</div>
<form class="modal-form__element modal-form__element--top-40 foodSub">
<input type="hidden" name="email" value="{{ user.user_email }}">
<input type="hidden" name="action" value="subscription_sub__profile">
<button class="button form__button-pc button--white button--100-perc open-overlay button--high">
{{ fn('pll_e', 'Хочу попробовать первым!') }}
</button>
<button class="button form__button-mobile button--white button--100-perc open-overlay button--high">
{{ fn('pll_e', 'Хочу быть первым!') }}
</button>
</form>
</div>
</div>
</div>
<div class="modalProfile" id="user_edit">
<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>
<form class="modal-form__content user-edit-form" method="post">
<input type="hidden" name="action" value="edit_user">
<div class="modal-form-content__line modal-form-content__line--two">
<div class="modal-form-content-line__element">
<label for="user_firstname" class="label-name">{{ fn('pll_e', 'Имя') }}</label>
<input id="user_firstname" class="form__input" type="text" value="{{ user.user_firstname }}" name="name" 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="user_lastname" class="label-name">{{ fn('pll_e', 'Фамилия') }}</label>
<input id="user_lastname" class="form__input" type="text" value="{{ user.user_lastname }}" name="l_name" 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">
<label class="label-name">{{ fn('pll_e', 'Телефон') }}</label>
<div class="form-input__phone">
<input type="text" placeholder="___ ___ ____" id="user_phone" value="{{ fn('get_user_meta', user.ID, 'billing_phone', true) }}" name="phone" class="form-input-phone__input" required>
<div class="form-input__error form-input__error--absolute">{{ fn('pll_e', 'Номер введён неверно') }}</div>
</div>
</div>
<div class="modal-form__buttons modal-form__buttons--two">
<button class="button button--gradient button--high" type="submit">{{ fn('pll_e', 'Сохранить') }}</button>
<input type="reset" class="button button--white open-overlay button--high modal-form__button-close" value="{{ fn('pll_e', 'Отмена') }}">
</div>
</form>
</div>
</div>
</div>

@ -0,0 +1,106 @@
{% extends 'profile/profile-base.twig' %}
{% block profile_content%}
<div class="cabinet__orders cabinet-content {% if fn('is_wc_endpoint_url') %}active hide{% endif %}">
<div class="cabinet-card cabinet-card--green-white cabinet__subscription-pc">
<div class="cabinet-card__content">
<p class="cabinet-card__title">{{ function('pll_e', 'Feed subscription') }}</p>
<div class="cabinet-card__element">
<p class="cabinet-card__text">{{ function('pll_e', 'Weekly food delivery for your pet') }}</p>
</div>
<div class="cabinet-card__element">
<button class="button button--gradient button--high-46 form-sub__btn">{{ function('pll_e', 'Get details') }}</button>
</div>
</div>
</div>
{% if customer_orders %}
{% for order in customer_orders %}
{% set meta_data = order.meta_data.order_data %}
{% set shipping_address = order.get_address('shipping') %}
<div class="cabinet-card cabinet-card--grey">
<div class="cabinet-card__content">
<div class="cabinet-card__order">
<div class="cabinet-card-order__header">
<div class="cabinet-card-order__main">
<p class="cabinet-card-order-main__date">{{ function('pll_e', 'Order from') }} {{ order.date_created|date('Y.m.d') }}</p>
<p class="cabinet-card-order-main__number">{{ order.id }}</p>
</div>
<div class="cabinet-card-order__payment">
<p class="cabinet-card-order-payment__title">{{ function('pll_e', 'Summary') }}:</p>
<p class="cabinet-card-order-payment__price">{{ order.get_total() }}</p>
</div>
</div>
<div class="cabinet-card-order__bottom">
<div class="cabinet-card-order__content">
{% set order_track = meta_data.order_number|default('') %}
<div class="cabinet-card-order__block-detail">
<div class="cabinet-card-order__detail">
<div class="cabinet-card-order-detail__address">
<p class="cabinet-card-order-detail-address__title">{{ function('pll_e', 'Delivery address') }}</p>
<p class="cabinet-card-order-detail-address__text">
{% if meta_data.office_code %}
{{ function('pll_e', 'CDEK shipping point') }}<br>
{{ office_name }}
{% else %}
{{ shipping_address.city }} {{ shipping_address.address_1 }}
{% endif %}
</p>
</div>
<div class="cabinet-card-order-detail__main">
<div class="cabinet-card-order-detail-main__products">
{% for item in order.get_items %}
{% set product = item.get_product %}
{% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %}
<div class="cabinet-card-order-detail-main__product">
<img src="{{ thumbnail }}" alt="" class="cabinet-card-order-detail-main-product__img">
<div class="cabinet-card-order-detail-main-product__content">
<div class="cabinet-card-order-detail-main-product__description">
<p class="cabinet-card-order-detail-main-product-description__what">{{ item.name }}</p>
</div>
<p class="cabinet-card-order-detail-main-product__count">{{ item.quantity }}</p>
<p class="cabinet-card-order-detail-main-product__price">{{ item.total }}&nbsp;{{ function('get_woocommerce_currency_symbol', code) }}</p>
</div>
</div>
{% endfor %}
</div>
<div class="cabinet-card-order-detail-main__links">
{% if order_track %}
<a href="https://www.cdek.ru/ru/tracking/?order_id={{ order_track }}" target="_blank" class="cabinet-card__button cabinet-card-order-detail-main__link">
{{ function('pll_e', 'Track order') }}
</a>
{% endif %}
</div>
</div>
</div>
</div>
<button class="cabinet-card-order__open-detail">{{ function('pll_e', 'Order details') }}</button>
</div>
<div class="cabinet-card-order__detail-short">
{% for item in order.get_items %}
{% set product = item.get_product %}
{% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %}
{% if thumbnail %}
<a href="{{ product.permalink }}"><img src="{{ thumbnail }}" alt="" class="cabinet-card-order-detail-short__item"></a>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="cabinet-card__no-orders">
<div class="cabinet-card-no-orders__element">
<p class="cabinet-card-no-orders__title">{{ function('pll_e', 'No orders yet') }}</p>
</div>
<div class="cabinet-card-no-orders__element">
<a href="/shop/" class="to-know button--100-perc to-know--background-none">
<p>{{ function('pll_e', 'Catalog') }}</p>
</a>
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}

@ -0,0 +1,133 @@
{% extends 'profile/profile-base.twig' %}
{% block profile_content %}
<div class="cabinet__orders cabinet__orders--no-cab cabinet-content active hide">
{% if subscription %}
<div class="cabinet-card cabinet-card--grey">
<div class="cabinet-card__content">
<div class="cabinet-card__order">
<div class="cabinet-card-order__header">
<div class="cabinet-card-order__main">
<p class="cabinet-card-order-main__date">
{{ fn('pll_e', 'Подписка №') }} {{ subscription.id }}
</p>
</div>
</div>
</div>
<div class="subscription">
<div class="subscription__item">
<p>{{ fn('pll_e', 'Статус') }}</p>
<p class="subscription__status--end">{{ subscription.status | capitalize }}</p>
</div>
<div class="subscription__item">
<p>{{ fn('pll_e', 'Дата подписки') }}</p>
<p>{{ subscription.date_created | date('d.m.Y') }}</p>
</div>
<div class="subscription__item">
<p>{{ fn('pll_e', 'Дата последнего заказа') }}</p>
<p>{{ subscription.last_order_date | date('d.m.Y') }}</p>
</div>
<div class="subscription__item">
<p>{{ fn('pll_e', 'Следующий платеж') }}</p>
<p>{{ subscription.next_payment_date | date('d.m.Y')}}</p>
</div>
<div class="subscription__item">
<p>{{ fn('pll_e', 'Способ оплаты') }}</p>
<p>{{ subscription.payment_method_title}}</p>
</div>
<div class="subscription__item">
<div class="subscription__add">
<div class="subscription__add-header">
<p class="subscription__add-title">{{ fn('pll_e', 'Товары:') }}</p>
</div>
<div class="subscription__add-content">
{% for item in subscription.items %}
{% set product = item.product %}
{% set image_id = product.image_id %}
{% set product_permalink = product.id ? fn('get_permalink', product.id) : '' %}
{# Debug: Display product ID and permalink for testing #}
<p class="debug-info" style="display: none;">Product ID: {{ product.id | default('null') }} | Permalink: {{ product_permalink | default('none') }}</p>
<div class="cabinet-card-order-detail-main__product subscription__add-product">
{% if product.id and product_permalink and product_permalink != fn('get_permalink', fn('get_the_ID')) %}
<a href="{{ product_permalink }}">
<img src="{{ image_id | wp_get_attachment_image_src('thumbnail') | default('assets/img/product/mini-card.png') }}"
alt="{{ product.name }}"
class="cabinet-card-order-detail-main-product__img">
</a>
{% else %}
<img src="{{ image_id | wp_get_attachment_image_src('thumbnail') | default('assets/img/product/mini-card.png') }}"
alt="{{ product.name }}"
class="cabinet-card-order-detail-main-product__img">
{% endif %}
<div class="cabinet-card-order-detail-main-product__description">
<p class="cabinet-card-order-detail-main-product-description__what">{{ product.name }}</p>
<p class="cabinet-card-order-detail-main-product-description__with-what">{{ product.variation_details | default('') }}</p>
</div>
<div class="cabinet-card-order-detail-main-product__content">
<p class="cabinet-card-order-detail-main-product__count">{{ item.quantity }}</p>
<p class="cabinet-card-order-detail-main-product__price">{{ item.total }}</p>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="subscription__item">
<p>{{ fn('pll_e', 'Сумма') }}</p>
<p><span>{{ subscription.total }} {{ subscription.currency }} <small>/ {{ fn('pll_e', 'месяц') }}</small></span></p>
</div>
<div class="subscription__item">
<p>{{ fn('pll_e', 'Доставка') }}</p>
<p>{{ fn('pll_e', 'Бесплатно') }}</p>
</div>
<div class="subscription__item">
<p>{{ fn('pll_e', 'Итого') }}</p>
<p><span>{{ subscription.total }} {{ subscription.currency }} <small>/ {{ fn('pll_e', 'месяц') }}</small></span></p>
</div>
<div class="subscription__item">
<div class="subscription__add">
<div class="subscription__add-header">
<p class="subscription__add-title">{{ fn('pll_e', 'Доставка:') }}</p>
</div>
<div class="subscription__add-content" data-js-tabs="">
<form action="" method="post" class="subscription-address-form" data-subscription-id="{{ subscription.id }}">
<div class="modal-form-content__line">
<div class="modal-form-content-line__element">
<label for="delivery_address" class="label-name modal-form-content-line__element--arrow">{{ fn('pll_e', 'Адрес доставки') }}</label>
<input id="delivery_address" class="form__input form-open" type="text" name="address" value="{{ subscription.shipping_address | striptags | default('') }}" placeholder="{{ fn('pll_e', 'Начните вводить адрес') }}" required data-form="form-data">
<span class="form-input__error form-input__error--absolute">{{ fn('pll_e', 'Адрес введен неверно') }}</span>
</div>
</div>
<div class="modal-form-content__line">
<div class="modal-form-content-line__element">
<label for="delivery_comment" class="label-name">{{ fn('pll_e', 'Комментарий для доставки') }}</label>
<textarea id="delivery_comment" class="form__input form__input--textarea-72" name="comment" placeholder="{{ fn('pll_e', 'Для службы доставки') }}">{{ subscription.shipping_comment | default('') }}</textarea>
<span class="form-input__error form-input__error--absolute">{{ fn('pll_e', 'Комментарий введен неверно') }}</span>
</div>
</div>
<input type="hidden" name="subscription_id" value="{{ subscription.id }}">
<input type="hidden" name="address_nonce" value="{{ fn('wp_create_nonce', 'update_subscription_address') }}">
<div class="modal-form-content__line">
<button type="submit" style="width: 100%;" class="button button--gradient button--high-46">{{ fn('pll_e', 'Сохранить') }}</button>
</div>
<div class="form-message" style="display: none;"></div>
</form>
</div>
</div>
</div>
</div>
<a href="{{ subscription.cancel_url }}" class="to-know to-know--start button--100-perc to-know--background-none">
<p>{{ fn('pll_e', 'Отменить подписку') }}</p>
</a>
</div>
</div>
{% else %}
<div class="cabinet-card-no-orders__element">
<p>{{ fn('pll_e', 'Подписка не найдена.') }}</p>
</div>
{% endif %}
</div>
{% endblock %}

@ -0,0 +1,78 @@
{% extends 'profile/profile-base.twig' %}
{% block profile_content %}
<div class="cabinet__orders cabinet__orders--no-cab cabinet-content active hide">
{% for subscription in subscriptions %}
<div class="cabinet-card cabinet-card--grey">
<div class="cabinet-card__content">
<div class="cabinet-card__order">
<div class="cabinet-card-order__header">
<div class="cabinet-card-order__main">
<p class="cabinet-card-order-main__date">
{% if subscription.view_url %}
<a href="{{ subscription.view_url }}">{{ fn('pll_e', 'Подписка от') }} {{ subscription.date_created | date('d.m.Y') }}</a>
{% else %}
{{ fn('pll_e', 'Подписка от') }} {{ subscription.date_created | date('d.m.Y') }}
{% endif %}
</p>
<p class="cabinet-card-order-main__number">
{{ subscription.id }}
</p>
</div>
<div class="cabinet-card-order__payment">
<p class="cabinet-card-order-payment__title">{{ fn('pll_e', 'Сумма:') }}</p>
<p class="cabinet-card-order-payment__price cabinet-card-order-payment__price--add">
{{ subscription.total }} {{ subscription.currency }} <span>/ {{ subscription.billing_period }}</span>
</p>
</div>
</div>
<div class="cabinet-card-order__content">
<div class="cabinet-card-order__payment-add">
<p class="cabinet-card-order__sub-title">
{{ fn('pll_e', 'Следующий платеж:') }}
</p>
<p class="cabinet-card-order__date">
{{ subscription.next_payment_date | date('d.m.Y') }}
</p>
</div>
</div>
<div class="cabinet-card-order__detail-short mt-m-3">
{% for item in subscription.items %}
{% set product = item.product %}
{% set image_id = product.image_id %}
{% if product.permalink %}
<a href="{{ product.permalink }}">
<img src="{{ image_id | wp_get_attachment_image_src('thumbnail') | default('assets/img/product/mini-card.png') }}"
alt="{{ product.name }}"
class="cabinet-card-order-detail-short__item">
</a>
{% else %}
<img src="{{ image_id | wp_get_attachment_image_src('thumbnail') | default('assets/img/product/mini-card.png') }}"
alt="{{ product.name }}"
class="cabinet-card-order-detail-short__item">
{% endif %}
{% endfor %}
</div>
<div class="cabinet-card-order__link">
{% if subscription.view_url %}
<a href="{{ subscription.view_url }}" class="to-know to-know--start button--100-perc to-know--background-none">
<p>{{ fn('pll_e', 'Детали подписки') }}</p>
</a>
{% else %}
<p class="to-know to-know--start button--100-perc to-know--background-none disabled">
{{ fn('pll_e', 'Детали недоступны') }}
</p>
{% endif %}
</div>
</div>
</div>
</div>
{% else %}
<p>{{ fn('pll_e', 'У вас нет активных подписок.') }}</p>
{% endfor %}
</div>
{% endblock %}

@ -0,0 +1,414 @@
{% set profile_pg = 1 %}
{% extends 'profile/profile-base.twig' %}
{% block profile_content%}
<div class="cabinet__orders cabinet-content {% if fn('is_wc_endpoint_url') %}active hide{% endif %}">
<div class="cabinet-card cabinet-card--green-white cabinet__subscription-pc">
<div class="cabinet-card__content">
<p class="cabinet-card__title">{{ function('pll_e', 'Feed subscription') }}</p>
<div class="cabinet-card__element">
<p class="cabinet-card__text">{{ function('pll_e', 'Weekly food delivery for your pet') }}</p>
</div>
<div class="cabinet-card__element">
<button class="button button--gradient button--high-46 form-sub__btn">{{ function('pll_e', 'Get details') }}</button>
</div>
</div>
</div>
{% if customer_orders %}
{% for order in customer_orders %}
{% set meta_data = order.meta_data.order_data %}
{% set shipping_address = order.get_address('shipping') %}
<div class="cabinet-card cabinet-card--grey">
<div class="cabinet-card__content">
<div class="cabinet-card__order">
<div class="cabinet-card-order__header">
<div class="cabinet-card-order__main">
<p class="cabinet-card-order-main__date">{{ function('pll_e', 'Order from') }} {{ order.date_created|date('Y.m.d') }}</p>
<p class="cabinet-card-order-main__number">{{ order.id }}</p>
</div>
<div class="cabinet-card-order__payment">
<p class="cabinet-card-order-payment__title">{{ function('pll_e', 'Summary') }}:</p>
<p class="cabinet-card-order-payment__price">{{ order.get_total() }}</p>
</div>
</div>
<div class="cabinet-card-order__bottom">
<div class="cabinet-card-order__content">
{% set order_track = meta_data.order_number|default('') %}
<div class="cabinet-card-order__block-detail">
<div class="cabinet-card-order__detail">
<div class="cabinet-card-order-detail__address">
<p class="cabinet-card-order-detail-address__title">{{ function('pll_e', 'Delivery address') }}</p>
<p class="cabinet-card-order-detail-address__text">
{% if meta_data.office_code %}
{{ function('pll_e', 'CDEK shipping point') }}<br>
{{ office_name }}
{% else %}
{{ shipping_address.city }} {{ shipping_address.address_1 }}
{% endif %}
</p>
</div>
<div class="cabinet-card-order-detail__main">
<div class="cabinet-card-order-detail-main__products">
{% for item in order.get_items %}
{% set product = item.get_product %}
{% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %}
<div class="cabinet-card-order-detail-main__product">
<img src="{{ thumbnail }}" alt="" class="cabinet-card-order-detail-main-product__img">
<div class="cabinet-card-order-detail-main-product__content">
<div class="cabinet-card-order-detail-main-product__description">
<p class="cabinet-card-order-detail-main-product-description__what">{{ item.name }}</p>
</div>
<p class="cabinet-card-order-detail-main-product__count">{{ item.quantity }}</p>
<p class="cabinet-card-order-detail-main-product__price">{{ item.total }}&nbsp;{{ function('get_woocommerce_currency_symbol', code) }}</p>
</div>
</div>
{% endfor %}
</div>
<div class="cabinet-card-order-detail-main__links">
{% if order_track %}
<a href="https://www.cdek.ru/ru/tracking/?order_id={{ order_track }}" target="_blank" class="cabinet-card__button cabinet-card-order-detail-main__link">
{{ function('pll_e', 'Track order') }}
</a>
{% endif %}
</div>
</div>
</div>
</div>
<button class="cabinet-card-order__open-detail">{{ function('pll_e', 'Order details') }}</button>
</div>
<div class="cabinet-card-order__detail-short">
{% for item in order.get_items %}
{% set product = item.get_product %}
{% set thumbnail = product ? function('wp_get_attachment_image_url', product.get_image_id(), 'woocommerce_thumbnail') : function('wc_placeholder_img_src', 'woocommerce_thumbnail') %}
{% if thumbnail %}
<a href="{{ product.permalink }}"><img src="{{ thumbnail }}" alt="" class="cabinet-card-order-detail-short__item"></a>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="cabinet-card__no-orders">
<div class="cabinet-card-no-orders__element">
<p class="cabinet-card-no-orders__title">{{ function('pll_e', 'No orders yet') }}</p>
</div>
<div class="cabinet-card-no-orders__element">
<a href="/shop/" class="to-know button--100-perc to-know--background-none">
<p>{{ function('pll_e', 'Catalog') }}</p>
</a>
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}
</main>
<div class="modalProfile" id="pet_add_form">
<div class="popup-wrap">
<div class="modal-form form__full-mobile modal-form--white modal-form--height-100-phone form-pet active">
<button class="modal-form__close"></button>
<p class="modal-form__title">{{ fn('pll_e', 'Добавить питомца') }}</p>
<form class="modal-form__content" id="add-pet-form" method="post" action="">
<input type="hidden" name="action" value="add_pet">
<div class="modal-form-content__line">
<label for="" class="label-name">{{ fn('pll_e', 'Вид животного') }}</label>
<div class="form-input__tabs">
<label for="cat" class="form-input-tabs__button active">
{{ fn('pll_e', 'Кошка') }}
<input type="radio" value="cat" checked name="pet" id="cat" class="form-input-tabs__input">
</label>
<label for="dog" class="form-input-tabs__button">
{{ fn('pll_e', 'Собака') }}
<input type="radio" value="dog" name="pet" id="dog" class="form-input-tabs__input">
</label>
</div>
</div>
<div class="modal-form-content__line sterilized">
<label for="" class="label-name">{{ fn('pll_e', 'Стерелизован') }}</label>
<div class="form-input__tabs">
<label class="form-input-tabs__button active">
{{ fn('pll_e', 'Да') }}
<input type="radio" value="1" checked name="sterilized" class="form-input-tabs__input">
</label>
<label class="form-input-tabs__button">
{{ fn('pll_e', 'Нет') }}
<input type="radio" value="0" name="sterilized" class="form-input-tabs__input">
</label>
</div>
</div>
<div class="modal-form-content__line">
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">{{ fn('pll_e', 'Имя') }}</label>
<input id="firstname" class="form__input" type="text" name="name" placeholder="{{ fn('pll_e', 'Имя питомца') }}" required>
</div>
</div>
<div class="modal-form-content__line">
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">{{ fn('pll_e', 'Порода') }}</label>
<input id="firstname" class="form__input" type="text" name="breed" placeholder="{{ fn('pll_e', 'Порода вашего питомца') }}" required>
</div>
</div>
<div class="modal-form-content__line">
<label for="" class="label-name">{{ fn('pll_e', 'Пол вашего питомца') }}</label>
<div class="form-input__tabs">
<label for="boy" class="form-input-tabs__button active">
{{ fn('pll_e', 'Мальчик') }}
<input type="radio" value="male" checked name="sex" id="boy" class="form-input-tabs__input">
</label>
<label for="girl" class="form-input-tabs__button">
{{ fn('pll_e', 'Девочка') }}
<input type="radio" value="female" name="sex" id="girl" class="form-input-tabs__input">
</label>
</div>
</div>
<div class="modal-form-content__line modal-form-content__line--two">
<div class="modal-form-content-line__element">
<label class="label-name">{{ fn('pll_e', 'Вид активности') }}</label>
<div class="form-input__list">
<div class="form-input-list__input">{{ fn('pll_e', 'Выберите из списка') }}</div>
<div class="form-input-list__block-content" style="height: 0px;">
<div class="form-input-list__content">
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Низкая') }}</p>
<input type="radio" required name="activity" value="low" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Средняя') }}</p>
<input type="radio" required name="activity" value="moderate" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ fn('pll_e', 'Высокая') }}</p>
<input type="radio" required name="activity" value="high" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
</div>
</div>
</div>
</div>
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">{{ fn('pll_e', 'Вес') }}</label>
<div class="form-input__list">
<div class="form-input-list__input">{{ fn('pll_e', 'Выберите из списка') }}</div>
<div class="form-input-list__block-content" style="height: 0px;">
<div class="form-input-list__content">
{% for weight in [
{value: 'below_1_5', text: fn('pll_e', '1-1.5 кг')},
{value: '1_5-3', text: fn('pll_e', '1.5-3 кг')},
{value: '3-5', text: fn('pll_e', '3-5 кг')},
{value: '5-8', text: fn('pll_e', '5-8 кг')},
{value: '8-11', text: fn('pll_e', '8-11 кг')},
{value: '11-15', text: fn('pll_e', '11-15 кг')},
{value: '15-20', text: fn('pll_e', '10-20кг')},
{value: '20-25', text: fn('pll_e', '20-25кг')},
{value: '25-35', text: fn('pll_e', '25-35 кг')},
{value: 'more_35', text: fn('pll_e', 'Более 35 кг')}
] %}
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ weight.text }}</p>
<input type="radio" required name="weight" value="{{ weight.value }}" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<div class="rm">
<div class="modal-form-content__line">
<label class="label-name">{{ fn('pll_e', 'Возраст питомца') }}</label>
<div class="form-input__tabs form-input__remote-control" data-content="modal__age">
<label for="exemplary" class="form-input-tabs__button active" data-rm="0">
{{ fn('pll_e', 'Примерный') }}
<input type="radio" checked value="ex" name="old_type" required id="exemplary" class="form-input-tabs__input">
</label>
<label class="form-input-tabs__button" data-rm="1">
{{ fn('pll_e', 'Точный') }}
<input type="radio" value="acc" name="old_type" required id="accurate" class="form-input-tabs__input">
</label>
</div>
</div>
<div class="modal__age">
<div class="form-input__radio remote-control__item active" data-rmcont="0">
{% for age in [
{value: 'baby', title: fn('pll_e', 'Малыш'), desc: fn('pll_e', '(от 0 до 1 года)')},
{value: 'normal', title: fn('pll_e', 'Взрослый'), desc: fn('pll_e', '(от 1 года до 7 лет)')},
{value: 'old', title: fn('pll_e', 'Пожилой'), desc: fn('pll_e', '(от 7 до 12 лет)')},
{value: 'very_old', title: fn('pll_e', 'Стареющий'), desc: fn('pll_e', '(от 12 лет и старше)')}
] %}
<label class="form-input-radio__item {{ loop.first ? 'active' : '' }}">
<input type="radio" name="old" value="{{ age.value }}" {{ loop.first ? 'checked' : '' }} class="v-hidden">
<div class="form-input-radio__circle">
<div class="form-input-radio-circle__content"></div>
</div>
<p class="form-input-radio__title">{{ age.title }} <span>{{ age.desc }}</span></p>
</label>
{% endfor %}
</div>
<div data-rmcont="1" class="modal-form-content__line remote-control__item modal-form-content__line--three modal-form-content__line--margin-top-16">
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">{{ fn('pll_e', 'День') }}</label>
<input id="firstname" class="form__input form__input--center" maxlength="2" type="text" name="day" placeholder="{{ fn('pll_e', 'ДД') }}">
</div>
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">{{ fn('pll_e', 'Месяц') }}</label>
<div class="form-input__list">
<div class="form-input-list__input">{{ fn('pll_e', 'Месяц') }}</div>
<div class="form-input-list__block-content">
<div class="form-input-list__content">
{% for month in [
{value: 1, text: fn('pll_e', 'Январь')},
{value: 2, text: fn('pll_e', 'Февраль')},
{value: 3, text: fn('pll_e', 'Март')},
{value: 4, text: fn('pll_e', 'Апрель')},
{value: 5, text: fn('pll_e', 'Май')},
{value: 6, text: fn('pll_e', 'Июнь')},
{value: 7, text: fn('pll_e', 'Июль')},
{value: 8, text: fn('pll_e', 'Август')},
{value: 9, text: fn('pll_e', 'Сентябрь')},
{value: 10, text: fn('pll_e', 'Октябрь')},
{value: 11, text: fn('pll_e', 'Ноябрь')},
{value: 12, text: fn('pll_e', 'Декабрь')}
] %}
<label class="form-input-list__item">
<p class="form-input-list-item__text">{{ month.text }}</p>
<input type="radio" name="month" value="{{ month.value }}" class="v-hidden">
<div class="form-input-list-item__box">
<div class="form-input-list-item-box__content">
<img src="{{ theme.link }}/gp-include/assets/lk/img/svg/main/arrow-selected-white.svg" alt="">
</div>
</div>
</label>
{% endfor %}
</div>
</div>
</div>
</div>
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">{{ fn('pll_e', 'Год') }}</label>
<input id="firstname" class="form__input form__input--center" maxlength="4" type="text" name="year" placeholder="{{ fn('pll_e', 'ГГГГ') }}">
</div>
</div>
</div>
</div>
<div class="modal-form__buttons">
<button class="button button--gradient button--high button--100-perc" type="submit">{{ fn('pll_e', 'Добавить') }}</button>
</div>
</form>
</div>
</div>
</div>
<div class="modalProfile" id="subForm">
<div class="popup-wrap">
<div class="modal-form modal__notification modal-form--green-gradient modal-form--width-584 form-sub active">
<button class="modal-form__close modal-form__close--white"></button>
<p class="modal-form__title modal-form__title--white">Подписка на корм</p>
<div class="modal-form__element modal-form__element--top-40">
<p class="modal-form__text modal-form__text--white">
Спасибо за интерес к нашему новому виду услуг, данная функция находится в разработке, если вы хотите узнать первыми о запуске подпишитесь на рассылку.
</p>
</div>
<form class="modal-form__element modal-form__element--top-40 foodSub">
<input type="hidden" name="email" value="{{ user.user_email }}">
<input type="hidden" name="action" value="subscription_sub__profile">
<button class="button form__button-pc button--white button--100-perc open-overlay button--high">
Хочу попробовать первым!
</button>
<button class="button form__button-mobile button--white button--100-perc open-overlay button--high">
Хочу быть первым!
</button>
</form>
</div>
</div>
</div>
<div class="modalProfile" id="user_edit">
<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">Изменить мои данные</p>
<form class="modal-form__content user-edit-form" method="post">
<input type="hidden" name="action" value="edit_user">
<div class="modal-form-content__line modal-form-content__line--two">
<div class="modal-form-content-line__element">
<label for="firstname" class="label-name">Имя</label>
<input id="firstname" class="form__input" type="text" value="{{ user.user_firstname }}" name="name" placeholder="Ваше имя" required>
<span class="form-input__error form-input__error--absolute">Имя введено неверно</span>
</div>
<div class="modal-form-content-line__element">
<label for="lastname" class="label-name">Фамилия</label>
<input id="lastname" class="form__input" type="text" value="{{ user.user_lastname }}" name="l_name" placeholder="Ваша фамилия" required>
<span class="form-input__error form-input__error--absolute">Фамилия введена неверно</span>
</div>
</div>
<div class="modal-form-content__line">
<label class="label-name">Телефон</label>
<div class="form-input__phone">
<input type="text" placeholder="___ ___ ____" id="tel-phone" value="{{ fn('get_user_meta', user.ID, 'billing_phone', true) }}" name="phone" class="form-input-phone__input" required>
<div class="form-input__error form-input__error--absolute">Номер введён неверно</div>
</div>
</div>
<div class="modal-form__buttons modal-form__buttons--two">
<button class="button button--gradient button--high" type="submit">Сохранить</button>
<input type="reset" class="button button--white open-overlay button--high modal-form__button-close" value="Отмена">
</div>
</form>
</div>
</div>
</div>

@ -0,0 +1,502 @@
<?php
/*
Template Name: Where to byu
Template Post Type: page
*/
wp_enqueue_style( 'gp-wtb-style', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-core.css?v=1.14' );
wp_enqueue_style( 'gp-wtb-style-dt', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-desktop.css?v=1.22' );
wp_enqueue_style( 'gp-wtb-style-tb', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-tablet.css?v=1.22' );
wp_enqueue_style( 'gp-wtb-style-mb', get_template_directory_uri() . '/gp-include/assets/where-to-buy/css/gp-style-mobile?v=1.122' );
get_header('gp_eng');
// wp_head();
add_filter('wpcf7_autop_or_not', '__return_false');
?>
<div class="body-wrap">
<main class="wrapper" style="padding-top: 0;">
<!-- Where home -->
<section class="where-home">
<div class="container">
<h1>Where to Buy</h1>
<p>Looking for Cosmopet products in stores? You can find our premium pet treats in select pet shops and retail stores across the UAE.</p>
</div>
</section>
<!-- Where home end -->
<div class="container">
<?php
// Get marker data from ACF
$locations = get_field('location_markers');
?>
<div class="locations-map-container">
<div id="map" style="width: 100%; height: 600px; border-radius: 20px; overflow: hidden;"></div>
</div>
<script>
// Array of locations with predefined coordinates
const locationData = [
{
title: "Roots Supermarket",
address: "Waves Grande, Retail unit 1-2 Shobha Hartland, Dubai DU United Arab Emirates",
position: { lat: 25.1896, lng: 55.3662 },
url: ''
},
{
title: "Pawdy Neighbors",
address: "Souk Al Manzil - Old Town Downtown, Dubai, United Arab Emirates",
position: { lat: 25.1915, lng: 55.2758 },
url: ''
},
{
title: "The Pet Co",
address: "Tower A, Shop 01, Prime Business Centre, JVC, Dubai, UAE",
position: { lat: 25.0580, lng: 55.2282 },
url: ''
},
{
title: "Ivy Secret Garden",
address: "Al Wasl Warehouse Complex, Unit 14 - 26th St - Al Quoz Industrial Area 4 - Dubai",
position: { lat: 25.1416, lng: 55.2358 },
url: ''
},
{
title: "Petzone",
address: "Petzone Sheikh Zayed Road - Petzone Umm Suqeim",
position: { lat: 25.1530, lng: 55.2145 },
url: "https://petzone.com/uae/en/"
},
{
title: "Pet Corner",
address: "Pet Corner Sheikh Zayed Road, Al Fardan Building 1, Sheikh Zayed Road, Next to Deals on Wheels & Business Bay Metro Station",
position: { lat: 25.1868, lng: 55.2527 },
url: "https://petcornerdubai.com/"
},
{
title: "Pet Corner Motor City - Dubai",
address: "Unit R7, Fox Hill 8, Motor City, Opposite Arabian Ranches",
position: { lat: 25.0499, lng: 55.2350 },
url: ''
},
{
title: "Pet Corner Jumeirah Golf Estates - Dubai",
address: "Shop No. 7, The Fairway Mall Jumeirah Golf Estates Dubai",
position: { lat: 25.0394, lng: 55.2269 },
url: ''
},
{
title: "Pet Corner Khalifa City - Abu Dhabi",
address: "Shop No 5, Al Raha Gardens, Khalifa City Abu Dhabi",
position: { lat: 24.4243, lng: 54.5754 },
url: ''
},
{
title: "Pet Corner- Sharjah Al Mamsha",
address: "Al Sharjah, University Road",
position: { lat: 25.3126, lng: 55.4783 },
url: ''
},
{
title: "Pet Corner Fujairah- Lulu Mall",
address: "Al - Korthabah Road - Fujairah City Center - Fujairah",
position: { lat: 25.1221, lng: 56.3244 },
url: ''
},
{
title: "Tail Waggin Al Quoz",
address: "Warehouse 7, Street 8, Al Khail Road, Al Quoz 1, Dubai, United Arab Emirates",
position: { lat: 25.1368, lng: 55.2364 },
url: ''
},
{
title: "Tail Waggin' Pet Spa Dubai Hills",
address: "SWAY Residences, Retail 2 - near Kings College Hospital Dubai Hills Estate - Dubai - United Arab Emirates",
position: { lat: 25.1276, lng: 55.2714 },
url: ''
},
{
title: "Goofy Groom",
address: "Dubai, UAE Midtown Central Majan, Shop G-17",
position: { lat: 25.0834, lng: 55.1743 },
url: ''
}
];
// Get data from ACF with added latitude and longitude fields
const acfLocations = <?php
if ($locations && !empty($locations)) {
echo json_encode(array_map(function($location) {
return [
'title' => $location['title'],
'address' => $location['address'],
'url' => $location['website'],
'latitude' => isset($location['latitude']) ? (float)$location['latitude'] : null,
'longitude' => isset($location['longitude']) ? (float)$location['longitude'] : null
];
}, $locations));
} else {
echo 'null';
}
?>;
// Map initialization function
function initMap() {
console.log("Map is initializing");
// Map center - approximately Dubai center
const dubai = { lat: 25.2048, lng: 55.2708 };
// Create map
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 11,
center: dubai,
styles: [
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#93d5eb"
}
]
},
{
"featureType": "landscape",
"elementType": "geometry",
"stylers": [
{
"color": "#f5f5f5"
}
]
}
]
});
// Info window for markers
const infoWindow = new google.maps.InfoWindow();
// If ACF data exists, use it for markers
if (acfLocations && acfLocations.length > 0) {
console.log("Using ACF data:", acfLocations.length, "locations");
const geocoder = new google.maps.Geocoder();
// Create and place markers
acfLocations.forEach((location, i) => {
// Check if we have manual coordinates
if (location.latitude && location.longitude) {
console.log(`Using manual coordinates for: ${location.title}`);
const position = { lat: location.latitude, lng: location.longitude };
createMarker(location, position, map, infoWindow);
} else {
// No coordinates provided, try geocoding
console.log(`Geocoding address: ${location.address}`);
geocoder.geocode({ address: location.address }, (results, status) => {
if (status === "OK") {
console.log(`Geocoding successful for: ${location.title}`);
createMarker(location, results[0].geometry.location, map, infoWindow);
} else {
console.error(`Geocode failed for address: ${location.address}. Reason: ${status}`);
// If geocoding fails, try to find matching location in predefined data
const predefinedLocation = locationData.find(item =>
item.title.toLowerCase() === location.title.toLowerCase() ||
item.address.toLowerCase().includes(location.address.toLowerCase())
);
if (predefinedLocation) {
console.log(`Using predefined coordinates for: ${location.title}`);
createMarker(location, predefinedLocation.position, map, infoWindow);
}
}
});
}
});
} else {
// Use predefined data
console.log("Using predefined data:", locationData.length, "locations");
locationData.forEach((location) => {
createMarker(location, location.position, map, infoWindow);
});
}
// Marker creation function
function createMarker(location, position, map, infoWindow) {
// Create marker
const marker = new google.maps.Marker({
map: map,
position: position,
animation: google.maps.Animation.DROP,
icon: {
url: 'https://maps.google.com/mapfiles/ms/icons/blue-dot.png'
}
});
// Add click event handler for marker
marker.addListener("click", () => {
let content = `<div><h3>${location.title}</h3><p>${location.address}</p>`;
if (location.url) {
content += `<p><a href="${location.url}" target="_blank">Visit website</a></p>`;
}
content += `</div>`;
infoWindow.setContent(content);
infoWindow.open(map, marker);
});
// Add slight delay for animation
setTimeout(() => {
marker.setAnimation(null);
}, 750);
}
}
// Check if Google Maps API is loaded
window.addEventListener('load', function() {
if (typeof google === 'undefined' || typeof google.maps === 'undefined') {
console.error('Google Maps API failed to load');
document.getElementById('map').innerHTML = '<div style="padding: 20px; text-align: center;">Map loading error. Please check your internet connection and refresh the page.</div>';
} else {
console.log('Google Maps API loaded successfully');
}
});
</script>
<!-- Google Maps API connection with your key -->
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDQVXQyGsqWmUdJ84UgKOPymFlISaKoiuw&callback=initMap&libraries=places">
</script>
</div>
<br><br>
<!-- Find us -->
<section class="find-us">
<div class="container">
<h2>📍 Find us at:</h2>
<ul>
<?php
$items = get_field('location_markers');
foreach($items as $item):
?>
<li>
<h3>
<?php if($item['website']): ?>
<a href="<?php echo $item['website'];?>"><?php echo $item['title'];?></a>
<?php endif; ?>
<?php if(!$item['website']): ?>
<?php echo $item['title'];?>
<?php endif; ?>
</h3>
<p><?php echo $item['address'];?></p>
</li>
<?php endforeach; ?>
</ul>
</div>
</section>
<!-- Find us end -->
<style>
.sell-form-form:not(.submited) + .thx-text{
display:none;
}
.sell-form-form.submited{
display:none;
}
</style>
<!-- Sell form -->
<div class="container">
<?php
// Получаем изображения из галереи ACF
$images = get_field('partners_logos');
if ($images): ?>
<!-- Бегущая строка (слайдер) -->
<div class="partners-slider-section">
<h3 style="font-size:36px;">Our partners</h3>
<div class="partners-swiper swiper">
<div class="swiper-wrapper">
<?php
// Повторяем логотипы больше раз для создания эффекта бесконечности
for ($i = 0; $i < 5; $i++) {
foreach($images as $image): ?>
<div class="swiper-slide">
<a href="<?php echo esc_url($image['title']); ?>" target="_blank">
<img src="<?php echo esc_url($image['sizes']['medium']); ?>" alt="<?php echo esc_attr($image['alt']); ?>">
</a>
</div>
<?php endforeach;
} ?>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const swiper = new Swiper('.partners-swiper', {
slidesPerView: 'auto',
spaceBetween: 30,
loop: true,
loopedSlides: 999,
loopAdditionalSlides: 999,
centeredSlides: false,
autoplay: {
delay: 1, // Почти нулевая задержка
disableOnInteraction: false, // Автоплей не отключается при взаимодействии
},
speed: 8000, // Медленная скорость для плавности
allowTouchMove: false, // Отключаем свайп вручную
freeMode: false, // Свободный скроллинг
cssMode: false,
watchSlidesProgress: true,
simulateTouch: false,
observer: true,
observeParents: true,
resistanceRatio: 0,
breakpoints: {
320: {
slidesPerView: 2,
},
768: {
slidesPerView: 4,
},
1024: {
slidesPerView: 5,
}
}
});
// Принудительно перезапускаем автоплей после касания
swiper.el.addEventListener('touchend', function() {
if (!swiper.autoplay.running) {
swiper.autoplay.start(); // Перезапускаем автоплей, если он остановлен
}
});
});
</script>
<style>
/* Стили для слайдера */
.partners-slider-section,
.partners-grid-section {
margin: 50px 0;
}
.partners-slider-section {
overflow: hidden; /* Скрываем переполнение */
}
.partners-swiper {
width: 100%;
padding: 20px 0;
}
.swiper-slide {
text-align: center;
height: auto;
width: auto !important; /* Позволяем слайдам быть разной ширины */
}
.swiper-slide img {
max-height: 60px;
width: auto;
filter: grayscale(100%);
transition: filter 0.3s;
object-fit: contain;
}
.swiper-slide img:hover {
filter: grayscale(0%);
}
/* Убираем анимацию трансформации для устранения рывков */
.swiper-wrapper {
position: relative;
width: 100%;
height: 100px;
z-index: 1;
display: flex;
box-sizing: content-box;
transition-timing-function: linear !important;
}
/* Стили для плиток */
.partners-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}
.grid-item {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
/* border: 1px solid #eee; */
border-radius: 24px;
transition: 0.3s;
}
.grid-item:hover {
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.grid-item img {
max-height: 60px;
max-width: 100%;
filter: grayscale(100%);
transition: filter 0.3s;
}
.grid-item img:hover {
filter: grayscale(0%);
}
h3 {
font-size: 26px;
color: #fff;
text-transform: uppercase;
font-weight: bold;
}
@media (max-width: 768px) {
.partners-grid {
grid-template-columns: repeat(2, 1fr);
}
.grid-item {
width: 80%;
margin: 0 auto;
}
}
@media (max-width: 480px) {
.partners-grid {
grid-template-columns: 1fr;
}
}
</style>
<?php endif; ?>
</div>
<section class="sell-form">
<div class="container sell-form__container">
<h2>Want to sell Cosmopet in your store?</h2>
<p>Join our growing network of retailers! Fill out the contact form below, and we’ll get in touch to discuss the details.</p>
<form action="" class="form--contact sell-form-form">
<input type="hidden" name="action" value="message" >
<input type="text" placeholder="Your Name" name="name" class="form-inp">
<input type="tel" placeholder="Your Phone" name="phone" class="form-inp" id="">
<input type="email" placeholder="E-mail" name="email" class="form-inp" id="">
<textarea placeholder="Message" class="form-textarea" name="msg" id=""></textarea>
<button type="submit">SUBMIT</button>
</form>
<div class="thx-text">
<h2>Thanks for request!</h2>
<p>We will answer your message as soon as possible</p>
</div>
</div>
</section>
<!-- Sell form end -->
</main>
</div>
<?php get_footer('gp_eng'); ?>

@ -138,26 +138,25 @@ toggleHeader('#phone-menu','.header__menu-block','.header__phone-menu', '.white'
// modal
modalOpen('.button--filter', '.modal__filter');
modalOpen('.basket-open', '.modal__basket');
modalOpen('.login-open', '.modal__login');
modalOpen('.open-to-know', '.modal__to-know');
modalClose('.modal__close');
modalClose('.modal-form-sub__close');
let modalWindow = document.querySelector('.modal'); // Изменено с modal на modalWindow
let modal = document.querySelector('.modal');
modal.onclick = function (event) {
modalWindow.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);
modalItem = target.querySelector('.modal__item.active');
aside.style.width = '0px';
setTimeout(() => {
modalItem.style.cssText = '';
modalItem.classList.remove('active');
target.classList.remove('active');
}, 300);
}
}
@ -195,7 +194,7 @@ radioButtons.forEach(radioBlock => {
})
// radio-button
overlay
let products = document.querySelectorAll('.product__item');
products.forEach(productItem => {
@ -222,7 +221,7 @@ products.forEach(productItem => {
}
})
overlay
// select

@ -70,7 +70,7 @@ $calculator_text = '';
<p class="modal-map-control-item__time"><?php echo $text_in_parentheses; ?></p>
<p class="modal-map-control-item__price"> <?php
echo $method->cost;
?>₽</p>
?>₽</p>
</div>
<?php do_action( 'woocommerce_after_shipping_rate', $method, $index ); ?>
</div>

@ -1,19 +1,46 @@
<?php
/**
* Checkout Form
* Checkout Order Receipt Template
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.5.0
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/order-receipt.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 3.2.0
*/
if (!defined('ABSPATH')) {
exit;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
// Get Timber context
$context = Timber::context();
<ul class="order_details">
<li class="order">
<?php esc_html_e( 'Order number:', 'woocommerce' ); ?>
<strong><?php echo esc_html( $order->get_order_number() ); ?></strong>
</li>
<li class="date">
<?php esc_html_e( 'Date:', 'woocommerce' ); ?>
<strong><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></strong>
</li>
<li class="total">
<?php esc_html_e( 'Total:', 'woocommerce' ); ?>
<strong><?php echo wp_kses_post( $order->get_formatted_order_total() ); ?></strong>
</li>
<?php if ( $order->get_payment_method_title() ) : ?>
<li class="method">
<?php esc_html_e( 'Payment method:', 'woocommerce' ); ?>
<strong><?php echo wp_kses_post( $order->get_payment_method_title() ); ?></strong>
</li>
<?php endif; ?>
</ul>
<?php do_action( 'woocommerce_receipt_' . $order->get_payment_method(), $order->get_id() ); ?>
// Render the Twig template
Timber::render('shop/review-order.twig', $context);
<div class="clear"></div>

@ -1,90 +0,0 @@
<?php
/**
* Thankyou page
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 8.1.0
*
* @var WC_Order $order
*/
defined( 'ABSPATH' ) || exit;
?>
<div class="woocommerce-order">
<?php
if ( $order ) :
do_action( 'woocommerce_before_thankyou', $order->get_id() );
?>
<?php if ( $order->has_status( 'failed' ) ) : ?>
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed"><?php esc_html_e( 'Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.', 'woocommerce' ); ?></p>
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed-actions">
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php esc_html_e( 'Pay', 'woocommerce' ); ?></a>
<?php if ( is_user_logged_in() ) : ?>
<a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>" class="button pay"><?php esc_html_e( 'My account', 'woocommerce' ); ?></a>
<?php endif; ?>
</p>
<?php else : ?>
<?php wc_get_template( 'checkout/order-received.php', array( 'order' => $order ) ); ?>
<ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details">
<li class="woocommerce-order-overview__order order">
<?php esc_html_e( 'Order number:', 'woocommerce' ); ?>
<strong><?php echo $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<li class="woocommerce-order-overview__date date">
<?php esc_html_e( 'Date:', 'woocommerce' ); ?>
<strong><?php echo wc_format_datetime( $order->get_date_created() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<?php if ( is_user_logged_in() && $order->get_user_id() === get_current_user_id() && $order->get_billing_email() ) : ?>
<li class="woocommerce-order-overview__email email">
<?php esc_html_e( 'Email:', 'woocommerce' ); ?>
<strong><?php echo $order->get_billing_email(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<?php endif; ?>
<li class="woocommerce-order-overview__total total">
<?php esc_html_e( 'Total:', 'woocommerce' ); ?>
<strong><?php echo $order->get_formatted_order_total(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<?php if ( $order->get_payment_method_title() ) : ?>
<li class="woocommerce-order-overview__payment-method method">
<?php esc_html_e( 'Payment method:', 'woocommerce' ); ?>
<strong><?php echo wp_kses_post( $order->get_payment_method_title() ); ?></strong>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php do_action( 'woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id() ); ?>
<?php do_action( 'woocommerce_thankyou', $order->get_id() ); ?>
<?php else : ?>
<?php wc_get_template( 'checkout/order-received.php', array( 'order' => false ) ); ?>
<?php endif; ?>
</div>

@ -1,108 +0,0 @@
<?php
/**
* Thankyou page
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.7.0
*/
defined( 'ABSPATH' ) || exit;
$wrapper_classes = '';
if ( woodmart_get_opt( 'thank_you_page_extra_content' ) ) {
$wrapper_classes .= ' wd-with-extra-content';
}
?>
<div class="woocommerce-order<?php echo esc_attr( $wrapper_classes ); ?>">
<?php if ( $order ) : ?>
<?php do_action( 'woocommerce_before_thankyou', $order->get_id() ); ?>
<?php if ( $order->has_status( 'failed' ) ) : ?>
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed"><?php esc_html_e( 'Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.', 'woocommerce' ); ?></p>
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed-actions">
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php esc_html_e( 'Pay', 'woocommerce' ); ?></a>
<?php if ( is_user_logged_in() ) : ?>
<a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>" class="button pay"><?php esc_html_e( 'My account', 'woocommerce' ); ?></a>
<?php endif; ?>
</p>
<?php else : ?>
<?php if ( woodmart_get_opt( 'thank_you_page_extra_content' ) || woodmart_get_opt( 'thank_you_page_html_block' ) ) : ?>
<div class="wd-order-extra-content">
<?php if ( 'text' === woodmart_get_opt( 'thank_you_page_content_type', 'text' ) ) : ?>
<?php echo do_shortcode( woodmart_get_opt( 'thank_you_page_extra_content' ) ); ?>
<?php else : ?>
<?php echo woodmart_get_html_block( woodmart_get_opt( 'thank_you_page_html_block' ) ); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ( woodmart_get_opt( 'thank_you_page_default_content' ) ) : ?>
<p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), $order ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details">
<li class="woocommerce-order-overview__order order">
<?php esc_html_e( 'Order number:', 'woocommerce' ); ?>
<strong><?php echo $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<li class="woocommerce-order-overview__date date">
<?php esc_html_e( 'Date:', 'woocommerce' ); ?>
<strong><?php echo wc_format_datetime( $order->get_date_created() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<?php if ( is_user_logged_in() && $order->get_user_id() === get_current_user_id() && $order->get_billing_email() ) : ?>
<li class="woocommerce-order-overview__email email">
<?php esc_html_e( 'Email:', 'woocommerce' ); ?>
<strong><?php echo $order->get_billing_email(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<?php endif; ?>
<li class="woocommerce-order-overview__total total">
<?php esc_html_e( 'Total:', 'woocommerce' ); ?>
<strong><?php echo $order->get_formatted_order_total(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<?php if ( $order->get_payment_method_title() ) : ?>
<li class="woocommerce-order-overview__payment-method method">
<?php esc_html_e( 'Payment method:', 'woocommerce' ); ?>
<strong><?php echo wp_kses_post( $order->get_payment_method_title() ); ?></strong>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php endif; ?>
<?php if ( woodmart_get_opt( 'thank_you_page_default_content' ) ) : ?>
<?php do_action( 'woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id() ); ?>
<?php do_action( 'woocommerce_thankyou', $order->get_id() ); ?>
<?php endif; ?>
<?php else : ?>
<p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), null ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<?php endif; ?>
</div>

@ -0,0 +1,119 @@
<?php
/**
* Login Form
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 9.7.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
do_action( 'woocommerce_before_customer_login_form' ); ?>
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
<div class="u-columns col2-set" id="customer_login">
<div class="u-column1 col-1">
<?php endif; ?>
<h2><?php esc_html_e( 'Login', 'woocommerce' ); ?></h2>
<form class="woocommerce-form woocommerce-form-login login" method="post" novalidate>
<?php do_action( 'woocommerce_login_form_start' ); ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?>&nbsp;<span class="required" aria-hidden="true">*</span><span class="screen-reader-text"><?php esc_html_e( 'Required', 'woocommerce' ); ?></span></label>
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" required aria-required="true" /><?php // @codingStandardsIgnoreLine ?>
</p>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?>&nbsp;<span class="required" aria-hidden="true">*</span><span class="screen-reader-text"><?php esc_html_e( 'Required', 'woocommerce' ); ?></span></label>
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" required aria-required="true" />
</p>
<?php do_action( 'woocommerce_login_form' ); ?>
<p class="form-row">
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme">
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span>
</label>
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="login" value="<?php esc_attr_e( 'Log in', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button>
</p>
<p class="woocommerce-LostPassword lost_password">
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
</p>
<?php do_action( 'woocommerce_login_form_end' ); ?>
</form>
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
</div>
<div class="u-column2 col-2">
<h2><?php esc_html_e( 'Register', 'woocommerce' ); ?></h2>
<form method="post" class="woocommerce-form woocommerce-form-register register" <?php do_action( 'woocommerce_register_form_tag' ); ?> >
<?php do_action( 'woocommerce_register_form_start' ); ?>
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="reg_username"><?php esc_html_e( 'Username', 'woocommerce' ); ?>&nbsp;<span class="required" aria-hidden="true">*</span><span class="screen-reader-text"><?php esc_html_e( 'Required', 'woocommerce' ); ?></span></label>
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" required aria-required="true" /><?php // @codingStandardsIgnoreLine ?>
</p>
<?php endif; ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="reg_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?>&nbsp;<span class="required" aria-hidden="true">*</span><span class="screen-reader-text"><?php esc_html_e( 'Required', 'woocommerce' ); ?></span></label>
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" autocomplete="email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( wp_unslash( $_POST['email'] ) ) : ''; ?>" required aria-required="true" /><?php // @codingStandardsIgnoreLine ?>
</p>
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<label for="reg_password"><?php esc_html_e( 'Password', 'woocommerce' ); ?>&nbsp;<span class="required" aria-hidden="true">*</span><span class="screen-reader-text"><?php esc_html_e( 'Required', 'woocommerce' ); ?></span></label>
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" autocomplete="new-password" required aria-required="true" />
</p>
<?php else : ?>
<p><?php esc_html_e( 'A link to set a new password will be sent to your email address.', 'woocommerce' ); ?></p>
<?php endif; ?>
<?php do_action( 'woocommerce_register_form' ); ?>
<p class="woocommerce-form-row form-row">
<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
<button type="submit" class="woocommerce-Button woocommerce-button button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?> woocommerce-form-register__submit" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>"><?php esc_html_e( 'Register', 'woocommerce' ); ?></button>
</p>
<?php do_action( 'woocommerce_register_form_end' ); ?>
</form>
</div>
</div>
<?php endif; ?>
<?php do_action( 'woocommerce_after_customer_login_form' ); ?>

@ -0,0 +1,4 @@
<?php
// include_module('profile');
// include_component('profile', 'profile');
?>

@ -0,0 +1,93 @@
<?php
/**
* My Addresses
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/my-address.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 9.3.0
*/
defined( 'ABSPATH' ) || exit;
$customer_id = get_current_user_id();
if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) {
$get_addresses = apply_filters(
'woocommerce_my_account_get_addresses',
array(
'billing' => __( 'Billing address', 'woocommerce' ),
'shipping' => __( 'Shipping address', 'woocommerce' ),
),
$customer_id
);
} else {
$get_addresses = apply_filters(
'woocommerce_my_account_get_addresses',
array(
'billing' => __( 'Billing address', 'woocommerce' ),
),
$customer_id
);
}
$oldcol = 1;
$col = 1;
?>
<p>
<?php echo apply_filters( 'woocommerce_my_account_my_address_description', esc_html__( 'The following addresses will be used on the checkout page by default.', 'woocommerce' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</p>
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) : ?>
<div class="u-columns woocommerce-Addresses col2-set addresses">
<?php endif; ?>
<?php foreach ( $get_addresses as $name => $address_title ) : ?>
<?php
$address = wc_get_account_formatted_address( $name );
$col = $col * -1;
$oldcol = $oldcol * -1;
?>
<div class="u-column<?php echo $col < 0 ? 1 : 2; ?> col-<?php echo $oldcol < 0 ? 1 : 2; ?> woocommerce-Address">
<header class="woocommerce-Address-title title">
<h2><?php echo esc_html( $address_title ); ?></h2>
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit">
<?php
printf(
/* translators: %s: Address title */
$address ? esc_html__( 'Edit %s', 'woocommerce' ) : esc_html__( 'Add %s', 'woocommerce' ),
esc_html( $address_title )
);
?>
</a>
</header>
<address>
<?php
echo $address ? wp_kses_post( $address ) : esc_html_e( 'You have not set up this type of address yet.', 'woocommerce' );
/**
* Used to output content after core address fields.
*
* @param string $name Address type.
* @since 8.7.0
*/
do_action( 'woocommerce_my_account_after_my_address', $name );
?>
</address>
</div>
<?php endforeach; ?>
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) : ?>
</div>
<?php
endif;
Loading…
Cancel
Save