Compare commits

..

14 Commits

Author SHA1 Message Date
Максим Максимов f88fd2b39f Andrei | исправления после натяжки single страницы 18 hours ago
Максим Максимов ad2f1f4268 Andrei | добавил попап для отображения всех характеристик товара 19 hours ago
Максим Максимов 3d0813989b TAsk 7783 | Доработка карточки товара (добавил попап для ингридиентов) 19 hours ago
Максим Максимов a9f298cbc9 Andrei | рефакторинг - заменил в карточке товара все вызовы функций на методы класса CosmopetProduct 19 hours ago
Максим Максимов f062cbf11f Andrei | wip: refacting module shop 19 hours ago
Максим Максимов d6ae2ec32f Task 7719 | натяжка верстки single страницы товара 19 hours ago
Максим Максимов 8a26495373 Task 7719 | натяжка верстки single товара. 19 hours ago
Максим Максимов 69a3325070 Task 7719 | натяжка верстки single страницы товара 19 hours ago
Максим Максимов fb27b4b04c Andrei | зафиксировал изменения по рефакторингу 19 hours ago
Максим Максимов 5c7182812d Task 7775 | изменил robots.txt добавил в гÐgitignore 19 hours ago
Максим Максимов 3077d7ee75 Task 7715 | добавил динамическое разбиение цены доставки на цена + НДС 19 hours ago
Максим Максимов 893472a4b9 Task 7715 | исправлено отображение цен доставки на цену с учетом НДС 19 hours ago
Максим Максимов cbc6e74957 Task 7721 | Доработки бота отправки заказов 19 hours ago
Максим Максимов a83df458dc Andrei | fix texts lang in static pages 19 hours ago
  1. 2
      .gitignore
  2. 14
      robots.txt
  3. 49
      wp-content/themes/cosmopet/assets/modules/shop/css/cart-loading.css
  4. 746
      wp-content/themes/cosmopet/assets/modules/shop/css/checkout.css
  5. 515
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-core.css
  6. 1706
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-desktop.css
  7. 336
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-mobile.css
  8. 241
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-order.css
  9. 352
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-tablet.css
  10. 4
      wp-content/themes/cosmopet/assets/modules/shop/css/gp-style-ultra.css
  11. 901
      wp-content/themes/cosmopet/assets/modules/shop/css/product-style.css
  12. 8
      wp-content/themes/cosmopet/functions.php
  13. 2
      wp-content/themes/cosmopet/global-functions/multisite-functions.php
  14. 96
      wp-content/themes/cosmopet/modules/forms/module-ajax-controller.php
  15. 4
      wp-content/themes/cosmopet/modules/profile/components/subscription_single/component-controller.php
  16. 2
      wp-content/themes/cosmopet/modules/profile/components/subscriptions/component-controller.php
  17. 9
      wp-content/themes/cosmopet/modules/shop/CosmopetProduct.php
  18. 23
      wp-content/themes/cosmopet/modules/shop/components/product-card/assets/css/product-card.css
  19. 60
      wp-content/themes/cosmopet/modules/shop/components/product-single--new/assets/css/product-style.css
  20. 42
      wp-content/themes/cosmopet/modules/shop/module-controller.php
  21. 129
      wp-content/themes/cosmopet/modules/static-pages/new-front-page copy/template-new-front-page.php
  22. 13
      wp-content/themes/cosmopet/modules/static-pages/new-front-page/template-new-front-page.php
  23. 1
      wp-content/themes/cosmopet/temp-functions/timber-logic.php
  24. 40
      wp-content/themes/cosmopet/temp-functions/woocommerce-logic.php
  25. 4
      wp-content/themes/cosmopet/views/_blocks/shop/archive-product-ajaxload.twig
  26. 2
      wp-content/themes/cosmopet/views/_pages/about.twig
  27. 1
      wp-content/themes/cosmopet/views/_pages/new-front-page.twig
  28. 4
      wp-content/themes/cosmopet/views/_pages/new-front-page/main-food.twig
  29. 4
      wp-content/themes/cosmopet/views/_pages/new-front-page/main-treats.twig
  30. 7
      wp-content/themes/cosmopet/views/_pages/production.twig
  31. 86
      wp-content/themes/cosmopet/views/_pages/shop/archive-product.twig
  32. 2
      wp-content/themes/cosmopet/views/blocks/modules/shop/products-section.twig
  33. 0
      wp-content/themes/cosmopet/views/blocks/modules/shop/reviews-section.twig
  34. 84
      wp-content/themes/cosmopet/views/shop/product-card.twig
  35. 0
      wp-content/themes/cosmopet/views/shop/product-single_page.twig
  36. 4
      wp-content/themes/cosmopet/views/shop/review-order.twig
  37. 321
      wp-content/themes/cosmopet/views/shop/single-product.twig
  38. 11
      wp-content/themes/cosmopet/views/woocommerce/archive-product.twig
  39. 52
      wp-content/themes/cosmopet/views/woocommerce/product-card.twig
  40. 257
      wp-content/themes/cosmopet/views/woocommerce/single-product.twig
  41. 4
      wp-content/themes/cosmopet/woocommerce.php
  42. 10
      wp-content/themes/cosmopet/woocommerce/cart/cart-shipping.php
  43. 4
      wp-content/themes/cosmopet/woocommerce/checkout/review-order.php

2
.gitignore vendored

@ -3,7 +3,7 @@
# GP | SEO # GP | SEO
sitemap*.xml sitemap*.xml
!robots.txt robots.txt
yandex_*.html yandex_*.html
google_*.html google_*.html
yandex_turbo.xml yandex_turbo.xml

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

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

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

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

@ -0,0 +1,336 @@
/* Стили для мобильных устройств */
@media only screen and (max-width: 720px) {
/* product */
.product__item{
width: calc(100% - 24px);
}
/* product */
/* modal */
.modal__basket{
width: 100%;
}
.modal__filter{
width: 100%;
}
.modal__to-know,
.modal__to-know-submit{
width: 100%;
}
.modal__button .to-know{
display: flex;
background: none;
}
.modal__basket .modal__header {
height: calc(100% - 156px);
margin-bottom: -36px;
}
.modal-basket-item__block-image{
position: absolute;
width: 80px;
}
.modal-basket-item__image{
width: 48px;
}
.modal-basket-item__content{
margin-left: 0;
padding-left: 96px;
}
.modal-basket-item__control{
margin-left: -80px;
}
.modal-basket-item__title{
min-height: 40px;
font-size: 16px;
}
.modal-basket__item--return{
flex-direction: column;
align-items: start;
}
.modal-basket__item--return .modal-basket-item__title{
margin-right: auto;
}
.notification--width-584{
width: 100%;
}
.notification__title{
font-size: 20px;
}
.notification__text--center-pc{
text-align: start;
}
.notification__img{
height: 360px;
}
.notification__title{
padding-right: 96px;
}
.modal-form__buttons--two{
flex-wrap: wrap;
}
.modal-form__buttons--two button, .modal-form__buttons--two input{
margin-top: 24px;
width: 100%;
}
.modal-form__buttons--two button:first-child, .modal-form__buttons--two input:first-child{
margin-top: 0;
}
.modal-map__control{
flex-wrap: wrap;
}
.modal-map-control__item{
width: calc(100% - 24px);
}
.form__full-mobile{
width: 100%;
border-radius: 0;
border: none;
}
.modal-form-content__line--three .modal-form-content-line__element:nth-child(1){
width: 69px;
}
.modal-form-content__line--three .modal-form-content-line__element:nth-child(2){
}
.modal-form-content__line--three .modal-form-content-line__element:nth-child(3){
width: 82px;
}
.form__input{
padding: 12px 14px;
}
.modal-form--height-100-phone{
min-height: 100%;
}
/* modal */
/* footer */
.footer__about{
display: none;
}
.footer__wrapper{
flex-direction: column;
}
.footer__content{
width: 100%;
}
.footer__form{
margin-top: 24px;
margin-left: 0;
width: 100%;
}
.footer__social-media{
display: block;
margin-top: 24px;
}
.footer-about__text{
padding-top: 35px;
display: block;
text-align: left;
}
.footer__list{
margin-top: 20px;
}
/* footer */
/* detail */
.toggle__table--two .toggle-table__block{
width: 100%;
}
.toggle__table--two .toggle-table__block:nth-child(even){
margin-top: 32px;
margin-left: 0;
}
.toggle__table--three .toggle-table__block:nth-child(1){
width: 31%;
}
/* detail */
/* cabinet */
.cabinet-card__title{
font-size: 20px;
}
.cabinet-card__no-orders{
margin-top: 16px;
}
.cabinet-card-order__header{
flex-direction: column;
}
.cabinet-card-order__payment{
margin-top: 16px;
}
.cabinet-card-order-detail__main{
flex-direction: column;
}
.cabinet-card-order-detail-main__links{
margin-top: 24px;
align-items: start;
}
.cabinet-card-order-detail-main-product__img{
width: 70px;
height: 70px;
}
.cabinet-card-order-detail-main__product{
margin-top: 16px;
align-items: start;
}
.cabinet-card-order-detail-main-product__content{
margin-left: 16px;
flex-wrap: wrap;
position: relative;
}
.cabinet-card-order-detail-main-product__description{
width: 100%;
}
.cabinet-card-order-detail-main-product__count{
position: absolute;
left: 116px;
bottom: 0;
}
.cabinet-card-order-detail-main-product__price{
position: absolute;
left: 153px;
bottom: 0;
}
.cabinet-card__content{
padding-right: 19px;
}
.cabinet-card-order-main__date{
font-size: 20px;
}
/* .cabinet-card__order.active */
/* .cabinet-card__order.active */
/* cabinet */
}
@media only screen and (max-width: 576px) {
/* header */
/* header */
/* product */
.product__header{
flex-direction: column;
align-items: start;
}
.product__header .button{
margin-top: 48px;
}
/* product */
/* modal */
.modal__aside{
left: 0;
}
.form-input-radio__title span{
display: block;
width: 100%;
color: var(--text-grey);
}
.modal-form__title{
font-size: 20px;
}
/* modal */
/* detail */
.detail-block-form__item,
.detail-block-form__submit{
min-width: 100%;
}
/* detail */
/* cabinet */
.cabinet-card-order-detail-main-product__img{
width: 40px;
height: 40px;
}
.cabinet-card-order-detail-main-product__count{
left: auto;
right: 71px;
}
.cabinet-card-order-detail-main-product__price{
left: auto;
right: 0;
}
.cabinet-card-order__detail-short{
transition-delay: 0;
transition-duration: 0;
}
/* cabinet */
}
@media only screen and (max-width: 720px) {
.subscription__item{
flex-direction: column;
}
.subscription__item > p:first-child{
font-size: 16px;
color: var(--text-6);
}
.subscription__item > p:last-child{
margin-top: 6px;
}
.subscription__add-title {
font-size: 20px;
}
.subscription__add-product{
flex-wrap: wrap;
}
.subscription__add-product > *:not(:first-child){
padding-top: 0;
}
.subscription__add-product .cabinet-card-order-detail-main-product__img{
width: 73px;
height: 66px;
}
.subscription__add-product .cabinet-card-order-detail-main-product-description__what{
font-size: 12px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.subscription__add-product .cabinet-card-order-detail-main-product-description__with-what{
margin-top: 8px;
font-size: 12px;
}
.subscription__add-product .cabinet-card-order-detail-main-product__description {
width: calc(100% - 73px);
}
.subscription__add-product .cabinet-card-order-detail-main-product__content{
position: static;
margin-top: -10px;
margin-left: auto;
width: calc(100% - 73px);
display: flex;
justify-content: space-between;
align-items: center;
}
.subscription__add-product .cabinet-card-order-detail-main-product__count{
position: static;
font-size: 12px;
}
.subscription__add-product .cabinet-card-order-detail-main-product__price{
position: static;
font-size: 16px;
}
}

@ -0,0 +1,241 @@
.order{
display: flex;
}
.order__title{
font-family: var(--font-family);
font-weight: 700;
font-size: 24px;
line-height: 117%;
text-transform: uppercase;
color: var(--text-black);
}
.order__contacts{
width: calc(50% - 0.5px);
padding: 24px;
border-right: 1px solid #121212;
}
.order-contacts__header{
display: flex;
justify-content: space-between;
align-items: center;
}
.order-contacts__form{
margin-top: 24px;
}
.order-contacts__delivery{
margin-top: 47.5px;
padding-top: 48px;
border-top: 1px solid var(--background-grey);
}
.order-contacts-deliver__item{
margin-top: 24px;
}
.order-contacts-deliver__date{
padding: 8px;
border-radius: 24px;
background: var(--background-grey);
}
.order-contacts-deliver__date .form-input-radio__item{
margin-top: 24px;
}
.order-contacts-deliver__date .form-input-radio__item:first-child{
margin-top: 0;
}
.order__your{
width: calc(50% - 0.5px);
padding: 24px 24px 24px 48px;
background: var(--background-grey);
}
.order-your__products{
margin-top: 48px;
}
.order-your-products__item{
margin-top: 16px;
display: flex;
justify-content: space-between;
}
.order-your-products__left{
display: flex;
}
.order-your-products__img{
width: 40px;
aspect-ratio: 1;
border-radius: 16px;
}
.order-your-products__content{
margin-left: 16px;
}
.order-your-products__name{
font-family: var(--font-family);
font-weight: 500;
font-size: 12px;
line-height: 133%;
color: var(--text-black);
text-decoration: none;
}
.order-your-products__description{
margin-top: 8px;
font-family: var(--font-family);
font-weight: 500;
font-size: 12px;
line-height: 133%;
color: var(--text-6);
}
.order-your-products__description span{
font-weight: 700;
}
.order-your-products__description span::before{
margin-left: 3px;
content: 'x ';
}
.order-your-products__right{
display: flex;
}
.order-your-products__count{
font-family: var(--font-family);
font-weight: 700;
font-size: 12px;
line-height: 133%;
text-align: right;
color: var(--text-6);
}
.order-your-products__count::before{
content: 'x';
}
.order-your-products__price{
margin-left: 16px;
font-family: var(--font-family);
font-weight: 700;
font-size: 12px;
line-height: 133%;
text-align: right;
color: var(--text-black);
}
.order-your-products__price::after{
content: 'Р';
}
.order-your__calculation{
margin-top: 48px;
}
.order-your__promo{
display: flex;
}
.order-your-promo__button{
margin-left: 8px;
}
.order-your-calculation__item{
margin-top: 24px;
display: flex;
justify-content: space-between;
align-items: center;
}
.order-your-calculation__title{
font-family: var(--font-family);
font-weight: 500;
font-size: 20px;
line-height: 120%;
color: var(--text-black);
}
.order-your-calculation__value{
font-family: var(--font-family);
font-weight: 700;
font-size: 20px;
line-height: 200%;
text-transform: uppercase;
text-align: right;
color: var(--text-black);
}
.order-your-calculation__value--price::after{
content: ' ₽';
}
.order-your-calculation__value--discount{
background: var(--gradient-red);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.order-your-calculation__value--discount::before{
content: '- ';
}
.order-your-calculation__description{
font-family: var(--font-family);
font-weight: 500;
font-size: 12px;
line-height: 133%;
text-align: right;
color: var(--text-9);
}
.order-your-calculation__line{
margin-top: 23px;
border: 1px solid var(--background-9);
}
.order-your-calculation__result{
font-family: var(--font-family);
font-weight: 700;
font-size: 24px;
line-height: 117%;
text-transform: uppercase;
color: var(--text-black);
}
.order-your-calculation__submit{
margin-top: 48px;
}
@media only screen and (max-width: 1200px) {
.order{
display: block;
}
.order__contacts, .order__your{
border: none;
width: 100%;
}
}
@media only screen and (max-width: 720px) {
.order__title{
max-width: 181px;
font-size: 20px;
line-height: 120%;
}
.order__your{
margin-top: 16px;
}
.order__contacts{
padding: 24px 16px;
}
.order__your{
padding: 40px 16px 9px 16px;
}
.order-your__promo{
display: block;
}
.order-your-promo__button{
margin-left: 0;
margin-top: 24px;
width: 100%;
}
.order-your-products__content{
max-width: 164px;
}
.order-your-products__count, .order-your-products__price{
flex-shrink: 0;
}
}

@ -0,0 +1,352 @@
/* Стили для планшетов */
@media only screen and (max-width: 1200px) {
.product__main{
margin: 36px 0 0;
}
/* header */
main{
padding-top: 64px;
}
.main-menu{
display: none;
}
.header__open-menu{
display: block;
}
.lang{
display: none;
}
.header__logo{
width: 136px;
height: 29px;
}
.header__content{
height: auto;
padding: 8px 16px;
}
.mini-profile__item:nth-child(2){
margin-left: 0;
}
.header::after{
left: 0;
width: 100%;
}
.header__pc-menu{
display: none;
}
.header__phone-menu{
display: block;
}
.header__menu-block{
top: 56px;
}
.header__content::after{
left: 0;
right: 0;
width: 100%;
}
/* header */
/* footer */
.footer{
margin-top: 0;
padding: 24px 16px;
}
/* footer */
/* breadcrumbs */
.breadcrumbs{
display: none;
}
/* breadcrumbs */
/* product */
.product{
padding: 12px;
padding-top: 20px;
}
.product__title{
font-weight: 700;
font-size: 26px;
line-height: 123%;
text-transform: uppercase;
}
.to-know p {
font-size: 18px;
}
.toggle-table__title{
font-weight: 700;
font-size: 12px;
line-height: 133%;
}
.toggle-table__item p{
font-weight: 500;
font-size: 12px;
line-height: 133%;
}
.toggle-table-item__line{
margin-top: 12px;
}
.detail{
margin: 24px 16px;
}
.back-detail{
display: inline;
}
.detail-catalot__title{
font-size: 22px;
}
.product__footer--error{
margin: 48px 0px 24px;
}
/* product */
/* modal */
.modal{
padding: 0;
}
.modal__text{
padding-right: 0;
}
.form__button-pc{
display: none;
}
.form__button-mobile{
display: block;
}
.modal-form{
/* min-height: 100%;
width: 100%;
border-radius: 0;
border: none; */
}
.modal__notification{
margin: 24px;
}
.form-input-phone__list{
left: 0;
}
.modal-form-content__line--two{
flex-wrap: wrap;
}
.modal-form-content__line--two .modal-form-content-line__element{
margin-top: 24px;
width: 100%;
}
.modal-form-content__line--two .modal-form-content-line__element:first-child{
margin-top: 0;
}
.modal-map{
width: 100%;
flex-direction: column;
border-radius: 0;
}
.modal-map__left, .modal-map__right{
width: 100%;
}
.modal-map__map iframe {
width: 100%;
height: 528px;
}
.modal-map-form__button{
display: none;
}
.modal-map-form__sub-button{
margin-top: 64px;
padding: 0 24px;
display: flex;
}
/* modal */
/* cabinet */
.cabinet{
flex-direction: column;
position: relative;
}
.cabinet__control{
display: flex;
position: relative;
}
.cabinet__orders, .cabinet__profile{
width: calc(100% - 48px);
}
.cabinet__orders, .cabinet__profile{
position: absolute;
opacity: 0;
transition: opacity .2s ease-out;
}
.cabinet-content{
pointer-events:none;
}
.cabinet__orders.active, .cabinet__profile.active{
opacity: 1;
}
.cabinet__orders.hide, .cabinet__profile.hide{
position: static;
display: block;
pointer-events:auto;
width: 100%;
}
.cabinet__subscription-pc{
display: none;
}
.cabinet__subscription-mobile{
display: block;
margin: 24px 24px 0 24px;
}
.cabinet__orders .cabinet-card:nth-child(2){
margin-top: 0;
}
.cabinet__orders--no-cab .cabinet-card:nth-child(2){
margin-top: 32px;
}
/* cabinet */
}
@media only screen and (max-width: 980px) {
/* product */
.product__item{
width: calc(50% - 24px);
}
/* product */
/* detail */
.detail{
flex-direction: column;
}
.detail__images{
display: none;
}
.detail__content{
width: 100%;
}
.detail__content{
margin-left: 0;
}
.detail__images-phone{
display: block;
margin-top: 48px;
margin-bottom: 48px;
position: relative;
overflow: hidden;
}
.detail__images-phone .swiper-slide{
display: flex;
justify-content: center;
}
.detail-images-phone__image-block{
width: 100%;
aspect-ratio: 1;
max-width: 500px;
display: flex;
justify-content: center;
align-items: center;
background: var(--background-grey);
border-radius: 16px;
}
.detail__images-phone .swiper-pagination-bullet{
width: 8px;
height: 8px;
border-radius: 50%;
border: 1px solid #666;
background-color: #666;
opacity: 1;
}
.detail__images-phone .swiper-pagination-bullet.swiper-pagination-bullet-active{
background-color: var(--background-white);
}
.detail__images-phone .swiper-pagination{
margin-bottom: 19px;
}
.detail__title{
font-size: 26px;
line-height: 123%;
}
.gallery__slider .swiper-pagination {
display: block;
}
.gallery__pagination{
display: none;
}
.gallery__slider .swiper-pagination-bullet{
width: 8px;
height: 8px;
border-radius: 50%;
border: 1px solid #666;
background-color: #666;
opacity: 1;
}
.gallery__wrapper .gallery-button{
display: none;
}
.gallery__slider .swiper-pagination-bullet.swiper-pagination-bullet-active{
background-color: var(--background-white);
}
.gallery__slider{
margin-left:0;
padding: 0px 0px 50px 0px;
/* padding: 40px; */
}
.gallery__block {
width: 100%;
aspect-ratio: 1;
height: auto;
}
/* detail */
}
@media only screen and (max-width: 750px) {
/* cabinet */
.cabinet-card-order__open-detail{
margin-top: 144px;
}
.cabinet-card-order__detail-short{
right: auto;
left: 0;
bottom: 48px;
}
.cabinet-card-order-detail-short__item{
margin-left: -27px;
}
.cabinet-card-order-detail-short__item:first-child{
margin-left: 0;
}
.cabinet-card__order.active .cabinet-card-order__open-detail{
margin-top: 24px;
}
.cabinet-card-order__link{
margin-top: 144px;
}
/* cabinet */
}

@ -0,0 +1,4 @@
/* Стили для ультрашироких экранов */
@media only screen and (min-width: 1400px) {
}

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

@ -31,9 +31,15 @@ add_filter('timber/post/classmap', function ($classmap) {
return $classmap; return $classmap;
}, 100); }, 100);
add_filter('timber/post/classmap', function ($classmap) {
$classmap['product'] = CosmopetProduct::class;
return $classmap;
}, 100);
function allow_svg_upload($mimes) { function allow_svg_upload($mimes) {
$mimes['svg'] = 'image/svg+xml'; $mimes['svg'] = 'image/svg+xml';
return $mimes; return $mimes;
} }
add_filter('upload_mimes', 'allow_svg_upload');
add_filter('upload_mimes', 'allow_svg_upload');

@ -35,4 +35,4 @@ add_filter('timber/twig', function (\Twig\Environment $twig) {
add_filter('woocommerce_currency_symbol', function($currency_symbol, $currency) { add_filter('woocommerce_currency_symbol', function($currency_symbol, $currency) {
return $currency === 'AED' ? 'AED' : $currency_symbol; return $currency === 'AED' ? 'AED' : $currency_symbol;
}, 10, 2); }, 10, 2);

@ -276,21 +276,39 @@ function send_order_data($order_id) {
$customer_name = $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(); $customer_name = $order->get_billing_first_name() . ' ' . $order->get_billing_last_name();
$customer_phone = $order->get_billing_phone(); $customer_phone = $order->get_billing_phone();
$customer_email = $order->get_billing_email(); $customer_email = $order->get_billing_email();
$order_total = $order->get_total(); $order_total = round_price_with_tax($order->get_total());
$order_comment = ''; $order_comment = '';
$utm = get_utm_data()['utm_source']; $utm = get_utm_data()['utm_source'];
$url = ''; $url = '';
$fName = 2; $fName = 2;
// 2. Формируем список товаров
// 2. Формируем список товаров с полной ценой (включая НДС)
foreach ($order->get_items() as $item) { foreach ($order->get_items() as $item) {
$product = $item->get_product(); $product = $item->get_product();
// Используем get_total_tax() + get_total() для получения полной цены с НДС
$item_total_without_tax = $item->get_total();
$item_tax = $item->get_total_tax();
$item_total_with_tax = round_price_with_tax($item_total_without_tax + $item_tax);
$order_comment .= sprintf( $order_comment .= sprintf(
"%s x %s = %s\n", "%s x %s = %s\n",
$product->get_name(), $product->get_name(),
$item->get_quantity(), $item->get_quantity(),
wc_price($item->get_total()) strip_tags(wc_price($item_total_with_tax))
); );
} }
// 3. Добавляем информацию о промокодах, если они использовались
$coupons = $order->get_coupon_codes();
if (!empty($coupons)) {
$order_comment .= "\n=== ПРОМОКОДЫ ===\n";
foreach ($coupons as $coupon_code) {
$coupon = new WC_Coupon($coupon_code);
$discount_amount = round_price_with_tax($order->get_discount_total());
$order_comment .= "Промокод: {$coupon_code}\n";
$order_comment .= "Скидка: " . strip_tags(wc_price($discount_amount)) . "\n";
}
}
$order_comment .= "\n=== ДАННЫЕ ДОСТАВКИ ===\n"; $order_comment .= "\n=== ДАННЫЕ ДОСТАВКИ ===\n";
$order_comment .= "Город: " . $order->get_billing_city() . "\n"; $order_comment .= "Город: " . $order->get_billing_city() . "\n";
$order_comment .= "Адрес: " . $order->get_billing_address_1() . "\n"; $order_comment .= "Адрес: " . $order->get_billing_address_1() . "\n";
@ -302,11 +320,8 @@ function send_order_data($order_id) {
if (is_user_logged_in()) { if (is_user_logged_in()) {
$user_id = get_current_user_id(); $user_id = get_current_user_id();
} else {
}
else{
$user_id = ''; $user_id = '';
} }
$form_title = 'Покупка на сайте'; $form_title = 'Покупка на сайте';
$formData = [ $formData = [
@ -319,7 +334,7 @@ function send_order_data($order_id) {
'ORDER_ID' => $order_id, 'ORDER_ID' => $order_id,
'ORDER_TOTAL' => $order_total, 'ORDER_TOTAL' => $order_total,
'PAYMENT_METHOD' => $order->get_payment_method_title(), 'PAYMENT_METHOD' => $order->get_payment_method_title(),
'COMMENTS' => $order_comment, 'COMMENTS' => $clean_order_comment,
// Адрес (префикс ADDR_) // Адрес (префикс ADDR_)
'ADDR_CITY' => $order->get_billing_city(), 'ADDR_CITY' => $order->get_billing_city(),
@ -341,40 +356,75 @@ function send_order_data($order_id) {
$product_summary = "🛒 Состав заказа:\n\n"; $product_summary = "🛒 Состав заказа:\n\n";
foreach ($order->get_items() as $item) { foreach ($order->get_items() as $item) {
$product = $item->get_product(); $product = $item->get_product();
$formData["PRODUCT_{$product_index}_NAME"] = $product->get_name(); $product_name = $product->get_name();
$formData["PRODUCT_{$product_index}_QTY"] = $item->get_quantity(); $product_qty = $item->get_quantity();
$formData["PRODUCT_{$product_index}_PRICE"] = $item->get_total(); $product_total_without_tax = $item->get_total();
$formData["PRODUCT_{$product_index}_SKU"] = $product->get_sku(); $product_tax = $item->get_total_tax();
$product_total_with_tax = round_price_with_tax($product_total_without_tax + $product_tax);
// Добавляем в текстовую сводку $product_sku = $product->get_sku();
$product_summary .= "{$product_index}) {$name}\n";
$product_summary .= " Кол-во: {$qty}\n"; $formData["PRODUCT_{$product_index}_NAME"] = $product_name;
$product_summary .= " Сумма: {$total}\n"; $formData["PRODUCT_{$product_index}_QTY"] = $product_qty;
if ($sku) { $formData["PRODUCT_{$product_index}_PRICE"] = $product_total_with_tax;
$product_summary .= " Артикул: {$sku}\n"; $formData["PRODUCT_{$product_index}_SKU"] = $product_sku;
// Добавляем в текстовую сводку с полной ценой
$product_summary .= "{$product_index}) {$product_name}\n";
$product_summary .= " Кол-во: {$product_qty}\n";
$product_summary .= " Сумма: " . strip_tags(wc_price($product_total_with_tax)) . "\n";
if ($product_sku) {
$product_summary .= " Артикул: {$product_sku}\n";
} }
$product_summary .= "\n"; $product_summary .= "\n";
$product_index++; $product_index++;
} }
// Добавляем информацию о промокодах в сводку товаров
$coupons = $order->get_coupon_codes();
if (!empty($coupons)) {
$product_summary .= "=== ПРОМОКОДЫ ===\n";
foreach ($coupons as $coupon_code) {
$coupon = new WC_Coupon($coupon_code);
$discount_amount = round_price_with_tax($order->get_discount_total());
$product_summary .= "Промокод: {$coupon_code}\n";
$product_summary .= "Скидка: " . strip_tags(wc_price($discount_amount)) . "\n";
}
$product_summary .= "\n";
}
// Функция для очистки текста от HTML-сущностей
function clean_text_for_telegram($text) {
// Удаляем HTML-теги
$text = strip_tags($text);
// Заменяем HTML-сущности на обычные символы
$text = html_entity_decode($text, ENT_QUOTES | ENT_HTML5, 'UTF-8');
// Убираем лишние пробелы
$text = preg_replace('/\s+/', ' ', $text);
return trim($text);
}
$message = "📋 Данные формы:\n\n"; $message = "📋 Данные формы:\n\n";
foreach ($formData as $key => $value) { foreach ($formData as $key => $value) {
if (is_array($value)) { if (is_array($value)) {
$value = implode(', ', $value); // на случай, если в значении массив $value = implode(', ', $value); // на случай, если в значении массив
} }
$message .= sprintf("%s: %s\n", $key, $value); $message .= sprintf("%s: %s\n", $key, clean_text_for_telegram($value));
} }
// Очищаем тексты от HTML-сущностей для Telegram
$clean_product_summary = clean_text_for_telegram($product_summary);
$clean_order_comment = clean_text_for_telegram($order_comment);
$crmData = array( $crmData = array(
'phone' => $customer_phone, 'phone' => $customer_phone,
'name' => $customer_name, 'name' => $customer_name,
'email' => $customer_email, 'email' => $customer_email,
'msg' => $product_summary, 'msg' => $clean_product_summary,
'url' => null, 'url' => null,
'stage' => 'C2:UC_ZMY1QV', 'stage' => 'C2:UC_ZMY1QV',
'fName' => 2, 'fName' => 2,
'order_total' => $order_total, 'order_total' => $order_total,
'user_id' => $user_data['user_id'], 'user_id' => $user_id,
'method' => 'crm.deal.add', 'method' => 'crm.deal.add',
'form_title' => 'Заказ на сайте', 'form_title' => 'Заказ на сайте',
'is_subscribe' => false, 'is_subscribe' => false,
@ -393,7 +443,7 @@ function notify_order_paid($order_id) {
'TITLE' => 'Заказ #' . $order_id . ' оплачен', 'TITLE' => 'Заказ #' . $order_id . ' оплачен',
'ORDER_ID' => $order_id, 'ORDER_ID' => $order_id,
'PAYMENT_METHOD' => $order->get_payment_method_title(), 'PAYMENT_METHOD' => $order->get_payment_method_title(),
'ORDER_TOTAL' => $order->get_total(), 'ORDER_TOTAL' => round_price_with_tax($order->get_total()),
'SOURCE' => 'WooCommerce', 'SOURCE' => 'WooCommerce',
]; ];

@ -69,7 +69,7 @@ if (!$subscription || !wcs_is_subscription($subscription) || $subscription->get_
'variation_details' => $variation_details, 'variation_details' => $variation_details,
], ],
'quantity' => $item->get_quantity(), 'quantity' => $item->get_quantity(),
'total' => $item->get_total(), 'total' => round_price_with_tax($item->get_total()),
]; ];
}, $subscription->get_items()); }, $subscription->get_items());
@ -93,7 +93,7 @@ if (!$subscription || !wcs_is_subscription($subscription) || $subscription->get_
'last_order_date' => $subscription->get_date('last_order_date_created'), 'last_order_date' => $subscription->get_date('last_order_date_created'),
'next_payment_date' => $subscription->get_date('next_payment'), 'next_payment_date' => $subscription->get_date('next_payment'),
'payment_method_title' => $subscription->get_payment_method_title(), 'payment_method_title' => $subscription->get_payment_method_title(),
'total' => $subscription->get_total(), 'total' => round_price_with_tax($subscription->get_total()),
'currency' => $subscription->get_currency(), 'currency' => $subscription->get_currency(),
'items' => $items, 'items' => $items,
'cancel_url' => $cancel_url, 'cancel_url' => $cancel_url,

@ -35,7 +35,7 @@ foreach ($subscriptions as $subscription) {
$subscription_data[] = [ $subscription_data[] = [
'id' => $subscription->get_id(), 'id' => $subscription->get_id(),
'date_created' => $subscription->get_date_created(), 'date_created' => $subscription->get_date_created(),
'total' => $subscription->get_total(), 'total' => round_price_with_tax($subscription->get_total()),
'currency' => $subscription->get_currency(), 'currency' => $subscription->get_currency(),
'billing_period' => $subscription->get_billing_period(), 'billing_period' => $subscription->get_billing_period(),
'next_payment_date' => $subscription->get_date('next_payment'), 'next_payment_date' => $subscription->get_date('next_payment'),

@ -604,14 +604,14 @@ class CosmopetProduct extends TimberProduct {
return $attributes; return $attributes;
} }
public function getPrice(){ public function getPriceWithCurrency(){
$price = $this->product->get_price() . ' ' . get_woocommerce_currency_symbol(); $price = $this->product->get_price() . ' ' . get_woocommerce_currency_symbol();
return $price; return $price;
} }
public function getRegularPrice(){ public function getRegularPriceWithCurrency(){
$regular_price = $this->product->get_regular_price() . ' ' . get_woocommerce_currency_symbol(); $regular_price = $this->product->get_regular_price() . ' ' . get_woocommerce_currency_symbol();
if ($regular_price != $this->getPrice()){ if ($regular_price != $this->getPriceWithCurrency()){
return $regular_price; return $regular_price;
} }
else{ else{
@ -657,6 +657,5 @@ class CosmopetProduct extends TimberProduct {
} }
return $related_products; return $related_products;
} }
};
};

@ -345,4 +345,27 @@ background: radial-gradient(278.91% 196.13% at 128.36% -48.29%, #ee6868 0%, #569
/* Стили для счетчика во время загрузки */ /* Стили для счетчика во время загрузки */
.product-incart__wrap.loading .product-incart__count { .product-incart__wrap.loading .product-incart__count {
opacity: 0.5; opacity: 0.5;
}
.main-food_products-card-bottom-nv{
padding: 10px 30px;
font-size: 18px;
text-transform: uppercase;
background-color: #fff;
border-radius: 100px;
color: var(--accent-color);
}
@media (max-width: 1200px) {
.main-food_products-card-bottom-nv{
font-size: 10px;
height: 44px;
padding-left: 6px;
padding-right: 6px;
display: flex;
align-items: center;
}
.main-food_products-card-bottom-price{
flex-shrink: 0;
}
} }

@ -678,6 +678,14 @@ line-height: 143%;
display: flex; display: flex;
flex-grow: 1; flex-grow: 1;
flex-direction: column; flex-direction: column;
max-width: calc(100% - 1000px);
margin-right: 2rem;
}
@media (max-width: 1200px) {
.product-show{
margin-right: 0;
max-width: 100%;
}
} }
@media (max-width: 576px) { @media (max-width: 576px) {
.product_main { .product_main {
@ -687,7 +695,8 @@ line-height: 143%;
.product-show{ .product-show{
flex-direction: column; flex-direction: column;
min-height: calc(100vh - 80px); min-height: calc(100vh - 80px);
margin-right: 0;
max-width: 100%;
} }
.product-gallery{ .product-gallery{
flex-grow: 1; flex-grow: 1;
@ -899,3 +908,52 @@ line-height: 143%;
.product-incart__wrap.loading .product-incart__count { .product-incart__wrap.loading .product-incart__count {
opacity: 0.5; opacity: 0.5;
} }
.product-pp-btn{
display: flex;
justify-content: center;
margin-top: 1rem;
gap: 1rem;
/* Смотреть все */
font-weight: 700;
font-size: 16px;
line-height: 20px;
text-decoration-line: underline;
color: var(--accent-color);
align-items: center;
margin-right: auto;
margin-left: auto;
}
.product-pp-btn svg, .product-pp-btn path{
fill: var(--accent-color);
stroke: var(--accent-color);
}
.mform__info__c{
display: flex;
justify-content: space-between;
margin-top: 2rem;
flex-wrap: wrap;
}
.mform__info__col{
width: 48.5%;
}
.mform__info__col .product-values{
margin-top: 0;
}
@media (max-width: 640px) {
.mform__info__col{
width: 100%;
}
}
.mform__review-wrap{
max-height: 100vh;
overflow: auto;
}

@ -403,3 +403,45 @@ function map_attr_slugs_to_class($slug) {
return $slug_map[$slug] ?? $slug; // Fallback to original slug if not found return $slug_map[$slug] ?? $slug; // Fallback to original slug if not found
} }
// Изменение цены доставки на разбиение НДС + основная стоимость
add_filter( 'woocommerce_package_rates', function( $rates, $package ) {
foreach ( $rates as $rate_id => $rate ) {
// Цена от плагина (итоговая с налогом)
$final_shipping_with_tax = $rate->cost;
// Получаем налоговую ставку для этого метода
$tax_rates = WC_Tax::get_rates( $rate->tax_class );
if ( empty( $tax_rates ) ) {
continue; // если нет налога
}
// Берём первую найденную ставку
$tax_rate_key = key( $tax_rates );
$tax_rate_data = reset( $tax_rates );
$tax_percent = floatval( $tax_rate_data['rate'] );
// Считаем коэффициент
$coef = 1 / ( 1 + $tax_percent / 100 );
// Цена без налога
$base_shipping = round( $final_shipping_with_tax * $coef, wc_get_price_decimals() );
// Налог как разница
$tax_amount = round( $final_shipping_with_tax - $base_shipping, wc_get_price_decimals() );
// Устанавливаем
$rate->cost = $base_shipping;
// Заполняем налоги корректно для WooCommerce
$taxes_array = array_fill_keys( array_keys( WC_Tax::get_rates( $rate->tax_class ) ), 0 );
$taxes_array[$tax_rate_key] = $tax_amount;
$rate->taxes = $taxes_array;
}
return $rates;
}, 100, 2 );

@ -0,0 +1,129 @@
<?php
/**
* Template Name: New Main Page
* Description: Front page template
*/
if (!class_exists('Timber')) {
echo 'Timber не установлен. Пожалуйста, активируйте плагин Timber.';
return;
}
function enqueue_custom_gallery_assets() {
// Fancybox 5
wp_enqueue_style(
'fancybox-css',
'https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.css',
[],
null
);
wp_enqueue_script(
'fancybox-js',
'https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.js',
[],
null,
true
);
// Инициализация Fancybox
wp_add_inline_script('fancybox-js', "
document.addEventListener('DOMContentLoaded', function () {
Fancybox.bind('[data-fancybox=\"gallery\"]', {});
});
");
}
add_action('wp_enqueue_scripts', 'enqueue_custom_gallery_assets');
function theme_enqueue_scripts() {
wp_enqueue_style('gp-front-page-materialize-css', get_template_directory_uri() . '/static/css/libs/materialize.min.css');
wp_enqueue_style(
'gp-front-page-style-2',
get_template_directory_uri() . '/static/css/front-page-style.css',
array(),
filemtime(get_template_directory() . '/static/css/front-page-style.css')
);
wp_enqueue_style(
'gp-front-page-style',
get_template_directory_uri() . '/static/css/new-front-page-style.css',
array(),
filemtime(get_template_directory() . '/static/css/new-front-page-style.css')
);
wp_enqueue_script('gp-front-page-materialize', get_template_directory_uri() . '/static/js/libs/materialize.min.js', array(), null, true);
wp_enqueue_script('gp-front-page-main', get_template_directory_uri() . '/static/js/new-front-page.js', array(), null, true);
}
add_action('wp_enqueue_scripts', 'theme_enqueue_scripts');
include_component('blog', 'main-page-block');
include_component('shop', 'product-card');
$reviews_food_query = get_posts(array(
'post_type' => 'p_reviews',
'numberposts' => -1,
'meta_key' => 'food_enable',
'meta_value' => true,
'meta_compare' => '='
));
$reviews_treats_query = get_posts(array(
'post_type' => 'p_reviews',
'numberposts' => -1,
'meta_key' => 'treats_enable',
'meta_value' => true,
'meta_compare' => '='
));
$context = Timber::context();
if (function_exists('get_field')) {
//products
$context['reviews_treats_query'] = $reviews_treats_query;
$context['reviews_food_query'] = $reviews_food_query;
// main
$context['main_slider'] = get_field('main_slider');
// about
$context['main_about_title'] = get_field('main_about-title');
$context['main_about_image'] = get_field('main_about-image');
$context['main_about_text'] = get_field('main_about-text');
$context['main_about_banner_bg'] = get_field('main_about-banner-bg');
$context['main_about_banner_title'] = get_field('main_about-banner-title');
$context['main_about_banner_descr'] = get_field('main_about-banner-descr');
// why
$context['main_why_title'] = get_field('main_why-title');
$context['main_why_items'] = get_field('main_why-items');
$context['main_why_text'] = get_field('main_why-text');
$context['main_why_logos'] = get_field('main_why-logos');
// ingredients
$context['main_ingredients_title'] = get_field('main_ingredients-title');
$context['main_ingredients_slider'] = get_field('main_ingredients-slider');
// specialists
$context['main_specialists_title'] = get_field('main_specialists-title');
$context['main_specialists_items'] = get_field('main_specialists-items');
// cosmopetx
$context['other_post'] = Timber::get_post(383); // Загружаем пост с ID 383
//quiz
$context['q_title'] = get_field('q_title');
$context['reviews_title'] = get_field('reviews_title');
$context['q_1'] = get_field('q_1', 383);
$context['q_2'] = get_field('q_2', 383);
$context['q_3'] = get_field('q_3', 383);
$context['q_4'] = get_field('q_4', 383);
$context['q_5'] = get_field('q_5', 383);
//
$context['food_list'] = get_field('featured_food');
$context['treats_list'] = get_field('featured_treats');
}
try {
Timber::render('_pages/new-front-page.twig', $context); // Рендерим отдельный Twig-шаблон
} catch (Exception $e) {
error_log('Ошибка рендеринга: ' . $e->getMessage());
echo 'Произошла ошибка при рендеринге шаблона. Проверь логи: ' . $e->getMessage();
}
?>

@ -115,9 +115,16 @@ if (function_exists('get_field')) {
$context['q_5'] = get_field('q_5', 383); $context['q_5'] = get_field('q_5', 383);
// //
$array_food = array();
$context['food_list'] = get_field('featured_food'); foreach (get_field('featured_food') as $item) {
$context['treats_list'] = get_field('featured_treats'); $array_food[] = Timber::get_post($item['product']);
}
$array_treats = array();
foreach (get_field('featured_treats') as $item) {
$array_treats[] = Timber::get_post($item['product']);
}
$context['food_list'] = $array_food;
$context['treats_list'] = $array_treats;
} }
try { try {

@ -174,6 +174,46 @@ function get_collection_siblings($term) {
add_filter( 'woocommerce_price_trim_zeros', '__return_true' ); add_filter( 'woocommerce_price_trim_zeros', '__return_true' );
// Функция для округления цен с учетом налога
function round_price_with_tax($price) {
return round($price);
}
// Функция для получения цены товара с учетом налога и округления
function get_product_price_with_tax($product) {
if (!$product) return 0;
$price = $product->get_price();
$tax_rate = 0;
// Получаем ставку налога для товара
$tax_rates = WC_Tax::get_rates($product->get_tax_class());
if (!empty($tax_rates)) {
$tax_rate = array_values($tax_rates)[0]['rate'] ?? 0;
}
// Вычисляем цену с налогом
$price_with_tax = $price * (1 + $tax_rate / 100);
return round_price_with_tax($price_with_tax);
}
// Функция для получения общей суммы корзины с учетом налога и округления
function get_cart_total_with_tax() {
if (!WC()->cart) return 0;
$total = WC()->cart->get_total('edit');
return round_price_with_tax($total);
}
// Функция для получения стоимости доставки с учетом налога и округления
function get_shipping_total_with_tax() {
if (!WC()->cart) return 0;
$shipping_total = WC()->cart->get_shipping_total();
return round_price_with_tax($shipping_total);
}
// Добавление поля для выбора рекомендуемых товаров // Добавление поля для выбора рекомендуемых товаров
function register_recommended_products_acf_field() { function register_recommended_products_acf_field() {

@ -1,8 +1,6 @@
{% for post in posts %} {% for post in posts %}
{% set class = post.getTasteClass %} {% include 'woocommerce/product-card.twig' with {item : post, addClass: 'product-archive-card'} %}
{% set section = class ~ ' product-archive-card' %}
{% include 'shop/product-card.twig' with {_product : fn('wc_get_product', post.id), section: section} %}
{% endfor %} {% endfor %}

@ -22,7 +22,7 @@
<div class="block_title">{{text}}</div> <div class="block_title">{{text}}</div>
</div> </div>
<h2 class="section_title2" id="about">{{ adv_title }}</h2> <h2 class="section_title2" id="about">{{ adv_title }}</h2>
<p class="description">Due to the unique structure of the entoprotein, it is unlikely to cause allergies. Additionally, since animals have not encountered this type of protein during evolution, it does not trigger allergic reactions in pets.</p> <p class="description">{{adv_text}}</p>
<div class="advantage_row"> <div class="advantage_row">
{% for item in adv %} {% for item in adv %}
<div class="advantage_item"> <div class="advantage_item">

@ -20,7 +20,6 @@
{% include '_pages/new-front-page/main-cosmopetx.twig' %} {% include '_pages/new-front-page/main-cosmopetx.twig' %}
{% include '_pages/new-front-page/main-gallery.twig' %} {% include '_pages/new-front-page/main-gallery.twig' %}
<a href="/o-kompanii/" class="btn-rocket"> <a href="/o-kompanii/" class="btn-rocket">
<span class="btn-rocket__img"></span> <span class="btn-rocket__img"></span>
<span class="btn-rocket__link"> <span class="btn-rocket__link">

@ -2,8 +2,8 @@
<div class="new-container"> <div class="new-container">
<h2 class="main-food_title">сухой гипоаллергенный корм</h2> <h2 class="main-food_title">сухой гипоаллергенный корм</h2>
<div class="main-food_wrapper"> <div class="main-food_wrapper">
{% include 'shop/products-section_block.twig' with {product_list: food_list, section: 'food'} %} {% include 'blocks/modules/shop/products-section.twig' with {product_list: food_list, section: 'food'} %}
{% include 'shop/reviews-section_block.twig' with { section: 'food', rev_list: reviews_food_query } only %} {% include 'blocks/modules/shop/reviews-section.twig' with { section: 'food', rev_list: reviews_food_query } only %}
</div> </div>
</div> </div>
</div> </div>

@ -13,8 +13,8 @@
<path d="M285.428 26.1179L285.37 26.0584C284.322 22.9684 282.721 20.6807 280.654 19.3139C278.588 17.9472 275.881 17.2341 272.591 17.2341C269.302 17.2341 266.595 17.6204 264.82 18.4226C263.044 19.2248 261.589 21.1263 260.57 24.1866C260.046 25.6722 259.696 27.5737 259.405 29.8615H258.357L259.988 18.1552H250.818V51.7292H259.988V38.5373C259.988 36.0712 260.337 33.9617 261.006 32.179C261.676 30.3963 262.753 29.0296 264.15 28.0788C265.547 27.1578 267.294 26.6527 269.36 26.6527C272.679 26.6527 274.949 27.5737 276.259 29.4455C277.511 31.3174 278.18 34.3777 278.18 38.567V51.7589H287V38.567C287 33.3972 286.476 29.2673 285.399 26.1179H285.428Z" fill="white" /> <path d="M285.428 26.1179L285.37 26.0584C284.322 22.9684 282.721 20.6807 280.654 19.3139C278.588 17.9472 275.881 17.2341 272.591 17.2341C269.302 17.2341 266.595 17.6204 264.82 18.4226C263.044 19.2248 261.589 21.1263 260.57 24.1866C260.046 25.6722 259.696 27.5737 259.405 29.8615H258.357L259.988 18.1552H250.818V51.7292H259.988V38.5373C259.988 36.0712 260.337 33.9617 261.006 32.179C261.676 30.3963 262.753 29.0296 264.15 28.0788C265.547 27.1578 267.294 26.6527 269.36 26.6527C272.679 26.6527 274.949 27.5737 276.259 29.4455C277.511 31.3174 278.18 34.3777 278.18 38.567V51.7589H287V38.567C287 33.3972 286.476 29.2673 285.399 26.1179H285.428Z" fill="white" />
</svg></h2> </svg></h2>
<div class="main-food_wrapper"> <div class="main-food_wrapper">
{% include 'shop/products-section_block.twig' with {product_list: treats_list, section: 'treats'} %} {% include 'blocks/modules/shop/products-section.twig' with {product_list: treats_list} %}
{% include 'shop/reviews-section_block.twig' with { section: 'treats', rev_list: reviews_treats_query } only %} {% include 'blocks/modules/shop/reviews-section.twig' with { section: 'treats', rev_list: reviews_treats_query } only %}
</div> </div>
</div> </div>
</div> </div>

@ -25,11 +25,8 @@
{% for item in desc %} {% for item in desc %}
<p class="steps_desc{% if item.small_text %}--min{% endif %}">{{ item.text }}</p> <p class="steps_desc{% if item.small_text %}--min{% endif %}">{{ item.text }}</p>
{% endfor %} {% endfor %}
{% if site_region == 'ru' %}
<p class="steps_desc">COSMOPET PRODUCTION IS BASED ON A UNIQUE TECHNOLOGICAL PROCESS WHICH HAS NO ANALOGUES IN THE WORLD.</p>
{% endif %}
</div> </div>
<div class="steps_title">{{ function('pll_e', 'PRODUCTION STAGES') }}</div> <div class="steps_title">{{ function('pll_e', 'ЭТАПЫ ПРОИЗВОДСТВА') }}</div>
<div class="production_steps_row"> <div class="production_steps_row">
{% if steps_1[0] is defined %} {% if steps_1[0] is defined %}
@ -181,7 +178,7 @@
<section class="feed_production"> <section class="feed_production">
<div class="container"> <div class="container">
<div class="section_title">{{ function('pll_e', 'Stages of feed production') }}</div> <div class="section_title">{{ function('pll_e', 'Этапы производства корма') }}</div>
<div class="feed_steps__row"> <div class="feed_steps__row">
{% for item in steps_2 %} {% for item in steps_2 %}

@ -0,0 +1,86 @@
{% set bodyClass = 'bg-white' %}
{% set mainClass = 'wrapper' %}
{% extends 'layout.twig' %}
{% block content %}
<div class="breadcrumbs">
<a href="/" class="breadcrumbs__item">
{{ function('pll_e', 'Главная') }}
</a>
<a href="/shop" class="breadcrumbs__item">
{{ function('pll_e', 'Продукция') }}
</a>
{% if category %}
<a href="{{ category_link }}" class="breadcrumbs__item">
{{ category_title }}
</a>
{% endif %}
</div>
<div class="product">
<div class="product__header">
<h1 class="product__title">
{% if category %}
{{ category.name }}
{% else %}
{{ function('pll_e', 'Продукция') }}
{% endif %}
</h1>
<button class="button button--gradient button--high button--icon button--filter">
{{ function('pll_e', 'Фильтры') }}
</button>
</div>
{% if active_filters|length > 0 %}
<div class="active-filters">
{% if active_filters is not empty %}
<div class="active-filters">
{% for filter in active_filters %}
<span class="active-filter-tag" data-filter-id="{{ filter.id }}" data-filter-slug="{{ filter.slug }}" data-filter-taxonomy="{{ filter.taxonomy }}">
{{ filter.name }} ×
</span>
{% endfor %}
</div>
{% endif %}
<button class="active-filters__clear button button--white">
{% if current_lang == 'ru' %}{{ function('pll_e', 'Очистить все') }}{% elseif current_lang == 'en' %}{{ function('pll_e', 'Clear all') }}{% endif %}
</button>
</div>
{% endif %}
<div class="product__main">
{% if posts|length > 0 %}
{% for post in posts %}
{% set class = post.getTasteClass %}
{% set section = class ~ ' product-archive-card' %}
<!-- TO_DO (избавиться от wc_get_product) -->
{% include 'shop/product-card.twig' with {_product : fn('wc_get_product', post.id), section: section} %}
{% endfor %}
{% else %}
<div class="not-found">
<img src="{{ fn('get_template_directory_uri') }}/static/img/sv.svg" alt="">
<div class="not-found-title">{{ fn('pll_e', 'coming soon') }}</div>
<div class="not-found-text">{{ fn('pll_e', 'This item is not on our website yet, but it will be here very soon') }}</div>
</div>
{% endif %}
</div>
<div class="product__footer product__footer--error">
{% if posts_per_page < count %}
<button class="button button--white" id="load-more-products" data-category_id="{{ category_id }}" data-category_type="{{ category_type }}">
{{ function('pll_e', 'Загрузить еще') }}
</button>
{% endif %}
</div>
</div>
{% endblock %}

@ -1,6 +1,6 @@
<div class="main-food_products"> <div class="main-food_products">
{% for product in product_list %} {% for product in product_list %}
{% include 'shop/product-card.twig' with {_product : fn('wc_get_product', product.product)} %} {% include 'woocommerce/product-card.twig' with {item : product, addClass: ''} %}
{% endfor %} {% endfor %}
{% if section == 'food' %} {% if section == 'food' %}
<a href="/shop/" class="main-about_banner-btn"><span class="main-about_banner-btn-text">Вся продукция</span><span class="main-about_banner-btn-arrow"></span></a> <a href="/shop/" class="main-about_banner-btn"><span class="main-about_banner-btn-text">Вся продукция</span><span class="main-about_banner-btn-arrow"></span></a>

@ -1,84 +0,0 @@
{# TO_DO:
1) в контроллер вынести получение всех переменных, а не тут выхывать функции fn()
2) переименовать в файл /shop/product-card.twig
3) _product, wc_product, s_product -- не понятно почему множество переменных с одинаковым смыслом =>
надо сделать единый контенкст для всех контроллеров и там создать все нужные переменные
#}
{% set thumbnail = _product.get_image_id() ? function('wp_get_attachment_image_url', _product.get_image_id(), 'medium') : function('wc_placeholder_img_src') %}
{% set images = _product.get_gallery_image_ids() %}
{% set compound = fn('wc_get_product_terms', _product.get_id(), 'pa_compound') %}
<div class="main-food_products-card {{section}} {% for item in compound %}{% set term = get_term(item) %}{{ fn('map_attr_slugs_to_class', term.slug) }} {% endfor %}">
<a href="{{_product.get_permalink()}}" class="main-food_products-card-slider">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="main-food_products-card-img">
<img src="{{ thumbnail }}" alt="{{_product.get_name()}}">
</div>
</div>
{% if images %}
{% for image in images %}
<div class="swiper-slide">
<div class="main-food_products-card-img">
<img src="{{ function('wp_get_attachment_image_url', image, 'medium') }}" alt="{{ _product.get_title() }}">
</div>
</div>
{% endfor %}
{% endif %}
<div class="swiper-dots"></div>
</div>
</a>
<div class="">
{% set collection = fn('wc_get_product_terms', _product.id, 'pa_collection') %}
{% set cur_weight = function('get_product_info', _product.id, 'weight') %}
<a href="{{_product.get_permalink()}}" class="main-food_products-card-title">
{{_product.get_name()}}
</a>
{% if collection %}
<div class="main-food_products-card__weight">
{% for option in collection %}
{% set term = get_term(option) %}
{% set siblings = function('get_collection_siblings' , term.id) %}
{% for sibling in siblings %}
{% set weight = function('get_product_info', sibling.ID, 'weight') %}
{% set s_product = TimberPost(sibling.ID) %}
{% set wc_product = fn('wc_get_product', sibling.ID) %}
{% set s_in_stock = s_product.meta('_stock_status') == 'instock' %}
{% set s_thumbnail = wc_product.get_image_id() ? function('wp_get_attachment_image_url', wc_product.get_image_id(), 'medium') : function('wc_placeholder_img_src') %}
{% set s_images = wc_product.get_gallery_image_ids() %}
{% set s_title = wc_product.get_title() %}
{% set all_images = [s_thumbnail]|merge(s_images|map(image => function('wp_get_attachment_image_url', image, 'medium'))) %}
{% if s_in_stock %}
{% set class = '' %}
{% if weight == cur_weight %}
{% set class = 'active' %}
{% endif %}
{% if weight %}
<button class="main-food_products-card__weight-item {{ class }}" data-image-set='{{ all_images|json_encode() }}' data-product_id="{{sibling.ID}}" data-product_price="{{ function('get_product_info', sibling.ID, 'price') }} {{ fn('get_woocommerce_currency_symbol') }}" data-title="{{s_title}}">
{{ weight }}
</button>
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</div>{% endif %}
<div class="main-food_products-card-bottom">
<div class="main-food_products-card-bottom-price">{{ _product.get_price() }} {{ fn('get_woocommerce_currency_symbol') }}</div>
<a href="{{ _product.add_to_cart_url }}" class="main-food_products-cardbottom-btn ajax_add_to_cart add_to_cart_button" data-product_id="{{ _product.id }}"
data-product_sku="{{ _product.sku|e('html_attr') }}">{{ fn('pll_e', 'В корзину') }}</a>
</div>
</div>
</div>

@ -26,8 +26,10 @@
{% if not chosen_shipping_methods[0] is defined %} {% if not chosen_shipping_methods[0] is defined %}
<td class="order-your-calculation__description">{{ fn('pll_e', 'Введите адрес доставки') }}</td> <td class="order-your-calculation__description">{{ fn('pll_e', 'Введите адрес доставки') }}</td>
{% else %} {% else %}
<td class="order-your-calculation__value order-your-calculation__value--price">{{ fn('WC').cart.get_shipping_total() }} ₽</td> <td class="order-your-calculation__value order-your-calculation__value--price">{{ (fn('WC').cart.get_shipping_total() + fn('WC').cart.get_shipping_tax())|round }} ₽</td>
{% endif %} {% endif %}
</tr> </tr>
{% for fee in fn('WC').cart.get_fees() %} {% for fee in fn('WC').cart.get_fees() %}

@ -0,0 +1,321 @@
{% set bodyClass = 'bg-white' %}
{% set mainClass = '' %}
{% extends 'layout.twig' %}
{% block content %}
<div class="product-single">
<div class="wrapper">
<div class="breadcrumbs">
<a href="{{ fn('home_url') }}" class="breadcrumbs__item">
{{ fn('pll_e', 'Главная') }}
</a>
{% set product_categories = post.get_terms('product_cat') %}
{% if product_categories %}
{% set category = product_categories[0] %}
<a href="{{ category.link }}" class="breadcrumbs__item">
{{ category.name }}
</a>
{% endif %}
<a href="{{post.link}}" class="breadcrumbs__item">
{{post.title}}
</a>
</div>
<div class="product_main {{ post.getTasteClass() }}">
<div class="product-info">
<h1 class="product-title --pc">
{{post.title}}
</h1>
<div class="product-contains">
<h2 class="product-block-title">{{ fn('pll_e', 'СОСТАВ') }}</h2>
<div class="product-contains-text">{{ post.getComposition }}</div>
</div>
<div class="product-values">
<h2 class="product-values-title">{{ fn('pll_e', 'ПИЩЕВАЯ ЦЕННОСТЬ') }}</h2>
<div class="product-values-list">
{% set nutritional_value = post.nutritional_value %}
{% if nutritional_value.protein %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Сырой белок') }}</div>
<div class="product-values-item-val">{{nutritional_value.protein}}</div>
</div>
{% endif %}
{% if nutritional_value.fat %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Сырой жир') }}</div>
<div class="product-values-item-val">{{nutritional_value.fat}}</div>
</div>
{% endif %}
{% if nutritional_value.fiber %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Сырая клетчатка') }}</div>
<div class="product-values-item-val">{{nutritional_value.fiber}}</div>
</div>
{% endif %}
{% if nutritional_value.ash %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Сырая зола') }}</div>
<div class="product-values-item-val">{{nutritional_value.ash}}</div>
</div>
{% endif %}
{% if nutritional_value.wat %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Влажность') }}</div>
<div class="product-values-item-val">{{nutritional_value.wat}}</div>
</div>
{% endif %}
{% if nutritional_value.calcium %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Кальций') }}</div>
<div class="product-values-item-val">{{nutritional_value.calcium}}</div>
</div>
{% endif %}
{% if nutritional_value.phosphorus %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Фосфор') }}</div>
<div class="product-values-item-val">{{nutritional_value.phosphorus}}</div>
</div>
{% endif %}
{% if nutritional_value.omega_6 %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Омега 6') }}</div>
<div class="product-values-item-val">{{nutritional_value.omega_6}}</div>
</div>
{% endif %}
{% if nutritional_value.omega_3 %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Омега 3') }}</div>
<div class="product-values-item-val">{{nutritional_value.omega_3}}</div>
</div>
{% endif %}
</div>
{% set vitamins = post.vitamins %}
{% if vitamins %}
<div class="product-vitamins">
<div class="product-vitamins-title">
{{ fn('pll_e', 'Витамины на кг') }}
</div>
<div class="product-vitamins-list">
{% if vitamins.vitamin_a_me %}
<div class="product-vitamins-item">A, ME — {{vitamins.vitamin_a_me}}</div>
{% endif %}
{% if vitamins.vitamin_d3_me %}
<div class="product-vitamins-item">D3, ME — {{vitamins.vitamin_d3_me}}</div>
{% endif %}
{% if vitamins.vitamin_e %}
<div class="product-vitamins-item">E — {{vitamins.vitamin_e}}</div>
{% endif %}
{% if vitamins.tiamin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Тиамин') }} — {{vitamins.tiamin}}</div>
{% endif %}
{% if vitamins.riboflavin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Рибофлавин') }} — {{vitamins.riboflavin}}</div>
{% endif %}
{% if vitamins.pantothenic_acid %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Пантотеновая кислота') }} — {{vitamins.pantothenic_acid}}</div>
{% endif %}
{% if vitamins.niaczin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Ниацин') }} — {{vitamins.niaczin}}</div>
{% endif %}
{% if vitamins.piridoksin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Пиридоксин') }} — {{vitamins.piridoksin}}</div>
{% endif %}
{% if vitamins.folic_acid %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Фолиевая кислота') }} — {{vitamins.folic_acid}}</div>
{% endif %}
{% if vitamins.vitamin_b12 %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Витамин B12') }} — {{vitamins.vitamin_b12}}</div>
{% endif %}
{% if vitamins.holin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Холин') }} — {{vitamins.holin}}</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
</div>
<div class="product-show">
<div class="product-gallery">
<div class="swiper product-gallery__mainSlider">
<div class="swiper-wrapper">
{% set image_list = post.getImageGallery('full') %}
{% for image in image_list %}
<div class="swiper-slide">
<img src="{{ image.url }}" alt="{{image.alt}}">
</div>
{% endfor %}
</div>
</div>
<div thumbsSlider="" class="swiper product-gallery__thumbsSlider">
<div class="swiper-wrapper">
{% set image_list = post.getImageGallery('medium') %}
{% for image in image_list %}
<div class="swiper-slide">
<img src="{{ image.url }}" alt="{{image.alt}}">
</div>
{% endfor %}
</div>
<div class="product-gallery-arrows">
<button class="product-gallery-arrow product-gallery-prev"></button>
<button class="product-gallery-arrow product-gallery-next"></button>
</div>
</div>
<div class="product-gallery-bullets"></div>
</div>
<h1 class="product-title --m">
{{post.title}}
</h1>
</div>
<div class="product-constructor">
{% set constructor = post.getProductConstructor %}
{% for taxonomy, attribute_data in constructor %}
<div class="product-constructor__block">
<div class="product-constructor__block-title">{{attribute_data.label}}</div>
<div class="product-constructor__block-list">
{% for option_id, option in attribute_data.options %}
{% set first_product = option.products[0] %}
<a href="{{first_product.link}}" class="product-constructor__block-item{% if attribute_data.current_value == option.term_id %} active{% endif %}">
{% if taxonomy == 'pa_compound' %}
{% set icon_map = {
'govyadina': 'beef',
'indejka': 'turkey',
'krolik': 'rabbit',
'losos': 'salmon',
'ryba': 'fish',
'utka': 'duck',
'yagnenok': 'lamb'
} %}
{% set icon_class = icon_map[option.slug] ?? 'default' %}
<img src="/wp-content/themes/cosmopet/modules/shop/components/single-product_new/assets/img/{{icon_class}}.svg" alt="" class="product-constructor__block-item-icon{% if attribute_data.current_value == option.term_id %} active{% endif %} svg">
{% elseif taxonomy == 'pa_age-of-the-dog' %}
<img src="/wp-content/themes/cosmopet/modules/shop/components/single-product_new/assets/img/dog-face.svg" alt="" class="product-constructor__block-item-icon{% if attribute_data.current_value == option.term_id %} active{% endif %} svg">
{% elseif taxonomy == 'pa_age-of-the-cat' %}
<img src="/wp-content/themes/cosmopet/modules/shop/components/single-product_new/assets/img/cat-face.svg" alt="" class="product-constructor__block-item-icon{% if attribute_data.current_value == option.term_id %} active{% endif %} svg">
{% elseif taxonomy == 'pa_reproductive-status' %}
<img src="/wp-content/themes/cosmopet/modules/shop/components/single-product_new/assets/img/heart.svg" alt="" class="product-constructor__block-item-icon{% if attribute_data.current_value == option.term_id %} active{% endif %} svg">
{% elseif taxonomy == 'pa_series' %}
<img src="/wp-content/themes/cosmopet/modules/shop/components/single-product_new/assets/img/star.svg" alt="" class="product-constructor__block-item-icon{% if attribute_data.current_value == option.term_id %} active{% endif %} svg">
{% endif %}
<div class="product-constructor__block-item-name">{{option.name}}</div>
</a>
{% endfor %}
</div>
</div>
{% endfor %}
{% set size_siblings = post.getSizeSiblings %}
{% if size_siblings %}
<div class="product-constructor__block">
<div class="product-constructor__block-title">{{fn('pll_e', 'ВЕС УПАКОВКИ')}}</div>
<div class="product-constructor__block-list">
{% for sibling in size_siblings %}
<a href="{{sibling.link}}" class="product-constructor__block-item{% if post.get_weight == sibling.get_weight %} active{% endif %}">
<div class="product-constructor__block-item-name">{{sibling.get_weight}}</div>
</a>
{% endfor %}
</div>
</div>
{% endif %}
<div class="product-price">
<div class="product-price-main">
{{post.getPrice}}
</div>
{% if post.getRegularPrice %}
<div class="product-price-disc">
<div class="product-price-old">{{post.getRegularPrice}}</div>
<div class="product-price-percent">
{{ post.getPriceDifferenceInPercent }}
</div>
</div>
{% endif %}
</div>
{% set in_stock = post.meta('_stock_status') == 'instock' %}
{% if in_stock %}
{{ function('do_action', 'woocommerce_' ~ product.get_type() ~ '_add_to_cart') }}
{% else %}
<div class="detail-block-form__item detail-block-form__item--tn">
<button type="button" data-pname="{{ product.title }}" class="to-know open-to-know" >
<p>{{ function('pll_e', 'Узнать о поступлении') }}</p>
</button>
</div>
{% endif %}
</div>
</div>
<div class="product-desc">
<div class="product-block-title">
{{ fn('pll_e', 'ОПИСАНИЕ') }}
</div>
<div class="product-desc-text">
{{post.content}}
</div>
</div>
</div>
<div class="product-reviews">
<div class="product-reviews__head wrapper">
<div class="product-block-title">
{{ fn('pll_e', 'Отзывы Специалистов') }}
</div>
<div class="product-block-arrows">
<button class="slider-button-prev slider-button product-reviews-prev"></button>
<button class="slider-button-next slider-button product-reviews-next"></button>
</div>
</div>
<div class="product-reviews-slider swiper">
<div class="swiper-wrapper">
{% for slide in post.getReviews %}
{% include "shop/reviews-slide_element.twig" with {slide: slide} %}
{% endfor %}
</div>
</div>
<div class="product-block-arrows--m">
<button class="slider-button-prev slider-button product-reviews-prev"></button>
<button class="slider-button-next slider-button product-reviews-next"></button>
</div>
</div>
{% if post.getRelatedProducts %}
<div class="product-similar ">
<div class="product-similar__head wrapper">
<div class="product-block-title">
{{ fn('pll_e', 'вашему питомцу может понравиться') }}
</div>
<div class="product-block-arrows">
<button class="slider-button-prev slider-button product-similar-prev"></button>
<button class="slider-button-next slider-button product-similar-next"></button>
</div>
</div>
<div class="product-similar-slider wrapper">
<div class="swiper-wrapper">
{% for related_product in post.getRelatedProducts %}
{% set class = related_product.getTasteClass %}
{% set section = class ~ ' swiper-slide' %}
<!-- TO_DO (избавиться от wc_get_product) -->
{% include 'shop/product-card.twig' with {_product : fn('wc_get_product', related_product.id), section: section} %}
{% endfor %}
</div>
</div>
<div class="product-block-arrows--m">
<button class="slider-button-prev slider-button product-similar-prev"></button>
<button class="slider-button-next slider-button product-similar-next"></button>
</div>
</div>
{% endif %}
</div>
{% for slide in reviews %}
{% include 'modal/rewiew_modal.twig' with {slide : slide} %}
{% endfor %}
{% endblock %}

@ -55,15 +55,8 @@
{% if posts|length > 0 %} {% if posts|length > 0 %}
{% for post in posts %} {% for post in posts %}
{% include 'woocommerce/product-card.twig' with {item : post, addClass: 'product-archive-card'} %}
{% set class = post.getTasteClass %}
{% set section = class ~ ' product-archive-card' %}
<!-- TO_DO (избавиться от wc_get_product) -->
{% include 'shop/product-card.twig' with {_product : fn('wc_get_product', post.id), section: section} %}
{% endfor %} {% endfor %}
{% else %} {% else %}
<div class="not-found"> <div class="not-found">

@ -0,0 +1,52 @@
<div class="main-food_products-card {{addClass}} {{ item.getTasteClass() }}">
<a href="{{item.link}}" class="main-food_products-card-slider">
<div class="swiper-wrapper">
{% set image_list = item.getImageGallery('medium') %}
{% if image_list %}
{% for image in image_list %}
<div class="swiper-slide">
<div class="main-food_products-card-img">
<img src="{{ image.url }}" alt="{{ image.alt }}">
</div>
</div>
{% endfor %}
{% endif %}
<div class="swiper-dots"></div>
</div>
</a>
<div class="">
<a href="{{item.link}}" class="main-food_products-card-title">
{{item.title}}
</a>
{% set size_siblings = post.getSizeSiblings %}
{% if size_siblings %}
<div class="main-food_products-card__weight">
{% for sibling in size_siblings %}
{% set class = '' %}
{% if sibling.get_weight == item.get_weight %}
{% set class = 'active' %}
{% endif %}
{% if sibling.get_weight %}
<button class="main-food_products-card__weight-item {{ class }}" data-image-set='{{ sibling.getImageGallery('medium')|json_encode() }}' data-product_id="{{sibling.id}}" data-product_price="{{sibling.getPriceWithCurrency}}" data-title="{{sibling.title}}">
{{ sibling.get_weight }}
</button>
{% endif %}
{% endfor %}
</div>{% endif %}
<div class="main-food_products-card-bottom">
<div class="main-food_products-card-bottom-price">{{item.getPriceWithCurrency}}</div>
{% if item.meta('_stock_status') == 'instock' %}
<a href="{{ item.product.add_to_cart_url }}" class="main-food_products-cardbottom-btn ajax_add_to_cart add_to_cart_button" data-product_id="{{ item.id }}"
data-product_sku="{{ item.sku|e('html_attr') }}">{{ fn('pll_e', 'В корзину') }}</a>
{% else %}
<p class="main-food_products-card-bottom-nv">Нет в наличии</p>
{% endif %}
</div>
</div>
</div>

@ -61,43 +61,14 @@
<div class="product-values-item-val">{{nutritional_value.ash}}</div> <div class="product-values-item-val">{{nutritional_value.ash}}</div>
</div> </div>
{% endif %} {% endif %}
{% if nutritional_value.wat %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Влажность') }}</div>
<div class="product-values-item-val">{{nutritional_value.wat}}</div>
</div>
{% endif %}
{% if nutritional_value.calcium %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Кальций') }}</div>
<div class="product-values-item-val">{{nutritional_value.calcium}}</div>
</div>
{% endif %}
{% if nutritional_value.phosphorus %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Фосфор') }}</div>
<div class="product-values-item-val">{{nutritional_value.phosphorus}}</div>
</div>
{% endif %}
{% if nutritional_value.omega_6 %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Омега 6') }}</div>
<div class="product-values-item-val">{{nutritional_value.omega_6}}</div>
</div>
{% endif %}
{% if nutritional_value.omega_3 %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Омега 3') }}</div>
<div class="product-values-item-val">{{nutritional_value.omega_3}}</div>
</div>
{% endif %}
</div> </div>
{% endif %} {% endif %}
{% set vitamins = post.vitamins %} {% set vitamins = post.vitamins %}
{% if vitamins %} {% if vitamins %}
<div class="product-vitamins"> <div class="product-vitamins">
<div class="product-vitamins-title"> <div class="product-vitamins-title">
{{ fn('pll_e', 'Витамины на кг') }} {{ fn('pll_e', 'Витамины и питательные вещества на кг') }}
</div> </div>
<div class="product-vitamins-list"> <div class="product-vitamins-list">
@ -107,7 +78,7 @@
{% if vitamins.vitamin_d3_me %} {% if vitamins.vitamin_d3_me %}
<div class="product-vitamins-item">D3, ME — {{vitamins.vitamin_d3_me}}</div> <div class="product-vitamins-item">D3, ME — {{vitamins.vitamin_d3_me}}</div>
{% endif %} {% endif %}
{% if vitamins.vitamin_e %} {# {% if vitamins.vitamin_e %}
<div class="product-vitamins-item">E — {{vitamins.vitamin_e}}</div> <div class="product-vitamins-item">E — {{vitamins.vitamin_e}}</div>
{% endif %} {% endif %}
{% if vitamins.tiamin %} {% if vitamins.tiamin %}
@ -134,9 +105,40 @@
{% if vitamins.holin %} {% if vitamins.holin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Холин') }} — {{vitamins.holin}}</div> <div class="product-vitamins-item">{{ fn('pll_e', 'Холин') }} — {{vitamins.holin}}</div>
{% endif %} {% endif %}
{% if vitamins.biotin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Биотин') }} — {{vitamins.biotin}}</div>
{% endif %}
{% if vitamins.fe %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Железо') }} — {{vitamins.fe}}</div>
{% endif %}
{% if vitamins.med %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Медь') }} — {{vitamins.med}}</div>
{% endif %}
{% if vitamins.zink %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Цинк') }} — {{vitamins.zink}}</div>
{% endif %}
{% if vitamins.mg %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Марганец') }} — {{vitamins.mg}}</div>
{% endif %}
{% if vitamins.iod %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Йод') }} — {{vitamins.iod}}</div>
{% endif %}
{% if vitamins.selen %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Селен') }} — {{vitamins.selen}}</div>
{% endif %} #}
</div> </div>
</div> </div>
{% endif %} {% endif %}
<button class="product-pp-btn" onclick="showModal('mfrom_inf')">
<span>
Смотреть все
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 11L11 1M11 1V11M11 1H1" stroke="#48C1ED" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</span>
</button>
</div> </div>
{% endif %} {% endif %}
</div> </div>
@ -229,11 +231,11 @@
<div class="product-price"> <div class="product-price">
<div class="product-price-main"> <div class="product-price-main">
{{post.getPrice}} {{post.getPriceWithCurrency}}
</div> </div>
{% if post.getRegularPrice %} {% if post.getRegularPriceWithCurrency %}
<div class="product-price-disc"> <div class="product-price-disc">
<div class="product-price-old">{{post.getRegularPrice}}</div> <div class="product-price-old">{{post.getRegularPriceWithCurrency}}</div>
<div class="product-price-percent"> <div class="product-price-percent">
{{ post.getPriceDifferenceInPercent }} {{ post.getPriceDifferenceInPercent }}
</div> </div>
@ -299,15 +301,8 @@
<div class="product-similar-slider wrapper"> <div class="product-similar-slider wrapper">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
{% for related_product in post.getRelatedProducts %} {% for related_product in post.getRelatedProducts %}
{% include 'woocommerce/product-card.twig' with {item : related_product, addClass: 'swiper-slide'} %}
{% set class = related_product.getTasteClass %} {% endfor %}
{% set section = class ~ ' swiper-slide' %}
<!-- TO_DO (избавиться от wc_get_product) -->
{% include 'shop/product-card.twig' with {_product : fn('wc_get_product', related_product.id), section: section} %}
{% endfor %}
</div> </div>
</div> </div>
<div class="product-block-arrows--m"> <div class="product-block-arrows--m">
@ -323,4 +318,176 @@
{% include 'modal/rewiew_modal.twig' with {slide : slide} %} {% include 'modal/rewiew_modal.twig' with {slide : slide} %}
{% endfor %} {% endfor %}
{% endblock %}
<div class="mform mform_rev mfrom_inf" style="display: none;">
<div class="mform__review-wrap">
<div class="mform__info">
<div class="close-button">×</div>
<h2 class="product-values-title">{{ fn('pll_e', 'ПИЩЕВАЯ ЦЕННОСТЬ') }}</h2>
<div class="mform__info__c">
{% if nutritional_value or vitamins %}
<div class="mform__info__col">
<div class="product-values">
{% if nutritional_value %}
<div class="product-values-list">
{% if nutritional_value.protein %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Сырой белок') }}</div>
<div class="product-values-item-val">{{nutritional_value.protein}}</div>
</div>
{% endif %}
{% if nutritional_value.fat %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Сырой жир') }}</div>
<div class="product-values-item-val">{{nutritional_value.fat}}</div>
</div>
{% endif %}
{% if nutritional_value.fiber %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Сырая клетчатка') }}</div>
<div class="product-values-item-val">{{nutritional_value.fiber}}</div>
</div>
{% endif %}
{% if nutritional_value.ash %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Сырая зола') }}</div>
<div class="product-values-item-val">{{nutritional_value.ash}}</div>
</div>
{% endif %}
{% if nutritional_value.wat %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Влажность') }}</div>
<div class="product-values-item-val">{{nutritional_value.wat}}</div>
</div>
{% endif %}
{% if nutritional_value.calcium %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Кальций') }}</div>
<div class="product-values-item-val">{{nutritional_value.calcium}}</div>
</div>
{% endif %}
{% if nutritional_value.phosphorus %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Фосфор') }}</div>
<div class="product-values-item-val">{{nutritional_value.phosphorus}}</div>
</div>
{% endif %}
{% if nutritional_value.omega_6 %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Омега 6') }}</div>
<div class="product-values-item-val">{{nutritional_value.omega_6}}</div>
</div>
{% endif %}
{% if nutritional_value.omega_3 %}
<div class="product-values-item">
<div class="product-values-item__name">{{ fn('pll_e', 'Омега 3') }}</div>
<div class="product-values-item-val">{{nutritional_value.omega_3}}</div>
</div>
{% endif %}
</div>
{% endif %}
{% set additions = post.additions %}
{% if additions %}
<div class="product-vitamins">
<div class="product-vitamins-title">
{{ fn('pll_e', 'Дополнительные питательные добавки') }}
</div>
<div class="product-vitamins-list">
{% for item in additions %}
<div class="product-vitamins-item">{{item.name}} — {{item.val}}</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if post.kkal %}
<div class="product-vitamins">
<div class="product-values-title">
{{ fn('pll_e', 'Энергетическая ценность') }}
</div>
<div class="product-vitamins-title">
{{ post.kkal }}
</div>
</div>
{% endif %}
</div>
</div>
<div class="mform__info__col">
{% set vitamins = post.vitamins %}
{% if vitamins %}
<div class="product-vitamins">
<div class="product-vitamins-title">
{{ fn('pll_e', 'Витамины и питательные вещества на кг') }}
</div>
<div class="product-vitamins-list">
{% if vitamins.vitamin_a_me %}
<div class="product-vitamins-item">A, ME — {{vitamins.vitamin_a_me}}</div>
{% endif %}
{% if vitamins.vitamin_d3_me %}
<div class="product-vitamins-item">D3, ME — {{vitamins.vitamin_d3_me}}</div>
{% endif %}
{% if vitamins.vitamin_e %}
<div class="product-vitamins-item">E — {{vitamins.vitamin_e}}</div>
{% endif %}
{% if vitamins.tiamin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Тиамин') }} — {{vitamins.tiamin}}</div>
{% endif %}
{% if vitamins.riboflavin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Рибофлавин') }} — {{vitamins.riboflavin}}</div>
{% endif %}
{% if vitamins.pantothenic_acid %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Пантотеновая кислота') }} — {{vitamins.pantothenic_acid}}</div>
{% endif %}
{% if vitamins.niaczin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Ниацин') }} — {{vitamins.niaczin}}</div>
{% endif %}
{% if vitamins.piridoksin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Пиридоксин') }} — {{vitamins.piridoksin}}</div>
{% endif %}
{% if vitamins.folic_acid %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Фолиевая кислота') }} — {{vitamins.folic_acid}}</div>
{% endif %}
{% if vitamins.vitamin_b12 %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Витамин B12') }} — {{vitamins.vitamin_b12}}</div>
{% endif %}
{% if vitamins.holin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Холин') }} — {{vitamins.holin}}</div>
{% endif %}
{% if vitamins.biotin %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Биотин') }} — {{vitamins.biotin}}</div>
{% endif %}
{% if vitamins.fe %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Железо') }} — {{vitamins.fe}}</div>
{% endif %}
{% if vitamins.med %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Медь') }} — {{vitamins.med}}</div>
{% endif %}
{% if vitamins.zink %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Цинк') }} — {{vitamins.zink}}</div>
{% endif %}
{% if vitamins.mg %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Марганец') }} — {{vitamins.mg}}</div>
{% endif %}
{% if vitamins.iod %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Йод') }} — {{vitamins.iod}}</div>
{% endif %}
{% if vitamins.selen %}
<div class="product-vitamins-item">{{ fn('pll_e', 'Селен') }} — {{vitamins.selen}}</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}

@ -37,9 +37,9 @@ if (is_product()) {
} }
if ($use_new_template) { if ($use_new_template) {
include_component('shop', 'product-single--new'); include_component('shop', 'product-single--new'); // выводим новый шаблон с калькулятором для кормов и лакомств
} else { } else {
include_component('shop', 'product-single'); include_component('shop', 'product-single'); // выводим старый шаблон подробной версии товара для аксессуаров
} }
} elseif (is_shop()) { } elseif (is_shop()) {
include_component('shop', 'catalog'); include_component('shop', 'catalog');

@ -93,9 +93,13 @@ $calculator_text = '';
</div> </div>
<div class="modal-map-control-item__description"> <div class="modal-map-control-item__description">
<p class="modal-map-control-item__time"><?php echo $text_in_parentheses; ?></p> <p class="modal-map-control-item__time"><?php echo $text_in_parentheses; ?></p>
<p class="modal-map-control-item__price"> <?php <p class="modal-map-control-item__price">
echo $method->cost; <?php
?>₽</p> $tax_total = array_sum($method->get_taxes());
echo round($method->cost + $tax_total);
echo get_woocommerce_currency_symbol();
?>
</p>
</div> </div>
<?php do_action( 'woocommerce_after_shipping_rate', $method, $index ); ?> <?php do_action( 'woocommerce_after_shipping_rate', $method, $index ); ?>
</div> </div>

@ -64,7 +64,9 @@ defined( 'ABSPATH' ) || exit;
<?php <?php
else: else:
?> ?>
<td class="order-your-calculation__value order-your-calculation__value--price"><?php echo WC()->cart->get_shipping_total(); ?></td> <td class="order-your-calculation__value order-your-calculation__value--price"><?php echo WC()->cart->get_shipping_total() + WC()->cart->get_shipping_tax() ?> <?php echo get_woocommerce_currency_symbol(); ?></td>
<?php endif; ?> <?php endif; ?>
</tr> </tr>

Loading…
Cancel
Save