From b8246597d4062421dd7638cdd49e0d87ca2ed8a8 Mon Sep 17 00:00:00 2001 From: Jamil-Abdullayev Date: Thu, 5 Mar 2026 00:48:06 +0400 Subject: [PATCH] Initial commit: orgsteklo WordPress theme Custom WooCommerce theme for orgsteklo.ru including: - Product catalog with category/subcategory hierarchy - Custom checkout with delivery calculation - Price calculator - Admin settings panel - Search functionality - User account pages --- .gitignore | 21 + wp-content/themes/orgsteklo/404.php | 36 + .../themes/orgsteklo/assets/css/fancybox.css | 895 ++ .../themes/orgsteklo/assets/css/style.css | 8847 +++++++++++++++++ .../orgsteklo/assets/js/fancybox.min.js | 13 + wp-content/themes/orgsteklo/assets/js/main.js | 1691 ++++ .../orgsteklo/assets/js/price-calculator.js | 279 + .../themes/orgsteklo/blocks/block-consult.php | 53 + .../themes/orgsteklo/blocks/block-info.php | 41 + .../themes/orgsteklo/blocks/block-why.php | 33 + wp-content/themes/orgsteklo/footer.php | 156 + wp-content/themes/orgsteklo/functions.php | 2407 +++++ wp-content/themes/orgsteklo/header.php | 466 + .../orgsteklo/inc/price-calculator-admin.php | 669 ++ .../inc/price-calculator-functions.php | 1019 ++ wp-content/themes/orgsteklo/index.php | 19 + wp-content/themes/orgsteklo/style.css | 0 .../orgsteklo/templates/template-about.php | 232 + .../orgsteklo/templates/template-account.php | 8 + .../orgsteklo/templates/template-cart.php | 126 + .../orgsteklo/templates/template-checkout.php | 15 + .../orgsteklo/templates/template-contacts.php | 112 + .../orgsteklo/templates/template-delivery.php | 23 + .../orgsteklo/templates/template-docs.php | 121 + .../orgsteklo/templates/template-home.php | 248 + .../orgsteklo/templates/template-login.php | 57 + .../orgsteklo/templates/template-payment.php | 23 + .../templates/template-recovery-2.php | 27 + .../orgsteklo/templates/template-recovery.php | 38 + .../orgsteklo/templates/template-refund.php | 23 + .../template-registration-success.php | 25 + .../templates/template-registration.php | 133 + .../orgsteklo/woocommerce/archive-product.php | 97 + .../orgsteklo/woocommerce/auth/footer.php | 25 + .../woocommerce/auth/form-grant-access.php | 68 + .../orgsteklo/woocommerce/auth/form-login.php | 54 + .../orgsteklo/woocommerce/auth/header.php | 41 + .../woocommerce/block-notices/error.php | 51 + .../woocommerce/block-notices/notice.php | 37 + .../woocommerce/block-notices/success.php | 37 + .../woocommerce/brands/brand-description.php | 35 + .../brands/shortcodes/brands-a-z.php | 63 + .../brands/shortcodes/single-brand.php | 38 + .../brands/taxonomy-product_brand.php | 12 + .../brands/widgets/brand-description.php | 27 + .../widgets/brand-thumbnails-description.php | 58 + .../brands/widgets/brand-thumbnails.php | 45 + .../orgsteklo/woocommerce/cart/cart-empty.php | 17 + .../woocommerce/cart/cart-item-data.php | 26 + .../woocommerce/cart/cart-shipping.php | 117 + .../woocommerce/cart/cart-totals.php | 112 + .../orgsteklo/woocommerce/cart/cart.php | 588 ++ .../woocommerce/cart/cross-sells.php | 51 + .../orgsteklo/woocommerce/cart/mini-cart.php | 131 + .../cart/proceed-to-checkout-button.php | 6 + .../woocommerce/cart/shipping-calculator.php | 96 + .../woocommerce/checkout/cart-errors.php | 25 + .../woocommerce/checkout/form-billing.php | 89 + .../woocommerce/checkout/form-checkout.php | 474 + .../woocommerce/checkout/form-coupon.php | 51 + .../woocommerce/checkout/form-login.php | 36 + .../woocommerce/checkout/form-pay.php | 109 + .../woocommerce/checkout/form-shipping.php | 90 + .../checkout/form-verify-email.php | 53 + .../woocommerce/checkout/order-receipt.php | 46 + .../woocommerce/checkout/order-received.php | 42 + .../woocommerce/checkout/payment-method.php | 33 + .../woocommerce/checkout/payment.php | 50 + .../woocommerce/checkout/review-order.php | 1 + .../orgsteklo/woocommerce/checkout/terms.php | 40 + .../woocommerce/checkout/thankyou.php | 90 + .../woocommerce/content-product-cat.php | 57 + .../orgsteklo/woocommerce/content-product.php | 152 + .../woocommerce/content-single-product.php | 431 + .../content-widget-price-filter.php | 42 + .../woocommerce/content-widget-product.php | 43 + .../woocommerce/content-widget-reviews.php | 47 + .../emails/admin-cancelled-order.php | 75 + .../woocommerce/emails/admin-failed-order.php | 76 + .../woocommerce/emails/admin-new-order.php | 74 + .../emails/customer-completed-order.php | 83 + .../emails/customer-failed-order.php | 94 + .../woocommerce/emails/customer-invoice.php | 133 + .../emails/customer-new-account-blocks.php | 68 + .../emails/customer-new-account.php | 62 + .../woocommerce/emails/customer-note.php | 82 + .../emails/customer-on-hold-order.php | 81 + .../emails/customer-processing-order.php | 84 + .../emails/customer-refunded-order.php | 98 + .../emails/customer-reset-password.php | 69 + .../woocommerce/emails/email-addresses.php | 92 + .../emails/email-customer-details.php | 31 + .../woocommerce/emails/email-downloads.php | 66 + .../woocommerce/emails/email-footer.php | 85 + .../woocommerce/emails/email-header.php | 103 + .../emails/email-mobile-messaging.php | 20 + .../emails/email-order-details.php | 161 + .../woocommerce/emails/email-order-items.php | 218 + .../woocommerce/emails/email-styles.php | 531 + .../emails/plain/admin-cancelled-order.php | 67 + .../emails/plain/admin-failed-order.php | 67 + .../emails/plain/admin-new-order.php | 67 + .../emails/plain/customer-completed-order.php | 68 + .../emails/plain/customer-failed-order.php | 75 + .../emails/plain/customer-invoice.php | 95 + .../plain/customer-new-account-blocks.php | 61 + .../emails/plain/customer-new-account.php | 61 + .../emails/plain/customer-note.php | 67 + .../emails/plain/customer-on-hold-order.php | 68 + .../plain/customer-processing-order.php | 69 + .../emails/plain/customer-refunded-order.php | 78 + .../emails/plain/customer-reset-password.php | 55 + .../emails/plain/email-addresses.php | 66 + .../emails/plain/email-customer-details.php | 26 + .../emails/plain/email-downloads.php | 50 + .../emails/plain/email-order-details.php | 82 + .../emails/plain/email-order-items.php | 113 + .../woocommerce/global/breadcrumb.php | 4 + .../woocommerce/global/form-login.php | 61 + .../woocommerce/global/quantity-input.php | 32 + .../orgsteklo/woocommerce/global/sidebar.php | 4 + .../woocommerce/global/wrapper-end.php | 7 + .../woocommerce/global/wrapper-start.php | 7 + .../woocommerce/loop/add-to-cart.php | 45 + .../orgsteklo/woocommerce/loop/header.php | 47 + .../orgsteklo/woocommerce/loop/loop-end.php | 5 + .../orgsteklo/woocommerce/loop/loop-start.php | 5 + .../woocommerce/loop/no-products-found.php | 23 + .../orgsteklo/woocommerce/loop/orderby.php | 44 + .../orgsteklo/woocommerce/loop/pagination.php | 51 + .../orgsteklo/woocommerce/loop/price.php | 27 + .../orgsteklo/woocommerce/loop/rating.php | 28 + .../woocommerce/loop/result-count.php | 42 + .../orgsteklo/woocommerce/loop/sale-flash.php | 32 + .../woocommerce/myaccount/dashboard.php | 324 + .../woocommerce/myaccount/downloads.php | 47 + .../myaccount/form-add-payment-method.php | 61 + .../myaccount/form-edit-account.php | 99 + .../myaccount/form-edit-address.php | 56 + .../woocommerce/myaccount/form-login.php | 119 + .../myaccount/form-lost-password.php | 45 + .../myaccount/form-reset-password.php | 53 + .../myaccount/lost-password-confirmation.php | 27 + .../woocommerce/myaccount/my-account.php | 36 + .../woocommerce/myaccount/my-address.php | 93 + .../woocommerce/myaccount/my-downloads.php | 52 + .../woocommerce/myaccount/my-orders.php | 85 + .../woocommerce/myaccount/navigation.php | 7 + .../woocommerce/myaccount/orders.php | 165 + .../woocommerce/myaccount/payment-methods.php | 78 + .../woocommerce/myaccount/view-order.php | 56 + .../orgsteklo/woocommerce/notices/error.php | 34 + .../orgsteklo/woocommerce/notices/notice.php | 32 + .../orgsteklo/woocommerce/notices/success.php | 32 + .../woocommerce/order/attribution-details.php | 140 + .../woocommerce/order/customer-history.php | 59 + .../woocommerce/order/form-tracking.php | 61 + .../woocommerce/order/order-again.php | 23 + .../order/order-details-customer.php | 88 + .../woocommerce/order/order-details-item.php | 68 + .../woocommerce/order/order-details.php | 151 + .../woocommerce/order/order-downloads.php | 73 + .../orgsteklo/woocommerce/order/tracking.php | 60 + .../woocommerce/parts/checkout-header.html | 9 + .../parts/coming-soon-social-links.html | 7 + ...rnal-product-add-to-cart-with-options.html | 3 + ...uped-product-add-to-cart-with-options.html | 29 + .../woocommerce/parts/mini-cart.html | 49 + ...mple-product-add-to-cart-with-options.html | 4 + ...able-product-add-to-cart-with-options.html | 5 + .../woocommerce/product-form/simple.php | 31 + .../woocommerce/product-searchform.php | 28 + .../themes/orgsteklo/woocommerce/shop.php | 289 + .../woocommerce/single-product-reviews.php | 147 + .../orgsteklo/woocommerce/single-product.php | 62 + .../single-product/add-to-cart/external.php | 32 + .../single-product/add-to-cart/grouped.php | 145 + .../add-to-cart/orgsteklo-calculator.php | 380 + .../single-product/add-to-cart/simple.php | 94 + .../single-product/add-to-cart/variable.php | 83 + .../variation-add-to-cart-button.php | 45 + .../single-product/add-to-cart/variation.php | 41 + .../woocommerce/single-product/meta.php | 42 + .../woocommerce/single-product/photoswipe.php | 56 + .../woocommerce/single-product/price.php | 25 + .../single-product/product-attributes.php | 33 + .../single-product/product-image.php | 53 + .../single-product/product-thumbnails.php | 25 + .../woocommerce/single-product/rating.php | 43 + .../woocommerce/single-product/related.php | 53 + .../single-product/review-meta.php | 45 + .../single-product/review-rating.php | 27 + .../woocommerce/single-product/review.php | 67 + .../woocommerce/single-product/sale-flash.php | 32 + .../woocommerce/single-product/share.php | 26 + .../single-product/short-description.php | 33 + .../woocommerce/single-product/stock.php | 23 + .../tabs/additional-information.php | 30 + .../single-product/tabs/description.php | 30 + .../woocommerce/single-product/tabs/tabs.php | 56 + .../woocommerce/single-product/title.php | 22 + .../woocommerce/single-product/up-sells.php | 54 + .../taxonomy-product-attribute.php | 22 + .../woocommerce/taxonomy-product-cat.php | 22 + .../woocommerce/taxonomy-product-tag.php | 22 + .../templates/archive-product.html | 5 + .../templates/blockified/archive-product.html | 46 + .../templates/blockified/coming-soon.html | 1 + .../blockified/order-confirmation.html | 53 + .../templates/blockified/page-cart.html | 11 + .../templates/blockified/page-checkout.html | 9 + .../blockified/product-search-results.html | 41 + .../templates/blockified/single-product.html | 53 + .../taxonomy-product_attribute.html | 48 + .../blockified/taxonomy-product_brand.html | 42 + .../blockified/taxonomy-product_cat.html | 48 + .../blockified/taxonomy-product_tag.html | 47 + .../woocommerce/templates/coming-soon.html | 1 + .../templates/order-confirmation.html | 53 + .../woocommerce/templates/page-cart.html | 11 + .../woocommerce/templates/page-checkout.html | 9 + .../templates/product-search-results.html | 7 + .../woocommerce/templates/single-product.html | 5 + .../templates/taxonomy-product_attribute.html | 5 + .../templates/taxonomy-product_brand.html | 5 + .../templates/taxonomy-product_cat.html | 5 + .../templates/taxonomy-product_tag.html | 5 + 227 files changed, 30832 insertions(+) create mode 100644 .gitignore create mode 100644 wp-content/themes/orgsteklo/404.php create mode 100644 wp-content/themes/orgsteklo/assets/css/fancybox.css create mode 100644 wp-content/themes/orgsteklo/assets/css/style.css create mode 100644 wp-content/themes/orgsteklo/assets/js/fancybox.min.js create mode 100644 wp-content/themes/orgsteklo/assets/js/main.js create mode 100644 wp-content/themes/orgsteklo/assets/js/price-calculator.js create mode 100644 wp-content/themes/orgsteklo/blocks/block-consult.php create mode 100644 wp-content/themes/orgsteklo/blocks/block-info.php create mode 100644 wp-content/themes/orgsteklo/blocks/block-why.php create mode 100644 wp-content/themes/orgsteklo/footer.php create mode 100644 wp-content/themes/orgsteklo/functions.php create mode 100644 wp-content/themes/orgsteklo/header.php create mode 100644 wp-content/themes/orgsteklo/inc/price-calculator-admin.php create mode 100644 wp-content/themes/orgsteklo/inc/price-calculator-functions.php create mode 100644 wp-content/themes/orgsteklo/index.php create mode 100644 wp-content/themes/orgsteklo/style.css create mode 100644 wp-content/themes/orgsteklo/templates/template-about.php create mode 100644 wp-content/themes/orgsteklo/templates/template-account.php create mode 100644 wp-content/themes/orgsteklo/templates/template-cart.php create mode 100644 wp-content/themes/orgsteklo/templates/template-checkout.php create mode 100644 wp-content/themes/orgsteklo/templates/template-contacts.php create mode 100644 wp-content/themes/orgsteklo/templates/template-delivery.php create mode 100644 wp-content/themes/orgsteklo/templates/template-docs.php create mode 100644 wp-content/themes/orgsteklo/templates/template-home.php create mode 100644 wp-content/themes/orgsteklo/templates/template-login.php create mode 100644 wp-content/themes/orgsteklo/templates/template-payment.php create mode 100644 wp-content/themes/orgsteklo/templates/template-recovery-2.php create mode 100644 wp-content/themes/orgsteklo/templates/template-recovery.php create mode 100644 wp-content/themes/orgsteklo/templates/template-refund.php create mode 100644 wp-content/themes/orgsteklo/templates/template-registration-success.php create mode 100644 wp-content/themes/orgsteklo/templates/template-registration.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/archive-product.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/auth/footer.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/auth/form-grant-access.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/auth/form-login.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/auth/header.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/block-notices/error.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/block-notices/notice.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/block-notices/success.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/brands/brand-description.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/brands/shortcodes/brands-a-z.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/brands/shortcodes/single-brand.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/brands/taxonomy-product_brand.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/brands/widgets/brand-description.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/brands/widgets/brand-thumbnails-description.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/brands/widgets/brand-thumbnails.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/cart/cart-empty.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/cart/cart-item-data.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/cart/cart-shipping.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/cart/cart-totals.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/cart/cart.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/cart/cross-sells.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/cart/mini-cart.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/cart/proceed-to-checkout-button.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/cart/shipping-calculator.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/cart-errors.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/form-billing.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/form-checkout.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/form-coupon.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/form-login.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/form-pay.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/form-shipping.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/form-verify-email.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/order-receipt.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/order-received.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/payment-method.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/payment.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/review-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/terms.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/checkout/thankyou.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/content-product-cat.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/content-product.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/content-single-product.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/content-widget-price-filter.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/content-widget-product.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/content-widget-reviews.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/admin-cancelled-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/admin-failed-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/admin-new-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-completed-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-failed-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-invoice.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-new-account-blocks.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-new-account.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-note.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-on-hold-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-processing-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-refunded-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/customer-reset-password.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/email-addresses.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/email-customer-details.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/email-downloads.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/email-footer.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/email-header.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/email-mobile-messaging.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/email-order-details.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/email-order-items.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/email-styles.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/admin-cancelled-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/admin-failed-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/admin-new-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-completed-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-failed-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-invoice.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-new-account-blocks.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-new-account.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-note.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-on-hold-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-processing-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-refunded-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-reset-password.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/email-addresses.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/email-customer-details.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/email-downloads.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/email-order-details.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/emails/plain/email-order-items.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/global/breadcrumb.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/global/form-login.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/global/quantity-input.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/global/sidebar.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/global/wrapper-end.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/global/wrapper-start.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/add-to-cart.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/header.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/loop-end.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/loop-start.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/no-products-found.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/orderby.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/pagination.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/price.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/rating.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/result-count.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/loop/sale-flash.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/dashboard.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/downloads.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/form-add-payment-method.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/form-edit-account.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/form-edit-address.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/form-login.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/form-lost-password.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/form-reset-password.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/lost-password-confirmation.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/my-account.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/my-address.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/my-downloads.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/my-orders.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/navigation.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/orders.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/payment-methods.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/myaccount/view-order.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/notices/error.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/notices/notice.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/notices/success.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/order/attribution-details.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/order/customer-history.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/order/form-tracking.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/order/order-again.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/order/order-details-customer.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/order/order-details-item.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/order/order-details.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/order/order-downloads.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/order/tracking.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/parts/checkout-header.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/parts/coming-soon-social-links.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/parts/external-product-add-to-cart-with-options.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/parts/grouped-product-add-to-cart-with-options.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/parts/mini-cart.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/parts/simple-product-add-to-cart-with-options.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/parts/variable-product-add-to-cart-with-options.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/product-form/simple.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/product-searchform.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/shop.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product-reviews.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/external.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/grouped.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/orgsteklo-calculator.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/simple.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/variable.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/variation.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/meta.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/photoswipe.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/price.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/product-attributes.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/product-image.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/product-thumbnails.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/rating.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/related.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/review-meta.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/review-rating.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/review.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/sale-flash.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/share.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/short-description.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/stock.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/tabs/additional-information.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/tabs/description.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/tabs/tabs.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/title.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/single-product/up-sells.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/taxonomy-product-attribute.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/taxonomy-product-cat.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/taxonomy-product-tag.php create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/archive-product.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/archive-product.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/coming-soon.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/order-confirmation.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/page-cart.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/page-checkout.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/product-search-results.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/single-product.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_attribute.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_brand.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_cat.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_tag.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/coming-soon.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/order-confirmation.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/page-cart.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/page-checkout.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/product-search-results.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/single-product.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_attribute.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_brand.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_cat.html create mode 100644 wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_tag.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e44a5f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# Ignore everything +/* +!/.gitignore + +# Except the theme +!/wp-content/ +/wp-content/* +!/wp-content/themes/ +/wp-content/themes/* +!/wp-content/themes/orgsteklo/ + +# Inside theme - ignore node_modules if any +wp-content/themes/orgsteklo/node_modules/ + +# OS files +.DS_Store +Thumbs.db +*.swp +*~ +~$* +*.tmp.* diff --git a/wp-content/themes/orgsteklo/404.php b/wp-content/themes/orgsteklo/404.php new file mode 100644 index 0000000..0d00efe --- /dev/null +++ b/wp-content/themes/orgsteklo/404.php @@ -0,0 +1,36 @@ + +
+ +
+
+
+

404

+

Похоже такой страницы не существует

+ 10 && $n < 20) return $forms[2]; + if ($n1 > 1 && $n1 < 5) return $forms[1]; + if ($n1 == 1) return $forms[0]; + return $forms[2]; + } + $product_count = wp_count_posts('product')->publish; + $word = plural_form($product_count, ['товар', 'товара', 'товаров']); + echo '

Но зато у нас есть более ' . number_format_i18n($product_count, 0) . ' ' . $word . '.

'; + ?> + + Перейти в каталог + + +
+
+
+
+ \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/assets/css/fancybox.css b/wp-content/themes/orgsteklo/assets/css/fancybox.css new file mode 100644 index 0000000..0c9738b --- /dev/null +++ b/wp-content/themes/orgsteklo/assets/css/fancybox.css @@ -0,0 +1,895 @@ +body.compensate-for-scrollbar { + overflow: hidden; +} + +.fancybox-active { + height: auto; +} + +.fancybox-is-hidden { + left: -9999px; + margin: 0; + position: absolute !important; + top: -9999px; + visibility: hidden; +} + +.fancybox-container { + -webkit-backface-visibility: hidden; + height: 100%; + left: 0; + outline: none; + position: fixed; + -webkit-tap-highlight-color: transparent; + top: 0; + -ms-touch-action: manipulation; + touch-action: manipulation; + transform: translateZ(0); + width: 100%; + z-index: 99992; +} + +.fancybox-container * { + box-sizing: border-box; +} + +.fancybox-outer, +.fancybox-inner, +.fancybox-bg, +.fancybox-stage { + bottom: 0; + left: 0; + position: absolute; + right: 0; + top: 0; +} + +.fancybox-outer { + -webkit-overflow-scrolling: touch; + overflow-y: auto; +} + +.fancybox-bg { + background: rgb(30, 30, 30); + opacity: 0; + transition-duration: inherit; + transition-property: opacity; + transition-timing-function: cubic-bezier(.47, 0, .74, .71); +} + +.fancybox-is-open .fancybox-bg { + opacity: .9; + transition-timing-function: cubic-bezier(.22, .61, .36, 1); +} + +.fancybox-infobar, +.fancybox-toolbar, +.fancybox-caption, +.fancybox-navigation .fancybox-button { + direction: ltr; + opacity: 0; + position: absolute; + transition: opacity .25s ease, visibility 0s ease .25s; + visibility: hidden; + z-index: 99997; +} + +.fancybox-show-infobar .fancybox-infobar, +.fancybox-show-toolbar .fancybox-toolbar, +.fancybox-show-caption .fancybox-caption, +.fancybox-show-nav .fancybox-navigation .fancybox-button { + opacity: 1; + transition: opacity .25s ease 0s, visibility 0s ease 0s; + visibility: visible; +} + +.fancybox-infobar { + color: #ccc; + font-size: 13px; + -webkit-font-smoothing: subpixel-antialiased; + height: 44px; + left: 0; + line-height: 44px; + min-width: 44px; + mix-blend-mode: difference; + padding: 0 10px; + pointer-events: none; + top: 0; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.fancybox-toolbar { + right: 0; + top: 0; +} + +.fancybox-stage { + direction: ltr; + overflow: visible; + transform: translateZ(0); + z-index: 99994; +} + +.fancybox-is-open .fancybox-stage { + overflow: hidden; +} + +.fancybox-slide { + -webkit-backface-visibility: hidden; + /* Using without prefix would break IE11 */ + display: none; + height: 100%; + left: 0; + outline: none; + overflow: auto; + -webkit-overflow-scrolling: touch; + padding: 44px; + position: absolute; + text-align: center; + top: 0; + transition-property: transform, opacity; + white-space: normal; + width: 100%; + z-index: 99994; +} + +.fancybox-slide::before { + content: ''; + display: inline-block; + font-size: 0; + height: 100%; + vertical-align: middle; + width: 0; +} + +.fancybox-is-sliding .fancybox-slide, +.fancybox-slide--previous, +.fancybox-slide--current, +.fancybox-slide--next { + display: block; +} + +.fancybox-slide--image { + overflow: hidden; + padding: 44px 0; +} + +.fancybox-slide--image::before { + display: none; +} + +.fancybox-slide--html { + padding: 6px; +} + +.fancybox-content { + background: #fff; + display: inline-block; + margin: 0; + max-width: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; + padding: 44px; + position: relative; + text-align: left; + vertical-align: middle; +} + +.fancybox-slide--image .fancybox-content { + animation-timing-function: cubic-bezier(.5, 0, .14, 1); + -webkit-backface-visibility: hidden; + background: transparent; + background-repeat: no-repeat; + background-size: 100% 100%; + left: 0; + max-width: none; + overflow: visible; + padding: 0; + position: absolute; + top: 0; + -ms-transform-origin: top left; + transform-origin: top left; + transition-property: transform, opacity; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + z-index: 99995; +} + +.fancybox-can-zoomOut .fancybox-content { + cursor: zoom-out; +} + +.fancybox-can-zoomIn .fancybox-content { + cursor: zoom-in; +} + +.fancybox-can-swipe .fancybox-content, +.fancybox-can-pan .fancybox-content { + cursor: -webkit-grab; + cursor: grab; +} + +.fancybox-is-grabbing .fancybox-content { + cursor: -webkit-grabbing; + cursor: grabbing; +} + +.fancybox-container [data-selectable='true'] { + cursor: text; +} + +.fancybox-image, +.fancybox-spaceball { + background: transparent; + border: 0; + height: 100%; + left: 0; + margin: 0; + max-height: none; + max-width: none; + padding: 0; + position: absolute; + top: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + width: 100%; +} + +.fancybox-spaceball { + z-index: 1; +} + +.fancybox-slide--video .fancybox-content, +.fancybox-slide--map .fancybox-content, +.fancybox-slide--pdf .fancybox-content, +.fancybox-slide--iframe .fancybox-content { + height: 100%; + overflow: visible; + padding: 0; + width: 100%; +} + +.fancybox-slide--video .fancybox-content { + background: #000; +} + +.fancybox-slide--map .fancybox-content { + background: #e5e3df; +} + +.fancybox-slide--iframe .fancybox-content { + background: #fff; +} + +.fancybox-video, +.fancybox-iframe { + background: transparent; + border: 0; + display: block; + height: 100%; + margin: 0; + overflow: hidden; + padding: 0; + width: 100%; +} + +/* Fix iOS */ +.fancybox-iframe { + left: 0; + position: absolute; + top: 0; +} + +.fancybox-error { + background: #fff; + cursor: default; + max-width: 400px; + padding: 40px; + width: 100%; +} + +.fancybox-error p { + color: #444; + font-size: 16px; + line-height: 20px; + margin: 0; + padding: 0; +} + +/* Buttons */ + +.fancybox-button { + background: rgba(30, 30, 30, .6); + border: 0; + border-radius: 0; + box-shadow: none; + cursor: pointer; + display: inline-block; + height: 44px; + margin: 0; + padding: 10px; + position: relative; + transition: color .2s; + vertical-align: top; + visibility: inherit; + width: 44px; +} + +.fancybox-button, +.fancybox-button:visited, +.fancybox-button:link { + color: #ccc; +} + +.fancybox-button:hover { + color: #fff; +} + +.fancybox-button:focus { + outline: none; +} + +.fancybox-button.fancybox-focus { + outline: 1px dotted; +} + +.fancybox-button[disabled], +.fancybox-button[disabled]:hover { + color: #888; + cursor: default; + outline: none; +} + +/* Fix IE11 */ +.fancybox-button div { + height: 100%; +} + +.fancybox-button svg { + display: block; + height: 100%; + overflow: visible; + position: relative; + width: 100%; +} + +.fancybox-button svg path { + fill: currentColor; + stroke-width: 0; +} + +.fancybox-button--play svg:nth-child(2), +.fancybox-button--fsenter svg:nth-child(2) { + display: none; +} + +.fancybox-button--pause svg:nth-child(1), +.fancybox-button--fsexit svg:nth-child(1) { + display: none; +} + +.fancybox-progress { + background: #ff5268; + height: 2px; + left: 0; + position: absolute; + right: 0; + top: 0; + -ms-transform: scaleX(0); + transform: scaleX(0); + -ms-transform-origin: 0; + transform-origin: 0; + transition-property: transform; + transition-timing-function: linear; + z-index: 99998; +} + +/* Close button on the top right corner of html content */ + +.fancybox-close-small { + background: transparent; + border: 0; + border-radius: 0; + color: #ccc; + cursor: pointer; + opacity: .8; + padding: 8px; + position: absolute; + right: -12px; + top: -44px; + z-index: 401; +} + +.fancybox-close-small:hover { + color: #fff; + opacity: 1; +} + +.fancybox-slide--html .fancybox-close-small { + color: currentColor; + padding: 10px; + right: 0; + top: 0; +} + +.fancybox-slide--image.fancybox-is-scaling .fancybox-content { + overflow: hidden; +} + +.fancybox-is-scaling .fancybox-close-small, +.fancybox-is-zoomable.fancybox-can-pan .fancybox-close-small { + display: none; +} + +/* Navigation arrows */ + +.fancybox-navigation .fancybox-button { + background-clip: content-box; + height: 100px; + opacity: 0; + position: absolute; + top: calc(50% - 50px); + width: 70px; +} + +.fancybox-navigation .fancybox-button div { + padding: 7px; +} + +.fancybox-navigation .fancybox-button--arrow_left { + left: 0; + left: env(safe-area-inset-left); + padding: 31px 26px 31px 6px; +} + +.fancybox-navigation .fancybox-button--arrow_right { + padding: 31px 6px 31px 26px; + right: 0; + right: env(safe-area-inset-right); +} + +/* Caption */ + +.fancybox-caption { + background: linear-gradient(to top, + rgba(0, 0, 0, .85) 0%, + rgba(0, 0, 0, .3) 50%, + rgba(0, 0, 0, .15) 65%, + rgba(0, 0, 0, .075) 75.5%, + rgba(0, 0, 0, .037) 82.85%, + rgba(0, 0, 0, .019) 88%, + rgba(0, 0, 0, 0) 100%); + bottom: 0; + color: #eee; + font-size: 14px; + font-weight: 400; + left: 0; + line-height: 1.5; + padding: 75px 44px 25px 44px; + pointer-events: none; + right: 0; + text-align: center; + z-index: 99996; +} + +@supports (padding: max(0px)) { + .fancybox-caption { + padding: 75px max(44px, env(safe-area-inset-right)) max(25px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left)); + } +} + +.fancybox-caption--separate { + margin-top: -50px; +} + +.fancybox-caption__body { + max-height: 50vh; + overflow: auto; + pointer-events: all; +} + +.fancybox-caption a, +.fancybox-caption a:link, +.fancybox-caption a:visited { + color: #ccc; + text-decoration: none; +} + +.fancybox-caption a:hover { + color: #fff; + text-decoration: underline; +} + +/* Loading indicator */ + +.fancybox-loading { + animation: fancybox-rotate 1s linear infinite; + background: transparent; + border: 4px solid #888; + border-bottom-color: #fff; + border-radius: 50%; + height: 50px; + left: 50%; + margin: -25px 0 0 -25px; + opacity: .7; + padding: 0; + position: absolute; + top: 50%; + width: 50px; + z-index: 99999; +} + +@keyframes fancybox-rotate { + 100% { + transform: rotate(360deg); + } +} + +/* Transition effects */ + +.fancybox-animated { + transition-timing-function: cubic-bezier(0, 0, .25, 1); +} + +/* transitionEffect: slide */ + +.fancybox-fx-slide.fancybox-slide--previous { + opacity: 0; + transform: translate3d(-100%, 0, 0); +} + +.fancybox-fx-slide.fancybox-slide--next { + opacity: 0; + transform: translate3d(100%, 0, 0); +} + +.fancybox-fx-slide.fancybox-slide--current { + opacity: 1; + transform: translate3d(0, 0, 0); +} + +/* transitionEffect: fade */ + +.fancybox-fx-fade.fancybox-slide--previous, +.fancybox-fx-fade.fancybox-slide--next { + opacity: 0; + transition-timing-function: cubic-bezier(.19, 1, .22, 1); +} + +.fancybox-fx-fade.fancybox-slide--current { + opacity: 1; +} + +/* transitionEffect: zoom-in-out */ + +.fancybox-fx-zoom-in-out.fancybox-slide--previous { + opacity: 0; + transform: scale3d(1.5, 1.5, 1.5); +} + +.fancybox-fx-zoom-in-out.fancybox-slide--next { + opacity: 0; + transform: scale3d(.5, .5, .5); +} + +.fancybox-fx-zoom-in-out.fancybox-slide--current { + opacity: 1; + transform: scale3d(1, 1, 1); +} + +/* transitionEffect: rotate */ + +.fancybox-fx-rotate.fancybox-slide--previous { + opacity: 0; + -ms-transform: rotate(-360deg); + transform: rotate(-360deg); +} + +.fancybox-fx-rotate.fancybox-slide--next { + opacity: 0; + -ms-transform: rotate(360deg); + transform: rotate(360deg); +} + +.fancybox-fx-rotate.fancybox-slide--current { + opacity: 1; + -ms-transform: rotate(0deg); + transform: rotate(0deg); +} + +/* transitionEffect: circular */ + +.fancybox-fx-circular.fancybox-slide--previous { + opacity: 0; + transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); +} + +.fancybox-fx-circular.fancybox-slide--next { + opacity: 0; + transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); +} + +.fancybox-fx-circular.fancybox-slide--current { + opacity: 1; + transform: scale3d(1, 1, 1) translate3d(0, 0, 0); +} + +/* transitionEffect: tube */ + +.fancybox-fx-tube.fancybox-slide--previous { + transform: translate3d(-100%, 0, 0) scale(.1) skew(-10deg); +} + +.fancybox-fx-tube.fancybox-slide--next { + transform: translate3d(100%, 0, 0) scale(.1) skew(10deg); +} + +.fancybox-fx-tube.fancybox-slide--current { + transform: translate3d(0, 0, 0) scale(1); +} + +/* Styling for Small-Screen Devices */ +@media all and (max-height: 576px) { + .fancybox-slide { + padding-left: 6px; + padding-right: 6px; + } + + .fancybox-slide--image { + padding: 6px 0; + } + + .fancybox-close-small { + right: -6px; + } + + .fancybox-slide--image .fancybox-close-small { + background: #4e4e4e; + color: #f2f4f6; + height: 36px; + opacity: 1; + padding: 6px; + right: 0; + top: 0; + width: 36px; + } + + .fancybox-caption { + padding-left: 12px; + padding-right: 12px; + } + + @supports (padding: max(0px)) { + .fancybox-caption { + padding-left: max(12px, env(safe-area-inset-left)); + padding-right: max(12px, env(safe-area-inset-right)); + } + } +} +/* Share */ + +.fancybox-share { + background: #f4f4f4; + border-radius: 3px; + max-width: 90%; + padding: 30px; + text-align: center; +} + +.fancybox-share h1 { + color: #222; + font-size: 35px; + font-weight: 700; + margin: 0 0 20px 0; +} + +.fancybox-share p { + margin: 0; + padding: 0; +} + +.fancybox-share__button { + border: 0; + border-radius: 3px; + display: inline-block; + font-size: 14px; + font-weight: 700; + line-height: 40px; + margin: 0 5px 10px 5px; + min-width: 130px; + padding: 0 15px; + text-decoration: none; + transition: all .2s; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + white-space: nowrap; +} + +.fancybox-share__button:visited, +.fancybox-share__button:link { + color: #fff; +} + +.fancybox-share__button:hover { + text-decoration: none; +} + +.fancybox-share__button--fb { + background: #3b5998; +} + +.fancybox-share__button--fb:hover { + background: #344e86; +} + +.fancybox-share__button--pt { + background: #bd081d; +} + +.fancybox-share__button--pt:hover { + background: #aa0719; +} + +.fancybox-share__button--tw { + background: #1da1f2; +} + +.fancybox-share__button--tw:hover { + background: #0d95e8; +} + +.fancybox-share__button svg { + height: 25px; + margin-right: 7px; + position: relative; + top: -1px; + vertical-align: middle; + width: 25px; +} + +.fancybox-share__button svg path { + fill: #fff; +} + +.fancybox-share__input { + background: transparent; + border: 0; + border-bottom: 1px solid #d7d7d7; + border-radius: 0; + color: #5d5b5b; + font-size: 14px; + margin: 10px 0 0 0; + outline: none; + padding: 10px 15px; + width: 100%; +} +/* Thumbs */ + +.fancybox-thumbs { + background: #ddd; + bottom: 0; + display: none; + margin: 0; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + padding: 2px 2px 4px 2px; + position: absolute; + right: 0; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + top: 0; + width: 212px; + z-index: 99995; +} + +.fancybox-thumbs-x { + overflow-x: auto; + overflow-y: hidden; +} + +.fancybox-show-thumbs .fancybox-thumbs { + display: block; +} + +.fancybox-show-thumbs .fancybox-inner { + right: 212px; +} + +.fancybox-thumbs__list { + font-size: 0; + height: 100%; + list-style: none; + margin: 0; + overflow-x: hidden; + overflow-y: auto; + padding: 0; + position: absolute; + position: relative; + white-space: nowrap; + width: 100%; +} + +.fancybox-thumbs-x .fancybox-thumbs__list { + overflow: hidden; +} + +.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar { + width: 7px; +} + +.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-track { + background: #fff; + border-radius: 10px; + box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); +} + +.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-thumb { + background: #2a2a2a; + border-radius: 10px; +} + +.fancybox-thumbs__list a { + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + background-color: rgba(0, 0, 0, .1); + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + cursor: pointer; + float: left; + height: 75px; + margin: 2px; + max-height: calc(100% - 8px); + max-width: calc(50% - 4px); + outline: none; + overflow: hidden; + padding: 0; + position: relative; + -webkit-tap-highlight-color: transparent; + width: 100px; +} + +.fancybox-thumbs__list a::before { + border: 6px solid #ff5268; + bottom: 0; + content: ''; + left: 0; + opacity: 0; + position: absolute; + right: 0; + top: 0; + transition: all .2s cubic-bezier(.25, .46, .45, .94); + z-index: 99991; +} + +.fancybox-thumbs__list a:focus::before { + opacity: .5; +} + +.fancybox-thumbs__list a.fancybox-thumbs-active::before { + opacity: 1; +} + +/* Styling for Small-Screen Devices */ +@media all and (max-width: 576px) { + .fancybox-thumbs { + width: 110px; + } + + .fancybox-show-thumbs .fancybox-inner { + right: 110px; + } + + .fancybox-thumbs__list a { + max-width: calc(100% - 10px); + } +} \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/assets/css/style.css b/wp-content/themes/orgsteklo/assets/css/style.css new file mode 100644 index 0000000..8a74518 --- /dev/null +++ b/wp-content/themes/orgsteklo/assets/css/style.css @@ -0,0 +1,8847 @@ +:root { + --White: #FFF; + --Light-Grey: #F9F9F9; + --Light-Grey-2: #F1F1F1; + --Light-Blue: #EBF0F2; + --Light-Blue-2: #E9F5FB; + --Light-Blue-3: #A5CAD8; + --Light-Grey-3: #D2D2D2; + --Grey-1: #C4C4C4; + --Light-Blue-Grey: #868D96; + --Grey-2: #808080; + --Blue: #02ADEF; + --Dark-Blue: #057EB9; + --Blue-Grey: #5C6876; + --Dark-Blue-Grey: #404F5F; + --Blue-Black: #2C3846; + --Black: #000; + --Green: #40BA69; + --Light-red: #FEE; + --Red: #F02E13; + --Dark-red: #CE1900; + --Grey: #A7A7A7; + --Light-green: #EEF5EC; + --black-blue-10: rgba(44, 56, 70, 0.10); +} + +html { + font-size: calc(100vw / 1440 * 10); +} +body { + font-family: 'Open Sans'; + font-weight: 400; + transition: all .2s linear !important; + min-height: 100vh; + font-size: 1.6rem; + color: var(--Black); + background: var(--Light-Grey); +} +a, h1, h2, h3, h4, h5, p, span, button, ul, li { + padding: 0; + margin: 0; + background: transparent; + text-decoration: none; + border: none; + transition: all .2s linear; + color: var(--Color-Background-Dark); +} +input, textarea, select { + padding: 0; + margin: 0; + background: transparent; + border: none; + outline: none; + transition: all .2s linear; +} +.container { + max-width: 136rem; + width: 100%; + padding-left: 0; + padding-right: 0; +} +div { + transition: all .2s linear; +} +path, rect, circle { + transition: all .2s linear; +} +main { + display: flex; + flex-direction: column; +} + +/* header */ + +h1 { + color: var(--Black); + font-size: 4.4rem; + font-style: normal; + font-weight: 700; + line-height: 120%; + letter-spacing: -0.088rem; + text-transform: uppercase; +} +h2 { + color: var(--Black); + text-align: center; + font-size: 3.2rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + letter-spacing: -0.064rem; + text-transform: uppercase; +} +h3 { + color: var(--Black); + font-size: 2.2rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + text-transform: uppercase; +} +h4 { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + text-transform: uppercase; +} +h5 { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + text-transform: uppercase; +} + +header { + display: flex; + flex-direction: column; + background: var(--White); +} +.header-top { + padding: 1.2rem 0; +} +.header-top__container { + display: flex; + align-items: center; + justify-content: space-between; +} +.logo { + display: flex; + width: 18.2rem; +} +.logo img { + width: 100%; +} +.header-top__row { + display: flex; + align-items: center; + gap: 1.6rem; + width: 100%; + max-width: 111.2rem; + justify-content: space-between; +} +.header-top nav ul:after { + content: ""; + display: table; + clear: both; +} +.header-top .topmenu { + display: flex; + align-items: center; + gap: 2rem; +} +.header-top .topmenu > li { + float: left; + position: relative; +} +.header-top .topmenu li { + list-style: none; +} +.header-top .topmenu a { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.028rem; + display: flex; + align-items: center; + gap: 0.4rem; +} +.header-top .topmenu a svg { + width: 1.2rem; + height: auto; + transition: .3s all; +} +.woocommerce ul#shipping_method .amount { + font-weight: 500; +} +.woocommerce-account .woocommerce::after, .woocommerce-account .woocommerce::before { + display: none; +} +.woocommerce-account .woocommerce-MyAccount-content { + float: left; + width: 100%; +} +.header-top .submenu { + position: absolute; + z-index: 5; + min-width: 21.9rem; + box-shadow: 8px 8px 10px 0px rgba(0, 0, 0, 0.04); + visibility: hidden; + opacity: 0; + transform-origin: 0% 0%; + transform: rotateX(-90deg); + transition: .3s linear; + background: #FFF; + border-radius: 0.4rem; +} +.header-top .submenu li { + position: relative; +} +.header-top .submenu li:first-child a { + border-radius: 0.4rem 0.4rem 0rem 0rem; +} +.header-top .submenu li:last-child a { + border-radius: 0rem 0rem 0.4rem 0.4rem; +} +.header-top .submenu li a { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.028rem; + padding: 1.4rem 1.6rem; + background: var(--White); +} +.header-top .submenu li a.active { + background: var(--Light-Grey); + color: var(--Blue); +} +.header-top .submenu li a:hover { + color: var(--Blue); +} +.header-top .topmenu a:hover, .header-top .topmenu a.active { + color: var(--Blue); +} +.header-top .submenu .submenu { + position: absolute; + left: 100%; + top: -1px; + transition: .3s linear; +} +.header-top nav li:hover > .submenu { + transform: rotateX(0deg); + visibility: visible; + opacity: 1; +} +.header-top nav li:hover a svg { + transform: rotate(180deg); +} +.header-contacts { + display: flex; + align-items: center; + gap: 2rem; +} +.header-contacts a { + display: flex; + align-items: center; + gap: 0.6rem; + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.header-contacts a svg { + width: 1.2rem; + height: auto; +} +.header-contacts a:hover { + color: var(--Blue); +} +.header-contacts a:hover svg path { + stroke: var(--Blue); +} +.header-bottom { + background: var(--Dark-Blue-Grey); +} +.header-bottom__container { + display: flex; + align-items: center; + justify-content: space-between; +} +.header-bottom__row { + display: flex; + align-items: center; + gap: 2rem; + width: 100%; + max-width: 113.1rem; +} +.header-catalog__button { + display: flex; + width: 25.9rem; + min-width: 25.9rem; + height: 6.4rem; + align-items: center; + gap: 0.8rem; + background: var(--Blue); + padding: 1.2rem 1.6rem; + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 110%; + letter-spacing: -0.032rem; +} +.header-catalog__button-icon { + width: 2.4rem; + display: flex; + flex-direction: column; + gap: 0.5rem; + padding: 0.4rem; +} +.header-catalog__button-icon .bar { + width: 100%; + height: 0.1rem; + background: var(--White); +} +.header-search { + width: 100%; + position: relative; +} +.header-search input { + width: 100%; + border-radius: 0.6rem; + background: var(--Blue-Grey); + color: var(--White); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; + padding: 0.4rem 10.4rem 0.4rem 2rem; + height: 4.8rem; +} +.header-search input::placeholder { + color: var(--White); +} +.header-search__submit { + position: absolute; + z-index: 2; + right: 0.4rem; + display: flex; + padding: 1.3rem 2rem; + align-items: center; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + top: 0.4rem; + color: var(--White); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.header-search__submit svg { + width: 1.4rem; + height: auto; +} +.header-search__submit:hover { + background: var(--Dark-Blue); +} +.header-bottom__buttons { + display: flex; + align-items: center; + gap: 2.4rem; +} +.header-cart { + display: flex; + align-items: center; + gap: 0.6rem; + color: var(--White); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 110%; + letter-spacing: -0.024rem; +} +.header-cart__icon { + position: relative; +} +.header-cart__icon svg { + width: 3.2rem; + height: auto; +} +.header-cart__icon span { + position: absolute; + z-index: 2; + top: 0; + right: 0; + padding: 0.5rem 0.4rem 0.4rem 0.4rem; + border-radius: 10rem; + background: var(--Blue); + color: var(--White); + text-align: center; + font-size: 1rem; + font-style: normal; + font-weight: 600; + line-height: 0.7rem; + letter-spacing: -0.04rem; +} +.header-cart:hover { + color: var(--Light-Blue-3); +} +.header-cart:hover .header-cart__icon svg path { + stroke: var(--Light-Blue-3); +} +.header-login { + display: flex; + align-items: center; + gap: 0.6rem; + color: var(--White); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 110%; + letter-spacing: -0.024rem; +} +.header-login svg { + width: 3.2rem; + height: auto; +} +.header-top__mob { + display: none; +} +.header-login:hover { + color: var(--Light-Blue-3); +} +.header-login:hover svg path { + stroke: var(--Light-Blue-3); +} + +@media screen and (max-width: 992px) { + html { + font-size: calc(100vw / 360 * 10); + } + .container { + max-width: 34rem; + } + h1 { + font-size: 2.4rem; + letter-spacing: -0.048rem; + } + h2 { + font-size: 2.4rem; + letter-spacing: -0.048rem; + } + h3 { + font-size: 2rem; + } + h4 { + font-size: 1.6rem; + } + h5 { + font-size: 1.2rem; + } + header { + background: transparent; + } + .header-top__row { + display: none; + } + .header-top__mob { + display: flex; + gap: 0.4rem; + } + .header-top__mob a, .header-top__mob button { + display: flex; + justify-content: center; + align-items: center; + position: relative; + border-radius: 0.4rem; + background: var(--White); + width: 3.2rem; + height: 3.2rem; + } + .header-top__mob a svg, .header-top__mob button svg { + width: 1.6rem; + height: auto; + } + .header-top__mob a span, .header-top__mob button span { + padding: 0.2rem 0.4rem; + border-radius: 10rem; + background: var(--Blue); + position: absolute; + right: 0.2rem; + top: 0.2rem; + color: var(--White); + text-align: center; + font-size: 0.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; + } + .header-top { + padding: 1rem 0; + } + .logo { + width: 10.4rem; + } + .header-bottom { + background: transparent; + } + .header-catalog__button p { + display: none; + } + .header-catalog__button { + width: 4rem; + min-width: 4rem; + height: 4rem; + padding: 1.3rem 1.2rem; + border-radius: 0.4rem; + } + .header-catalog__button-icon { + width: 1.6rem; + gap: 0.5rem; + padding: 0; + } + .header-bottom__buttons { + display: none; + } + .header-bottom__row { + gap: 1rem; + } + .header-search__submit p { + display: none; + } + .header-search input { + background: var(--White); + border-radius: 0.4rem; + padding: 0.4rem 3.6rem 0.4rem 1.6rem; + height: 4rem; + } + .header-search input::placeholder { + color: var(--Grey-2); + } + .header-search__submit { + padding: 0.9rem; + } +} + +/* banner */ + +.banner { + margin-bottom: 14.4rem; + margin-top: 1.6rem; +} +.banner-container { + display: flex; + justify-content: flex-end; +} +.banner-main { + width: 100%; + max-width: 108.5rem; + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.banner-slider { + display: flex; + position: relative; + align-items: center; +} +.banner-swiper { + width: 100%; + height: 42.4rem; +} +.banner-swiper .swiper-slide { + height: auto; +} +.banner-slide { + position: relative; + height: 100%; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 2.4rem; + padding: 2rem 12rem; + justify-content: center; +} +.banner-slide::before { + content: ''; + border-radius: 0.6rem; + background: linear-gradient(0deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 2; +} +.banner-slide__img { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border-radius: 0.6rem; + object-fit: cover; +} +.banner-slide h4 { + position: relative; + z-index: 3; + color: #FFC502; +} +.banner-slide h2 { + position: relative; + z-index: 3; + color: var(--White); + max-width: 49.6rem; + margin-bottom: 1.6rem; + text-align: left; +} +.banner-slide__link { + position: relative; + z-index: 3; + display: flex; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: flex-end; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.banner-slide__link svg { + width: 1.8rem; + height: auto; +} +.banner-prev { + display: flex; + position: absolute; + left: 0; + width: 4rem; + height: 4rem; + justify-content: center; + align-items: center; + z-index: 9; + border-radius: 0 0.4rem 0.4rem 0; + background: rgba(255, 255, 255, 0.20); +} +.banner-next { + display: flex; + position: absolute; + right: 0; + width: 4rem; + height: 4rem; + justify-content: center; + align-items: center; + z-index: 9; + border-radius: 0.4rem 0rem 0rem 0.4rem; + background: rgba(255, 255, 255, 0.20); +} +.banner-prev svg { + width: 1.6rem; + height: auto; +} +.banner-next svg { + width: 1.6rem; + height: auto; +} +.banner-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 1.6rem; +} +.banner-item { + display: flex; + padding: 2.4rem; + align-items: center; + gap: 1.6rem; + border-radius: 0.6rem; + background: var(--White); +} +.banner-item img { + width: 3.2rem; + min-width: 3.2rem; +} +.banner-item p { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} + +@media screen and (max-width: 992px) { + .banner { + margin-bottom: 9.6rem; + margin-top: 1rem; + } + .banner-main { + gap: 1rem; + } + .banner-slide { + padding: 2rem 1.6rem; + } + .banner-prev { + display: none; + } + .banner-next { + display: none; + } + .banner-grid { + display: flex; + gap: 1rem; + min-width: 100vw; + overflow-x: auto; + margin-left: -1rem; + padding: 0 1rem 1rem 1rem; + } + .banner-item { + padding: 1.6rem; + gap: 1rem; + width: 22.3rem; + min-width: 22.3rem; + } + .banner-item img { + width: 2.4rem; + min-width: 2.4rem; + } + .banner-item p { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } +} + +/* categories */ + +.categories { + margin-bottom: 14.4rem; +} +.categories-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.categories-main { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.categories-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1.6rem; +} +.categories-item { + background: var(--White); + border-radius: 0.6rem; + display: flex; + flex-direction: column; + position: relative; + overflow: hidden; +} +.categories-item__img { + display: flex; + height: 24rem; +} +.categories-item__img img { + width: 100%; + height: 100%; + object-fit: cover; +} +.categories-item__main { + padding: 3.2rem 2.4rem; +} +.categories-item__title { + color: var(--Black); + font-size: 2.2rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + text-transform: uppercase; + display: flex; + align-items: center; + gap: 1.2rem; +} +.categories-item__title svg { + width: 2.4rem; + height: auto; + transition: .3s all; + opacity: 0; +} +.categories-item.hidden { + display: none; +} +.categories-more { + display: flex; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: center; + gap: 0.8rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + margin: 0 auto; +} +.categories-more svg { + width: 1.6rem; + height: auto; +} +.categories-item:hover .categories-item__title { + color: var(--Blue); +} +.categories-item:hover svg { + opacity: 1; +} + +@media screen and (max-width: 992px) { + .categories { + margin-bottom: 9.6rem; + } + .categories-container { + gap: 4rem; + } + .categories-main { + gap: 4rem; + } + .categories-grid { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .categories-item { + border-radius: 0.4rem; + } + .categories-item__img { + height: 14.4rem; + } + .categories-item__main { + padding: 2.4rem 1.6rem; + } + .categories-item__title { + font-size: 1.6rem; + } + .categories-more { + padding: 1.3rem 2rem; + gap: 0.6rem; + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .categories-more svg { + width: 1.4rem; + } +} + +/* products */ + +.products { + margin-bottom: 14.4rem; +} +.products-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.products-slider { + display: flex; + align-items: center; + position: relative; +} +.products-swiper { + width: 100%; +} +.products-swiper .swiper-slide { + height: auto; +} +.products-swiper .swiper-slide .product_item { + height: 100%; +} +.product_item { + display: flex; + flex-direction: column; + background: var(--White); + border-radius: 0.6rem; + position: relative; + overflow: hidden; +} +.product_item-img { + position: relative; + height: 28rem; + min-height: 28rem; +} +.product_item-img__link { + display: flex; + height: 100%; +} +.product_item-img__link img { + width: 100%; + height: 100%; + object-fit: cover; +} +.product_item-labels { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.6rem; + position: absolute; + z-index: 2; + left: 1.2rem; + top: 1.2rem; +} +.product_item-popular { + padding: 0.8rem 1.2rem; + border-radius: 0.4rem; + background: var(--Green); + color: var(--White); + text-align: center; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +/* Метка скидки для списка товаров - красная */ +.product_item-discount { + padding: 0.8rem 1.2rem; + border-radius: 0.4rem; + background: #EF4444; + color: var(--White); + text-align: center; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.product_item-sale { + padding: 0.8rem 1.2rem; + border-radius: 0.4rem; + background: var(--Red); + display: flex; + align-items: center; + gap: 0.2rem; +} +.product_item-sale svg { + width: 1.2rem; + height: auto; +} +.product_item-sale p { + color: var(--White); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.product_item-main { + height: 100%; + display: flex; + flex-direction: column; + padding: 2.4rem; + gap: 1.6rem; +} +.product_item-title { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + text-transform: uppercase; + /* Минимальная высота: 3 строки, но показываем весь текст */ + min-height: 7.02rem; +} +.product_item-chars { + display: flex; + flex-direction: column; + padding-left: 2.5rem; + /* Фиксируем высоту: 2 строки характеристик */ + min-height: 7.92rem; +} +.product_item-chars li { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; +} +.product_item-meta { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.8rem; + /* Прижимаем цены + кнопку к низу карточки (работает и без характеристик) */ + margin-top: auto; +} +.product_item-prices { + display: flex; + align-items: center; + gap: 0.8rem; +} +.product_item-price { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; +} +.product_item-oldprice { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: normal; + text-decoration-line: line-through; +} +.product_item-price_weight { + display: flex; + align-items: center; + gap: 0.8rem; +} +.product_item-price_weight-new { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.028rem; +} +.product_item-price_weight-old { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; + text-decoration-line: line-through; +} +.product_item-link { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + text-align: center; +} +.products-prev { + position: absolute; + width: 4rem; + height: 4rem; + display: flex; + justify-content: center; + align-items: center; + border-radius: 0 0.4rem 0.4rem 0; + background: var(--Dark-Blue-Grey); + z-index: 9; + left: 0; +} +.products-prev svg { + width: 1.6rem; + height: auto; +} +.products-next { + position: absolute; + width: 4rem; + height: 4rem; + display: flex; + justify-content: center; + align-items: center; + border-radius: 0.4rem 0 0 0.4rem; + background: var(--Dark-Blue-Grey); + z-index: 9; + right: 0; +} +.products-next svg { + width: 1.6rem; + height: auto; +} +.products-mob { + display: none; +} + +@media screen and (max-width: 992px) { + .products-mob { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1rem; + } + .products { + margin-bottom: 9.6rem; + } + .products-container { + gap: 4rem; + } + .products-slider { + display: none; + } + .product_item-img { + height: 16rem; + min-height: 16rem; + } + .product_item-labels { + left: 0.8rem; + top: 0.8rem; + } + .product_item-popular { + padding: 0.6rem 0.8rem; + font-size: 0.8rem; + letter-spacing: -0.016rem; + } + .product_item-discount { + padding: 0.6rem 0.8rem; + font-size: 0.8rem; + letter-spacing: -0.016rem; + } + .product_item-sale { + padding: 0.6rem 0.8rem; + } + .product_item-sale svg { + width: 0.8rem; + } + .product_item-sale p { + font-size: 0.8rem; + letter-spacing: -0.016rem; + } + .product_item-main { + padding: 1.6rem; + gap: 0.8rem; + } + .product_item-title { + font-size: 1.1rem; + } + .product_item-chars { + padding-left: 2rem; + } + .product_item-chars li { + font-size: 0.8rem; + letter-spacing: -0.016rem; + } + .product_item-meta { + gap: 0.6rem; + margin: 0.8rem 0 1.2rem 0; + } + .product_item-prices { + gap: 0.4rem; + } + .product_item-price { + font-size: 1rem; + } + .product_item-oldprice { + font-size: 0.8rem; + } + .product_item-price_weight { + gap: 0.4rem; + } + .product_item-price_weight-new { + font-size: 1rem; + letter-spacing: -0.02rem; + } + .product_item-price_weight-old { + font-size: 0.8rem; + } + .product_item-link { + padding: 1.2rem 1.7rem; + font-size: 1rem; + letter-spacing: -0.02rem; + } +} + +/* about */ + +.about { + margin-bottom: 14.4rem; +} +.about-container { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1.6rem; +} +.about-container > img { + width: 100%; + border-radius: 0.6rem; + object-fit: cover; +} +.about-main { + display: flex; + flex-direction: column; + padding: 4rem; + align-items: flex-start; + border-radius: 0.6rem; + justify-content: center; + background: var(--White); + gap: 1.6rem; +} +.about-main h2 { + margin-bottom: 1.6rem; +} +.about-subtitle { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + text-transform: uppercase; +} +.about-description { + margin-bottom: 1.6rem; + color: var(--Grey-2); + font-size: 1.8rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.link-more { + display: flex; + align-items: flex-start; + gap: 0.6rem; + color: var(--Blue); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.link-more svg { + width: 2rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .about { + margin-bottom: 9.6rem; + } + .about-container { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .about-container > img { + height: 34rem; + order: 2; + } + .about-main { + padding: 4rem 1.6rem; + } + .about-main h2 { + margin-bottom: 0.8rem; + } + .about-subtitle { + font-size: 1.4rem; + } + .about-description { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .link-more { + gap: 0.4rem; + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .link-more svg { + width: 1.6rem; + } +} + +/* header */ + +.why { + margin-bottom: 14.4rem; +} +.why-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.why-main { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1.6rem; +} +.why-item { + padding: 2.4rem; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1.6rem; + border-radius: 0.6rem; + background: var(--Dark-Blue-Grey); +} +.why-item h3 { + color: var(--White); + font-size: 2.2rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + text-transform: uppercase; +} +.why-item p { + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} + +@media screen and (max-width: 992px) { + .why { + margin-bottom: 9.6rem; + } + .why-container { + gap: 4rem; + } + .why-main { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .why-item { + padding: 1.6rem; + gap: 1.2rem; + } + .why-item h3 { + font-size: 2rem; + } + .why-item p { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } +} + +/* info */ + +.info { + margin-bottom: 14.4rem; +} +.info-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.info-main { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 2rem; +} +.info-item { + border-radius: 0.6rem; + background: var(--White); + display: flex; + padding: 2.4rem; + flex-direction: column; + align-items: flex-start; + gap: 1.6rem; +} +.info-item img { + height: 4.8rem; + margin-bottom: 2.4rem; +} +.info-item h3 { + color: var(--Black); + font-size: 2.2rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + text-transform: uppercase; +} +.info-item p { + margin-bottom: 4.8rem; + color: var(--Grey-2); + font-size: 1.8rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} + +@media screen and (max-width: 992px) { + .info { + margin-bottom: 9.6rem; + } + .info-container { + gap: 4rem; + } + .info-main { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .info-item { + padding: 3.2rem 1.6rem; + } + .info-item img { + margin-bottom: 0.4rem; + } + .info-item h3 { + font-size: 1.6rem; + } + .info-item p { + margin-bottom: 1.6rem; + font-size: 1.4rem; + letter-spacing: -0.028rem; + } +} + +/* consult */ + +.consult { + margin-bottom: 6.4rem; +} +.consult h2 { + text-align: left; +} +.consult-main { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1.6rem; + padding: 6.4rem; + border-radius: 0.8rem; + background: var(--Light-Blue); +} +.consult-name { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 2.4rem; +} +.consult-name p { + color: var(--Grey-2); + font-size: 1.8rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.consult-form { + display: flex; + flex-direction: column; + gap: 0.6rem; +} +.consult-form input[type="text"], .consult-form input[type="tel"], .consult-form input[type="email"] { + padding: 1.9rem 0.4rem 1.9rem 2rem; + border-radius: 0.6rem; + background: var(--White); + color: var(--Blue); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + width: 100%; + border: 1px solid transparent; +} +.consult-form input[type="text"]::placeholder, .consult-form input[type="tel"]::placeholder, .consult-form input[type="email"]::placeholder { + color: var(--Grey-2); +} +.consult-form__row { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 0.6rem; +} +.consult-checkbox { + margin: 1rem 0; + display: flex; + align-items: center; + position: relative; +} +.consult-checkbox label { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 500; + line-height: 140%; + letter-spacing: -0.024rem; + cursor: pointer; + padding-left: 2.2rem; +} +.consult-checkbox label a { + text-decoration: underline; + color: var(--Grey-2); +} +.consult-checkbox input[type=checkbox]:before { + content: ""; + display: inline-block; + width: 1.6rem; + height: 1.6rem; + border-radius: 0.2rem; + border: 0.1rem solid var(--Blue); + position: absolute; + margin-top: -0.8rem; + background-color: var(--White); + cursor: pointer; +} +.consult-checkbox input[type=checkbox]:checked:before { + background:transparent; + background-image: url('/wp-content/uploads/2025/05/chek.svg'); + background-repeat: no-repeat; + background-position: center; + position: absolute; + background-size: cover; +}​ + .consult-checkbox input[type="checkbox"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: none; + } +.consult-checkbox input[type="checkbox"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-image: none; +} +.consult-checkbox input[type="checkbox"]:checked { + background-image: none; +} +.consult-submit { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + margin-right: auto; +} + +@media screen and (max-width: 992px) { + .consult { + margin-bottom: 4.8rem; + } + .consult-main { + grid-template-columns: repeat(1, 1fr); + gap: 2.4rem; + padding: 4rem 2.4rem; + } + .consult-name { + gap: 1.6rem; + } + .consult-name p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + max-width: 21rem; + } + .consult-form input[type="text"], .consult-form input[type="tel"], .consult-form input[type="email"] { + padding: 1.6rem 1.8rem; + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .consult-form__row { + grid-template-columns: repeat(1, 1fr); + } + .consult-submit { + width: 100%; + } +} + +/* footer */ + +footer { + background: var(--Blue-Black); + padding: 6.4rem 0 4rem 0; +} +.footer-container { + display: flex; + flex-direction: column; + gap: 4.8rem; +} +.footer-main { + display: grid; + grid-template-columns: repeat(5, 1fr); + gap: 1.6rem; + align-items: flex-start; +} +.footer-col { + display: flex; + flex-direction: column; + gap: 3.2rem; + align-items: flex-start; +} +.footer-logo { + display: flex; + width: 18.2rem; +} +.footer-logo img { + width: 100%; +} +.footer-address { + display: flex; + align-items: flex-start; + gap: 0.6rem; +} +.footer-address svg { + width: 1.6rem; + min-width: 1.6rem; + height: auto; +} +.footer-address p, .footer-address a { + color: var(--Light-Blue-Grey); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.028rem; + max-width: 16.2rem; +} +.footer-menu { + display: flex; + flex-direction: column; + gap: 2rem; + align-items: flex-start; +} +.footer-menu__title { + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.footer-menu ul { + display: flex; + flex-direction: column; + gap: 1.6rem; + align-items: flex-start; +} +.footer-menu ul li { + display: flex; + list-style: none; +} +.footer-menu ul li a { + color: var(--Light-Blue-Grey); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.028rem; +} +.footer-contacts { + display: flex; + flex-direction: column; + gap: 3.2rem; + align-items: flex-start; +} +.footer-contacts__col { + display: flex; + flex-direction: column; + gap: 2.4rem; + align-items: flex-start; +} +.footer-contacts__item { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.8rem; +} +.footer-contacts__item a { + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.footer-contacts__item p { + color: var(--Blue-Grey); + font-size: 1.2rem; + font-style: normal; + font-weight: 500; + line-height: 120%; + letter-spacing: -0.024rem; +} +.footer-contacts__payment { + display: flex; + flex-direction: column; + gap: 1.6rem; + align-items: flex-start; +} +.footer-contacts__payment p { + color: var(--Light-Blue-Grey); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; /* 1.44rem */ + letter-spacing: -0.024rem; +} +.footer-contacts__payment-row { + display: flex; + max-width: 12.2rem; + align-items: center; + align-content: center; + gap: 1.6rem 0.8rem; + flex-wrap: wrap; +} +.footer-contacts__payment-row img { + max-width: 100%; +} +.footer-contacts__payment-row img:nth-child(1) { + width: 5.6rem; +} +.footer-contacts__payment-row img:nth-child(2) { + width: 4.8rem; +} +.footer-contacts__payment-row img:nth-child(3) { + width: 4rem; +} +.footer-button { + display: flex; +} +.footer-callback { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.footer-copyright { + display: flex; + align-items: center; + padding-top: 1.7rem; + gap: 1.6rem; + border-top: 1px solid var(--Dark-Blue-Grey); +} +.footer-copyright > p { + width: 100%; + max-width: 53.4rem; + color: var(--Blue-Grey); + font-size: 1.2rem; + font-style: normal; + font-weight: 500; + line-height: 120%; + letter-spacing: -0.024rem; +} +.footer-copyright > a { + width: 100%; + max-width: 25.9rem; + display: flex; + justify-content: flex-end; + align-items: center; + gap: 0.8rem; + color: var(--White); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.footer-copyright > a img { + width: 5.6rem; +} +.footer-copyright__row { + width: 100%; + max-width: 52rem; + display: flex; + align-items: center; + gap: 1.6rem; +} +.footer-copyright__row a { + color: var(--Blue-Grey); + font-size: 1.2rem; + font-style: normal; + font-weight: 500; + line-height: 120%; + letter-spacing: -0.024rem; + width: 100%; +} + +@media screen and (max-width: 992px) { + footer { + padding: 4rem 0; + } + .footer-container { + gap: 4rem; + } + .footer-main { + display: flex; + flex-wrap: wrap; + gap: 4rem 1rem; + } + .footer-col { + width: 100%; + gap: 1.6rem; + } + .footer-logo { + width: 14.3rem; + } + .footer-address { + align-items: center; + } + .footer-address svg { + width: 1.6rem; + min-width: 1.6rem; + } + .footer-address p, .footer-address a { + font-size: 1.2rem; + letter-spacing: -0.024rem; + max-width: none; + } + .footer-menu { + gap: 1.6rem; + width: 100%; + max-width: calc(50% - 1rem); + } + .footer-menu__title { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .footer-menu ul { + gap: 1.2rem; + } + .footer-menu ul li a { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .footer-contacts { + width: 100%; + } + .footer-contacts__payment-row { + max-width: none; + gap: 0.8rem; + } + .footer-copyright { + flex-direction: column; + align-items: flex-start; + } + .footer-copyright > p { + width: auto; + max-width: none; + } + .footer-copyright > a { + width: auto; + max-width: none; + justify-content: flex-start; + } + .footer-copyright__row { + width: auto; + max-width: none; + flex-direction: column; + align-items: flex-start; + } + .footer-copyright__row a { + width: auto; + } +} + +/* breadcumbs */ + +.breadcumbs { + margin-top: 4.8rem; + margin-bottom: 6.4rem; +} +.breadcumbs ul { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.6rem; +} +.breadcumbs ul li { + display: flex; + list-style: none; +} +.breadcumbs ul li a { + color: var(--Blue); + font-size: 1.4rem; + font-style: normal; + font-weight: 500; + line-height: 120%; + letter-spacing: -0.028rem; +} +.breadcumbs ul li p { + color: var(--Grey-1); + font-size: 1.4rem; + font-style: normal; + font-weight: 500; + line-height: 120%; + letter-spacing: -0.028rem; +} +.breadcumbs ul li p.breadcumbs-separator { + color: var(--Blue); +} +.categories_page h2 { + text-align: left; +} + +@media screen and (max-width: 992px) { + .breadcumbs { + margin-top: 3.2rem; + margin-bottom: 4.8rem; + } + .breadcumbs ul li a { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .breadcumbs ul li p { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } +} + +/* catalog_page */ + +.catalog_page { + margin-bottom: 14.4rem; +} +.catalog_page-container { + display: flex; + gap: 1.6rem; + align-items: flex-start; +} +.catalog_page-menu { + width: 100%; + max-width: 32.8rem; + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.catalog_page-menu__col { + display: flex; + flex-direction: column; +} +.catalog_page-menu__item { + display: flex; + flex-direction: column; + border-bottom: 1px solid var(--Light-Grey); + background: var(--White); +} +.catalog_page-menu__item-button { + display: flex; + align-items: center; + gap: 1.2rem; + padding: 1.2rem; +} +.catalog_page-menu__item-button__img { + width: 3.6rem; + min-width: 3.6rem; +} +.catalog_page-menu__item-button__img img { + width: 100%; +} +.catalog_page-menu__item-row { + display: flex; + align-items: center; + gap: 1.2rem; + justify-content: space-between; + width: 100%; +} +.catalog_page-menu__item-row a { + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.catalog_page-menu__item-button__icon { + display: flex; +} +.catalog_page-menu__item-button__icon svg { + width: 1.2rem; + height: auto; + transition: .3s all; +} +.catalog_page-menu__item-content { + position: relative; + max-height: 0; + overflow: hidden; + padding: 0 1.2rem; + display: flex; + flex-direction: column; + gap: 0.8rem; + transition: .3s all; +} +.catalog_page-menu__item-content-item { + padding-left: 4.8rem; + display: flex; + flex-direction: column; +} +.catalog_page-menu__item-content-item-row { + display: flex; + align-items: center; + gap: 1.2rem; + justify-content: space-between; +} +.catalog_page-menu__item-content-item-row a { + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.catalog_page-menu__item-content-item-icon { + display: flex; +} +.catalog_page-menu__item-content-item-icon svg { + width: 1.2rem; + height: auto; + transition: .3s all; +} +.catalog_page-menu__item-content-item-content { + position: relative; + max-height: 0; + overflow: hidden; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1.2rem; + padding-left: 0.8rem; +} +.catalog_page-menu__item-content-item-content a { + color: var(--Light-Blue-Grey); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.catalog_page-menu__item.active .catalog_page-menu__item-content { + overflow: visible; + max-height: 100% !important; + margin-bottom: 2rem; +} +.catalog_page-menu__item-content-item.active .catalog_page-menu__item-content-item-content { + margin-top: 1.2rem; +} +.catalog_page-menu__item.active .catalog_page-menu__item-button__icon svg { + transform: rotate(180deg); +} +.catalog_page-menu__item.active .catalog_page-menu__item-button__icon svg path { + fill: var(--Blue); +} +.catalog_page-menu__item.active .catalog_page-menu__item-row a { + color: var(--Blue); +} +.catalog_page-menu__item-content-item.active .catalog_page-menu__item-content-item-icon svg { + transform: rotate(180deg); +} +.catalog_page-menu__item-content-item.active .catalog_page-menu__item-content-item-icon svg path { + fill: var(--Blue); +} +.catalog_page-menu__item-content-item.active .catalog_page-menu__item-content-item-row a { + color: var(--Blue); +} +.catalog_page-menu__item-content-item-content a.active { + color: var(--Blue); +} +.catalog_page-menu__item-content-item.active .catalog_page-menu__item-content-item-content { + overflow: visible; + max-height: 100% !important; +} +.catalog_page-main { + width: 100%; + max-width: 101.6rem; + display: flex; + flex-direction: column; + gap: 4rem; +} +.catalog_page-col { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.catalog_page-item { + display: flex; + border-radius: 0.6rem; + background: var(--White); + position: relative; + overflow: hidden; +} +.catalog_page-item__img { + width: 100%; + max-width: 44.3rem; + display: flex; +} +.catalog_page-item__img img { + width: 100%; + height: 100%; + object-fit: cover; +} +.catalog_page-item__main { + display: flex; + padding: 4rem; + flex-direction: column; + align-items: flex-start; + gap: 1.6rem; + width: 100%; + max-width: 57.3rem; + justify-content: center; +} +.catalog_page-item__title { + font-size: 2.2rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + text-transform: uppercase; +} +.catalog_page-item__main p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; +} +.catalog_page-item__main .link-more { + margin-top: 3.2rem; +} +.catalog_page-products { + display: flex; + flex-direction: column; + gap: 3.2rem; +} +.catalog_page-products > .woocommerce-pagination { + display: none; +} +/* Переключатель вида каталога */ +/* Заголовок каталога с кнопками переключения вида */ +.catalog_page-header { + display: flex; + justify-content: space-between; + align-items: center; +} +.catalog_page-header h1 { + margin: 0; +} +.catalog_page-view-toggle { + display: flex; + gap: 0.8rem; +} +.catalog_page-view-btn { + display: flex; + align-items: center; + justify-content: center; + width: 3.6rem; + height: 3.6rem; + border: 1px solid #C4C4C4; + border-radius: 0.8rem; + background: transparent; + color: #808080; + cursor: pointer; + transition: all 0.2s; +} +.catalog_page-view-btn:hover { + border-color: var(--Blue); + color: var(--Blue); +} +.catalog_page-view-btn.active { + border-color: var(--Blue); + background: var(--Blue); + color: #fff; +} +/* Компактный вид — скрываем характеристики */ +.catalog_page-products__grid.view-compact .product_item-chars { + display: none; +} +.catalog_page-products__grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1.6rem; +} +.catalog_page-products__bottom { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.catalog_page-count { + margin-left: auto; + display: flex; + align-items: center; + gap: 0.4rem; + position: relative; +} +.catalog_page-count > p { + color: var(--Grey-1); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.catalog_page-count__button { + display: flex; + padding: 0.8rem; + align-items: center; + gap: 0.8rem; + border-radius: 0.4rem; +} +.catalog_page-count__button p { + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.catalog_page-count__button svg { + width: 1.2rem; + height: auto; + transition: .3s all; +} +.catalog_page-count__content { + position: absolute; + top: 100%; + margin-top: 0.4rem; + right: 0; + border-radius: 0.4rem; + border: 1px solid var(--Blue); + background: var(--White); + box-shadow: 1px 4px 16px 0px rgba(0, 0, 0, 0.10); + width: 100%; + max-width: 13.8rem; + display: none; + flex-direction: column; + gap: 0.4rem; + padding: 2rem; +} +.catalog_page-count__content-button { + display: flex; + border-radius: 0.4rem; + background: var(--Light-Blue, #EBF0F2); + padding: 1.5rem 2rem; + align-items: center; + justify-content: space-between; +} +.catalog_page-count__content-button p { + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.catalog_page-count__content-button svg { + opacity: 0; + transition: .3s all; + width: 1.6rem; + height: auto; +} +.catalog_page-count__content-button.active svg { + opacity: 1; +} +.catalog_page-count__content.active { + display: flex; +} +.catalog_page-count__button.active svg { + transform: rotate(180deg); +} +.catalog_page-pagination { + display: flex; + flex-direction: column; + align-items: center; + gap: 2.4rem; +} +.catalog_page-pagination__row { + display: flex; + gap: 0.4rem; +} +.catalog_page-pagination__row .nav-links { + display: flex; + align-items: center; + gap: 0.4rem; +} +.catalog_page-pagination__row .page-numbers { + width: 4.8rem; + height: 4.8rem; + display: flex; + justify-content: center; + align-items: center; + border-radius: 0.4rem; + border: 1px solid var(--Light-Grey-2); + background: var(--White); + color: var(--Blue); + text-align: center; + font-size: 1.6rem; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + text-decoration: none; +} +.catalog_page-pagination__row .page-numbers.current { + color: var(--White); + background: var(--Blue); + border-color: var(--Blue); +} +.catalog_page-pagination__row .page-numbers svg { + width: 1.6rem; + height: auto; +} +.catalog_page-pagination__row .page-numbers:hover { + border-color: var(--Blue); +} +.catalog_page-pagination-item { + width: 4.8rem; + height: 4.8rem; + display: flex; + justify-content: center; + align-items: center; + border-radius: 0.4rem; + border: 1px solid var(--Light-Grey-2); + background: var(--White); + color: var(--Blue); + text-align: center; + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.catalog_page-pagination-item svg { + width: 1.6rem; + height: auto; +} +.catalog_page-pagination-item.active { + color: var(--White); + background: var(--Blue); + border-color: var(--Blue); +} +.catalog_page-pagination > p { + color: var(--Grey-2); + text-align: center; + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.catalog_page-pagination > p span { + color: var(--Grey-1); +} + +@media screen and (max-width: 992px) { + .catalog_page { + margin-bottom: 9.6rem; + } + .catalog_page-menu { + display: none; + } + .catalog_page-main { + gap: 4rem; + } + .catalog_page-col { + gap: 1rem; + } + .catalog_page-item { + flex-direction: column; + } + .catalog_page-item__img { + max-width: none; + height: 16rem; + } + .catalog_page-item__main { + padding: 2.4rem; + gap: 1.2rem; + max-width: none; + } + .catalog_page-item__title { + font-size: 2rem; + } + .catalog_page-item__main .link-more { + margin-top: 2.8rem; + gap: 0.6rem; + font-size: 1.6rem; + letter-spacing: -0.032rem; + } + .catalog_page-item__main .link-more svg { + width: 2rem; + } + .catalog_page-products { + gap: 2.4rem; + } + .catalog_page-products__grid { + grid-template-columns: repeat(2, 1fr); + gap: 1rem; + } + .catalog_page-products__bottom { + gap: 2.4rem; + } + .catalog_page-count { + margin-right: auto; + } +} + +/* catalog_page-search */ + +.catalog_page-search { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.catalog_page-search .header-search input { + height: 7.2rem; + padding: 0.4rem 12.6rem 0.4rem 2.4rem; + color: var(--Black); + background: var(--White); + font-size: 1.6rem; + letter-spacing: -0.032rem; + line-height: 120%; +} +.catalog_page-search .header-search input::placeholder { + color: var(--Grey-2); +} +.catalog_page-search .header-search__submit { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + gap: 0.8rem; + font-size: 1.6rem; + letter-spacing: -0.032rem; +} +.catalog_page-search .header-search__submit svg { + width: 1.6rem; +} +.catalog_page-search-hint { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.6rem; + background: var(--Light-Blue-2); +} +.catalog_page-search-hint p { + color: var(--Dark-Blue); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.catalog_page-search-hint.error { + background: var(--Light-red); +} +.catalog_page-search-hint.error p { + color: var(--Red); +} +.catalog_page-search-count { + margin: 0.8rem 0 4.8rem 0; + color: var(--Grey-1); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} + +@media screen and (max-width: 992px) { + .catalog_page-search { + gap: 1rem; + } + .catalog_page-search .header-search input { + padding: 0.4rem 6.8rem 0.4rem 2.4rem; + } + .catalog_page-search .header-search__submit { + padding: 2.4rem; + } + .catalog_page-search-hint { + padding: 2.4rem 1.6rem; + } + .catalog_page-search-hint p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .catalog_page-search-count { + margin: 0.6rem 0 3rem 0; + font-size: 1.4rem; + letter-spacing: -0.028rem; + } +} + +/* documentation */ + +.documentation { + margin-bottom: 14.4rem; +} +.documentation-container { + display: flex; + flex-direction: column; + gap: 4rem; +} +.documentation-main { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.documentation-tabs { + display: flex; + flex-wrap: wrap; + gap: 1.2rem; +} +.documentation-tab { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Light-Blue); + color: var(--Black); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.documentation-tab.active { + background: var(--Blue); + color: var(--White); +} +.documentation-content { + display: none; +} +.documentation-content.active { + display: flex; + flex-direction: column; + gap: 3.2rem; +} +.documentation-content > h2 { + text-align: left; + text-transform: none; +} +.documentation-col { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.documentation-items { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1.6rem; +} +.documentation-item { + display: flex; + padding: 1.6rem 2.4rem; + align-items: center; + gap: 1.6rem; + border-radius: 0.4rem; + background: var(--White); +} +.documentation-item.hidden { + display: none; +} +.documentation-item__title { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + text-transform: uppercase; + width: 100%; +} +.documentation-item__row { + display: flex; + align-items: center; + gap: 1.2rem; +} +.documentation-item__info { + display: flex; + align-items: center; + gap: 0.4rem; +} +.documentation-item__info p { + color: var(--Grey); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + white-space: nowrap; +} +.documentation-item__download { + display: flex; + width: 4.8rem; + min-width: 4.8rem; + height: 4.8rem; + justify-content: center; + align-items: center; + border-radius: 0.4rem; + border: 1px solid var(--Blue); +} +.documentation-item__download svg { + width: 1.6rem; + height: auto; +} +.documentation-item:hover { + background: var(--Blue); +} +.documentation-item:hover .documentation-item__title { + color: var(--White); +} +.documentation-item:hover .documentation-item__info p { + color: var(--White); +} +.documentation-item:hover .documentation-item__download { + background: var(--White); +} +.documentation-mob { + display: none; +} +.documentation-item__mob { + display: none; +} + +@media screen and (max-width: 992px) { + .documentation { + margin-bottom: 9.6rem; + } + .documentation-container { + gap: 2.4rem; + } + .documentation-main { + gap: 4rem; + } + .documentation-tabs { + display: none; + } + .documentation-content.active { + gap: 2.4rem; + } + .documentation-col { + gap: 4rem; + } + .documentation-items { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .documentation-item { + padding: 1.6rem; + } + .documentation-item__title { + font-size: 1.2rem; + width: auto; + display: none; + } + .documentation-item__info { + display: none; + gap: 0.2rem; + } + .documentation-item__info p { + font-size: 1.2rem; + line-height: 130%; + letter-spacing: -0.024rem; + } + .documentation-mob { + display: flex; + flex-direction: column; + position: relative; + } + .documentation-item__mob { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.8rem; + } + .documentation-item__mob .documentation-item__title { + display: block; + } + .documentation-item__mob .documentation-item__info { + display: flex; + } + .documentation-mob__button { + display: flex; + padding: 1.9rem 2rem 2rem 2rem; + align-items: center; + gap: 0.8rem; + justify-content: space-between; + border-radius: 0.4rem; + background: var(--White); + } + .documentation-mob__button p { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + } + .documentation-mob__button svg { + width: 1.6rem; + height: auto; + transition: .3s all; + } + .documentation-mob__content { + position: absolute; + top: 100%; + margin-top: 0.8rem; + z-index: 4; + display: none; + flex-direction: column; + width: 100%; + gap: 0.4rem; + border-radius: 0.4rem; + border: 1px solid var(--Blue); + background: var(--White); + box-shadow: 1px 4px 16px 0px rgba(0, 0, 0, 0.10); + padding: 2rem; + } + .documentation-mob__item { + padding: 1.5rem 2rem; + display: flex; + align-items: center; + justify-content: space-between; + border-radius: 0.4rem; + background: var(--Light-Blue); + } + .documentation-mob__item p { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + } + .documentation-mob__item svg { + width: 1.6rem; + height: auto; + opacity: 0; + transition: .3s all; + } + .documentation-mob__item.active svg { + opacity: 1; + } + .documentation-mob__content.active { + display: flex; + } + .documentation-mob__button.active { + background: var(--Blue); + } + .documentation-mob__button.active p { + color: var(--White); + } + .documentation-mob__button.active svg { + transform: rotate(180deg); + } + .documentation-mob__button.active svg path { + fill: var(--White); + } +} + +/* contacts */ + +.contacts { + margin-bottom: 14.4rem; +} +.contacts-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.contacts-main { + display: flex; + flex-direction: column; + gap: 4.2rem; +} +.contacts-grid { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.contacts-row { + display: flex; + gap: 1.6rem; +} +.contacts-row2 { + display: flex; + gap: 1rem; +} +.contacts-item { + width: 100%; + border-radius: 0.8rem; + background: var(--White); + padding: 3.2rem; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1.6rem; + border: 1px solid transparent; +} +.contacts-item:hover { + border-color: var(--Blue); +} +.contacts-item > p { + color: var(--Grey-1); + font-size: 1.2rem; + font-style: normal; + font-weight: 400; + line-height: 120%; + letter-spacing: -0.024rem; +} +.contacts-item__row { + display: flex; + align-items: flex-start; + gap: 0.8rem; +} +.contacts-item__row > img { + width: 1.6rem; + min-width: 1.6rem; + margin-top: 0.4rem; +} +.contacts-item__col { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.8rem; +} +.contacts-item__col > a { + font-size: 1.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + letter-spacing: -0.036rem; +} +.contacts-item__col > p { + color: var(--Blue-Grey); + font-size: 1.2rem; + font-style: normal; + font-weight: 400; + line-height: 120%; + letter-spacing: -0.024rem; +} +.contacts-time { + display: flex; + flex-direction: column; + align-items: flex-start; +} +.contacts-time p { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + letter-spacing: -0.036rem; +} +.contacts-time p br { + display: none; +} +.contacts-time p span { + color: var(--Blue); +} +.contacts-map { + width: 100%; + height: 54rem; +} +.contacts-map iframe { + width: 100%; + height: 100%; + border-radius: 0.8rem; +} +.contacts-row .contacts-item:nth-child(1), .contacts-row .contacts-item:nth-child(2) { + max-width: 32.8rem; +} +.contacts-item__col > a.link-more { + color: var(--Blue); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; + margin-top: 0.8rem; +} +.contacts-item__col > a.link-more svg { + width: 1.6rem; +} +.contacts-address p { + font-size: 1.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + letter-spacing: -0.036rem; +} + +@media screen and (max-width: 992px) { + .contacts { + margin-bottom: 9.6rem; + } + .contacts-container { + gap: 4rem; + } + .contacts-main { + gap: 1rem; + } + .contacts-grid { + gap: 1rem; + } + .contacts-row { + flex-direction: column; + gap: 1rem; + } + .contacts-row2 { + flex-direction: column; + } + .contacts-item { + padding: 2.4rem; + } + .contacts-item__row > img { + margin-top: 0.2rem; + } + .contacts-item__col > a { + font-size: 1.6rem; + letter-spacing: -0.032rem; + } + .contacts-time p { + font-size: 1.6rem; + letter-spacing: -0.032rem; + } + .contacts-time p br { + display: block; + } + .contacts-map { + height: 34rem; + } + .contacts-row .contacts-item:nth-child(1), .contacts-row .contacts-item:nth-child(2) { + max-width: none; + } + .contacts-address p { + font-size: 1.6rem; + letter-spacing: -0.032rem; + } +} + +/* aboutus */ + +.aboutus { + margin-bottom: 14.4rem; +} +.aboutus-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.aboutus-main { + display: flex; + gap: 1.6rem; +} +.aboutus-main > img { + width: 100%; + max-width: 44.3rem; + border-radius: 0.6rem; + object-fit: cover; +} +.aboutus-col { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 3.2rem; + width: 100%; + max-width: 90.1rem; + border-radius: 0.6rem; + background: var(--White); + padding: 6.4rem 4rem; +} +.aboutus-col > p { + color: var(--Grey-2); + font-size: 1.8rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.aboutus-link { + display: flex; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: center; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.aboutus-link svg { + width: 1.8rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .aboutus { + margin-bottom: 9.6rem; + } + .aboutus-container { + gap: 4rem; + } + .aboutus-main { + flex-direction: column; + gap: 1rem; + } + .aboutus-main > img { + height: 34rem; + max-width: none; + } + .aboutus-col { + gap: 2rem; + padding: 3.2rem 1.6rem 1.6rem 1.6rem; + } + .aboutus-col > p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .aboutus-link { + width: 100%; + } +} + +/* partners */ + +.partners { + margin-bottom: 14.4rem; +} +.partners-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.partners-slider { + position: relative; + align-items: center; + display: flex; +} +.partners-swiper { + width: 100%; +} +.partners-swiper .swiper-wrapper { + padding-left: 4rem; +} +.partners-swiper .swiper-slide { + height: auto; +} +.partners-slide { + height: 100%; + display: flex; + flex-direction: column; + gap: 2rem; + border-radius: 0.8rem; + background: var(--White); + padding: 3.2rem; +} +.partners-slide__title { + color: var(--Grey-1); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.partners-slide__img { + display: flex; + padding: 2.4rem; + justify-content: center; + align-items: center; + border-radius: 0.6rem; + border: 1px solid var(--Light-Grey-3); + height: 15.8rem; +} +.partners-slide__img img { + max-width: 100%; + max-height: 80%; + object-fit: contain; +} +.partners-prev { + position: absolute; + left: 4rem; + z-index: 9; + width: 4rem; + height: 4rem; + display: flex; + justify-content: center; + align-items: center; + border-radius: 0 0.4rem 0.4rem 0; + background: var(--Blue-Black); + margin-top: -2rem; +} +.partners-next { + position: absolute; + right: 4rem; + z-index: 9; + width: 4rem; + height: 4rem; + display: flex; + justify-content: center; + align-items: center; + border-radius: 0.4rem 0 0 0.4rem; + background: var(--Blue-Black); + margin-top: -2rem; +} +.partners-prev svg { + width: 1.6rem; + height: auto; +} +.partners-next svg { + width: 1.6rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .partners { + margin-bottom: 9.6rem; + } + .partners-container { + gap: 4rem; + } + .partners-slider { + flex-direction: column; + gap: 2.4rem; + } + .partners-swiper .swiper-wrapper { + padding-left: 1rem; + } + .partners-slide { + gap: 1.6rem; + padding: 2.4rem 1.6rem 1.6rem 1.6rem; + } + .partners-slide__img { + height: 22rem; + } + .partners-slide__img img { + max-height: 50%; + } + .partners-navigation { + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; + } + .partners-prev { + position: relative; + left: 0; + width: 4rem; + height: 4rem; + border-radius: 0.4rem; + margin-top: 0; + } + .partners-next { + position: relative; + right: 0; + width: 4rem; + height: 4rem; + border-radius: 0.4rem; + margin-top: 0; + } +} + +/* history */ + +.history { + margin-bottom: 14.4rem; +} +.history-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.history-container > h2 br { + display: none; +} +.history-slider { + display: flex; + align-items: center; + position: relative; +} +.history-swiper { + width: 100%; +} +.history-swiper .swiper-slide { + height: auto; +} +.history-slide { + height: 100%; + display: flex; + gap: 3.2rem; + border-radius: 0.8rem; + background: var(--White); + padding: 6.4rem 11.5rem; +} +.history-slide > img { + width: 100%; + max-width: 44.2rem; + object-fit: cover; + border-radius: 0.6rem; + min-height: 40.1rem; +} +.history-slide__col { + width: 100%; + max-width: 65.6rem; + display: flex; + flex-direction: column; + gap: 1.6rem; + align-items: flex-start; +} +.history-slide__col h2 { + text-align: left; + color: var(--Blue); + margin-bottom: 1.6rem; +} +.history-slide__col h4 { + font-size: 1.8rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + text-transform: uppercase; +} +.history-slide__col p { + color: var(--Grey-2); + font-size: 1.8rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.history-prev { + position: absolute; + left: 0; + z-index: 9; + display: flex; + width: 4rem; + height: 4rem; + justify-content: center; + align-items: center; + border-radius: 0rem 0.4rem 0.4rem 0rem; + background: var(--Blue-Black); +} +.history-next { + position: absolute; + right: 0; + z-index: 9; + display: flex; + width: 4rem; + height: 4rem; + justify-content: center; + align-items: center; + border-radius: 0.4rem 0rem 0rem 0.4rem; + background: var(--Blue-Black); +} +.history-prev svg { + width: 1.6rem; + height: auto; +} +.history-next svg { + width: 1.6rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .history { + margin-bottom: 9.6rem; + } + .history-container { + gap: 4rem; + } + .history-slider { + flex-direction: column; + gap: 2.4rem; + } + .history-slide { + flex-direction: column-reverse; + gap: 2.4rem; + padding: 3.2rem 1.6rem 1.6rem 1.6rem; + } + .history-slide > img { + max-width: none; + height: 30.8rem; + min-height: 30.8rem; + } + .history-slide__col { + max-width: none; + } + .history-slide__col h2 { + font-size: 2rem; + margin-bottom: 0.4rem; + } + .history-slide__col h4 { + font-size: 1.6rem; + } + .history-slide__col p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .history-prev { + position: relative; + border-radius: 0.4rem; + } + .history-next { + position: relative; + border-radius: 0.4rem; + } + .history-navigation { + display: flex; + justify-content: center; + align-items: center; + gap: 1rem; + } + .history-container > h2 br { + display: block; + } +} + +/* projects */ + +.projects { + margin-bottom: 14.4rem; +} +.projects-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.projects-main { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.projects-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1.6rem; +} +.projects-item { + display: flex; + flex-direction: column; + border-radius: 0.6rem; + position: relative; + overflow: hidden; + background: var(--White); +} +.projects-item.hidden { + display: none; +} +.projects-item > img { + width: 100%; + height: 24rem; + object-fit: cover; +} +.projects-item__main { + display: flex; + padding: 2.4rem; + flex-direction: column; + align-items: flex-start; + gap: 1.6rem; +} +.projects-item__main > p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; +} +.projects-item__row { + display: flex; + flex-wrap: wrap; + gap: 0.6rem; +} +.projects-item__row p { + border-radius: 0.4rem; + background: var(--Light-Grey); + padding: 0.8rem 1.2rem; + color: var(--Blue); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.projects-more { + display: flex; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: center; + gap: 0.8rem; + border-radius: 0.4rem; + background: var(--Blue); + margin: 0 auto; +} +.projects-more p { + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.projects-more svg { + width: 1.6rem; + height: auto; +} +.projects-slider { + display: none; +} + +@media screen and (max-width: 992px) { + .projects { + margin-bottom: 9.6rem; + } + .projects-container { + gap: 4rem; + } + .projects-main { + display: none; + } + .projects-slider { + display: flex; + flex-direction: column; + gap: 2.4rem; + } + .projects-navigation { + display: flex; + justify-content: center; + align-items: center; + gap: 1rem; + } + .projects-swiper { + width: 100%; + } + .projects-swiper .swiper-slide { + height: auto; + } + .projects-prev { + display: flex; + width: 4rem; + height: 4rem; + justify-content: center; + align-items: center; + border-radius: 0.4rem; + background: var(--Blue-Black); + } + .projects-prev svg { + width: 1.6rem; + height: auto; + } + .projects-next { + display: flex; + width: 4rem; + height: 4rem; + justify-content: center; + align-items: center; + border-radius: 0.4rem; + background: var(--Blue-Black); + } + .projects-next svg { + width: 1.6rem; + height: auto; + } + .projects-item { + height: 100%; + } + .projects-item > img { + height: 20rem; + } + .projects-item__main { + padding: 2.4rem 1.6rem; + } +} + +/* page */ + +.page { + margin-bottom: 14.4rem; +} +.page-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.page-main { + display: flex; + flex-direction: column; + gap: 4rem; +} +.page-block { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.page-main p { + color: var(--Grey-2); + font-size: 1.8rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.page-main a { + color: var(--Blue); +} +.page-main .page-text-black { + color: var(--Black); + max-width: 109rem; + font-weight: 600; +} + +@media screen and (max-width: 992px) { + .page { + margin-bottom: 9.6rem; + } + .page-container { + gap: 4rem; + } + .page-main { + gap: 2.4rem; + } + .page-main p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } +} + +/* page_404 */ + +.page_404 { + margin-bottom: 14.4rem; +} +.page_404-main { + background-image: url('/wp-content/uploads/2025/05/page_404.png'); + background-position: center center; + background-size: cover; + background-repeat: no-repeat; + padding: 10.7rem 0; + border-radius: 0.6rem; + display: flex; + flex-direction: column; + align-items: center; + gap: 1.2rem; +} +.page_404-main h2 { + color: var(--Blue-Black); + text-align: center; + font-size: 24rem; + font-style: normal; + font-weight: 700; + line-height: 100%; + letter-spacing: -0.48rem; + text-transform: uppercase; + margin-bottom: 1.2rem; +} +.page_404-main p { + color: var(--Black); + text-align: center; + font-size: 1.8rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.page_404-link { + display: flex; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: center; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + margin-top: 2rem; +} +.page_404-link svg { + width: 1.9rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .page_404 { + margin-bottom: 9.6rem; + } + .page_404-main { + background-image: url('/wp-content/uploads/2025/05/page_404-mob.png'); + padding: 14.1rem 0; + } + .page_404-main h2 { + font-size: 14.4rem; + letter-spacing: -0.288rem; + } + .page_404-main h3 { + max-width: 24.7rem; + text-align: center; + font-size: 1.6rem; + } + .page_404-main p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + max-width: 15.7rem; + } +} + +/* cart */ + +.cart { + margin-bottom: 14.4rem; +} +.cart-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.cart-main { + display: flex; + gap: 1.6rem; +} +.cart-left { + width: 100%; + max-width: 90.1rem; + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.cart-top { + display: flex; + padding: 1.6rem 2.4rem; + justify-content: space-between; + align-items: center; + border-radius: 0.8rem; + background: var(--White); +} +.cart-checkbox__all { + position: relative; + display: flex; + align-items: center; +} +.cart-checkbox__all label { + cursor: pointer; + padding-left: 2.4rem; + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 500; + line-height: 120%; + letter-spacing: -0.024rem; +} +.cart-checkbox__all input[type=checkbox]:before { + content: ""; + display: inline-block; + width: 1.6rem; + height: 1.6rem; + border-radius: 0.2rem; + border: 0.1rem solid var(--Blue); + position: absolute; + margin-top: -0.8rem; + background-color: var(--White); + cursor: pointer; +} +.cart-checkbox__all input[type=checkbox]:checked:before { + background:transparent; + background-image: url('/wp-content/uploads/2025/05/chek.svg'); + background-repeat: no-repeat; + background-position: center; + background-size: cover; + position: absolute; +} +.cart-checkbox__all input[type="checkbox"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: none; +} +.cart-checkbox__all input[type="checkbox"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-image: none; +} +.cart-checkbox__all input[type="checkbox"]:checked { + background-image: none; +} +.cart-delete-all { + display: flex; + align-items: center; + gap: 0.2rem; + color: var(--Red); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.cart-delete-all svg { + width: 2rem; + height: auto; +} +.cart-products { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.cart-product { + display: flex; + padding: 2.4rem; + align-items: flex-start; + gap: 1.6rem; + border-radius: 0.8rem; + background: var(--White); + position: relative; +} +.cart-product__checkbox { + position: absolute; + top: 3.6rem; + z-index: 5; + left: 3.6rem; + display: flex; + width: 1.6rem; + height: 1.6rem; +} +.cart-product__checkbox input[type=checkbox]:before { + content: ""; + display: inline-block; + width: 1.6rem; + height: 1.6rem; + border-radius: 0.2rem; + border: 0.1rem solid var(--Blue); + position: absolute; + background-color: var(--White); + cursor: pointer; +} +.cart-product__checkbox input[type=checkbox]:checked:before { + background:transparent; + background-image: url('/wp-content/uploads/2025/05/chek.svg'); + background-repeat: no-repeat; + background-position: center; + position: absolute; + background-size: cover; +} +.cart-product__checkbox input[type="checkbox"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: none; +} +.cart-product__checkbox input[type="checkbox"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-image: none; +} +.cart-product__checkbox input[type="checkbox"]:checked { + background-image: none; +} +.cart-product__img { + width: 21.3rem; + min-width: 21.3rem; + height: 21.3rem; +} +.cart-product__img img { + border-radius: 0.6rem; + width: 100%; + height: 100%; + object-fit: cover; +} +.cart-product__main { + display: flex; + align-items: flex-start; + gap: 1.6rem; + width: 100%; +} +.cart-product__col { + width: 100%; + max-width: 39.5rem; + display: flex; + flex-direction: column; + align-items: flex-start; +} +.cart-product__sku { + display: flex; + align-items: center; + gap: 0.4rem; + margin-bottom: 2.4rem; +} +.cart-product__sku p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.cart-product__sku p:last-child { + color: var(--Black); + font-weight: 600; +} +.cart-product__title { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + text-transform: uppercase; + margin-bottom: 1.6rem; +} +.cart-product__params { + display: flex; + flex-direction: column; + gap: 0.4rem; + margin-bottom: 1.6rem; +} +.cart-product__params p { + color: var(--Grey-2); + font-size: 1.3rem; + font-weight: 400; + line-height: 130%; + margin: 0; +} +.cart-product__params p strong { + color: var(--Black); + font-weight: 600; +} +.cart-product__chars { + display: flex; + flex-direction: column; + gap: 0.8rem; + margin-bottom: 2.4rem; +} +.cart-product__chars-row { + display: flex; + align-items: center; + gap: 0.4rem; +} +.cart-product__chars-row p { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.cart-product__chars-row p:last-child { + color: var(--Black); + font-weight: 600; +} +.cart-product__chars-row .cart-product__chars-price { + color: var(--Black); + font-weight: 600; +} +.cart-product__chars-row p.cart-product__chars-oldprice { + color: var(--Grey-2); + text-decoration: line-through; +} +.cart-product__quantity { + display: flex; + flex-direction: column; + gap: 0.8rem; + margin-bottom: 1.6rem; +} +.cart-product__quantity > p { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.cart-product__quantity-row { + display: flex; +} +.cart-product__quantity-row input { + padding: 1.5rem 1.5rem 1.4rem 1.5rem; + border-top: 1px solid var(--Light-Grey-3); + border-bottom: 1px solid var(--Light-Grey-3); + background: var(--White); + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.028rem; + text-align: center; + width: 11.7rem; + height: 4.8rem; +} +.cart-product__quantity-row input input::-webkit-outer-spin-button, +.cart-product__quantity-row input input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} +.cart-product__quantity-row input input[type=number] { + -moz-appearance: textfield; +} +.cart-product__quantity-row button { + border-radius: 0.4rem 0rem 0rem 0.4rem; + border: 1px solid var(--Light-Grey-3); + background: var(--White); + padding: 1.5rem; + height: 4.8rem; + display: flex; + justify-content: center; + align-items: center; +} +.cart-product__quantity-row button.cart-product__quantity-plus { + border-radius: 0rem 0.4rem 0.4rem 0rem; +} +.cart-product__quantity-row button svg { + width: 1.6rem; + height: auto; +} +.cart-product__delete { + display: flex; + align-items: center; + gap: 0.2rem; + color: var(--Grey-1); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.cart-product__delete svg { + width: 2rem; + height: auto; +} +.cart-product__info { + display: flex; + flex-direction: column; + align-items: flex-end; + width: 100%; + max-width: 21.3rem; + gap: 2rem; +} +.cart-product__popular { + padding: 0.8rem 1.2rem; + border-radius: 0.4rem; + background: var(--Green); + color: var(--White); + text-align: center; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.cart-product__discount { + padding: 0.8rem 1.2rem; + border-radius: 0.4rem; + background: #EF4444; + color: var(--White); + text-align: center; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.cart-product__info-col { + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 0.8rem; +} +.cart-product__info-label { + color: var(--Grey-2); + text-align: right; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; + margin-bottom: 0.4rem; +} +.cart-product__info-block { + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 0.8rem; +} +.cart-product__info-block > p { + color: var(--Grey-2); + text-align: right; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.cart-product__info-block > p:last-child { + color: var(--Black); + font-size: 1.4rem; + font-weight: 600; + letter-spacing: -0.028rem; +} +.cart-product__price-row { + display: flex; + align-items: center; + gap: 0.8rem; +} +.cart-product__price { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + text-transform: uppercase; +} +.cart-product__sale { + display: flex; + padding: 0.8rem 1.2rem; + align-items: center; + gap: 0.2rem; + border-radius: 0.4rem; + background: var(--Red); +} +.cart-product__sale p { + color: var(--White); + text-align: center; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.cart-product__sale svg { + width: 1.2rem; + height: auto; +} +.cart-product__oldprice { + color: var(--Grey-2);; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; + text-decoration-line: line-through; +} +.cart-right { + width: 100%; + max-width: 44.3rem; +} +.cart-total { + position: sticky; + top: 5rem; + border-radius: 0.8rem; + background: var(--White); + display: flex; + padding: 4rem; + flex-direction: column; + gap: 2.7rem; +} +.cart-total > h3 { + padding-bottom: 2.4rem; + border-bottom: 0.1rem solid #F1F1F1; +} +.cart-total__col { + display: flex; + flex-direction: column; + gap: 4rem; +} +.cart-total__info { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.cart-total__info-row { + display: flex; + align-items: center; + gap: 1rem; + justify-content: space-between; +} +.cart-total__info-row p { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.cart-total__info-row p:last-child { + font-size: 1.8rem; + color: var(--Black); + font-weight: 600; + letter-spacing: -0.036rem; +} +.cart-total__bottom { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.8rem; +} +.cart-total__price-col { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1.2rem; + margin-bottom: 2.4rem; +} +.cart-total__price-col > p { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.cart-total__price-row { + display: flex; + align-items: baseline; + gap: 0.8rem; +} +.cart-total__price { + color: var(--Blue); + font-size: 2.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; +} +.cart-total__oldprice { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: normal; + text-decoration-line: line-through; +} +.cart-total__price span { + font-size: 1.6rem; +} +.cart-total__oldprice span { + font-size: 1.2rem; + font-weight: 500; +} +.cart-submit { + width: 100%; + display: flex; + justify-content: center; + align-items: center; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + margin-bottom: 0.8rem; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; +} +.cart-submit svg { + width: 1.9rem; + height: auto; +} +.cart-total__bottom > p { + color: var(--Grey-1); + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; +} +.cart-total__bottom > p a { + color: var(--Blue); + font-weight: 500; +} +.cart-product__col .cart-product__popular { + display: none; +} +.cart-product__col .cart-product__sale { + display: none; +} +.cart-product__col .cart-product__info-col { + display: none; +} + +@media screen and (max-width: 992px) { + .cart { + margin-bottom: 9.6rem; + } + .cart-container { + gap: 4rem; + } + .cart-main { + flex-direction: column; + gap: 4rem; + } + .cart-left { + max-width: none; + gap: 1rem; + } + .cart-top { + padding: 1.2rem 1.6rem; + } + .cart-products { + gap: 1rem; + } + .cart-product { + padding: 1.6rem; + gap: 1.6rem; + border-radius: 0.6rem; + } + .cart-product__checkbox { + top: 2.4rem; + left: 2.4rem; + } + .cart-product__img { + width: 6.4rem; + min-width: 6.4rem; + height: 6.4rem; + } + .cart-product__img img { + border-radius: 0.4rem; + } + .cart-product__main { + flex-direction: column; + } + .cart-product__col { + max-width: none; + } + .cart-product__col .cart-product__popular { + display: block; + } + .cart-product__col .cart-product__sale { + display: flex; + } + .cart-product__col .cart-product__info-col { + display: flex; + } + .cart-product__sku { + gap: 0.2rem; + margin-bottom: 1.6rem; + } + .cart-product__sku p { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .cart-product__title { + font-size: 1.4rem; + } + .cart-product__quantity { + margin-bottom: 2.4rem; + } + .cart-product__quantity-row input { + width: 12.8rem; + } + .cart-product__info { + display: none; + } + .cart-product__popular { + padding: 0.6rem 0.8rem; + font-size: 0.8rem; + letter-spacing: -0.016rem; + margin-bottom: 1.2rem; + } + .cart-product__info-col { + align-items: flex-start; + margin-bottom: 2.4rem; + } + .cart-product__info-block { + align-items: flex-start; + gap: 0.6rem; + } + .cart-product__info-block > p { + text-align: left; + } + .cart-product__sale { + margin-bottom: 1.2rem; + padding: 0.6rem 0.8rem; + } + .cart-product__sale p { + font-size: 0.8rem; + letter-spacing: -0.016rem; + } + .cart-product__sale svg { + width: 0.8rem; + } + .cart-right { + max-width: 100%; + } + .cart-total { + position: relative; + top: 0; + padding: 2.4rem 1.6rem; + gap: 1.6rem; + } + .cart-total > h3 { + padding-bottom: 1.6rem; + } + .cart-total__info { + gap: 1.2rem; + } + .cart-total__info-row p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .cart-total__info-row p:last-child { + font-size: 1.6rem; + letter-spacing: -0.032rem; + } + .cart-total__price-col > p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .cart-submit { + padding: 2.2rem 0; + } + .cart-submit svg { + width: 1.8rem; + } + .cart-total__bottom > p { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } +} + +/* cart_more */ + +.cart_more { + margin-bottom: 14.4rem; +} +.cart_more-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.cart_more-name { + display: flex; + align-items: center; + justify-content: space-between; +} +.cart_more-link { + display: flex; + align-items: center; + gap: 0.6rem; + color: var(--Blue); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.cart_more-link svg { + width: 2rem; + height: auto; +} +.cart_more-mob { + display: none; +} + +@media screen and (max-width: 992px) { + .cart_more { + margin-bottom: 9.6rem; + } + .cart_more-name { + justify-content: center; + } + .cart_more-container { + gap: 4rem; + } + .cart_more-link { + display: none; + } + .cart_more-mob { + display: flex; + flex-direction: column; + gap: 4rem; + } + .cart_more-mob__link { + padding: 2.1rem 0; + border-radius: 0.4rem; + border: 1px solid var(--Blue); + color: var(--Blue); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + text-align: center; + } +} + +/* cart-empty */ + +.cart-empty { + padding: 10.4rem 4rem; + border-radius: 0.8rem; + background: var(--White); + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 1.6rem; +} +.cart-empty h3 { + text-align: center; +} +.cart-empty p { + color: var(--Grey-2); + text-align: center; + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; + max-width: 50.8rem; +} +.cart-empty p a { + color: var(--Blue); + font-weight: 500; +} +.cart-empty__link { + margin-top: 1.6rem; + display: flex; + width: 24rem; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: flex-end; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.cart-empty__link svg { + width: 1.8rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .cart-empty { + padding: 9.6rem 1.6rem; + } + .cart-empty h3 { + max-width: 20rem; + } + .cart-empty p { + max-width: 29rem; + } + .cart-empty__link { + margin-top: 2.4rem; + width: 24.6rem; + } +} + +/* login */ + +.login { + margin-bottom: 14.4rem; +} +.login-container { + display: flex; + flex-direction: column; + gap: 4rem; +} +.login-name { + display: flex; + flex-direction: column; + align-items: center; + gap: 2.4rem; +} +.login-name h1 { + text-align: center; +} +.login-name p { + color: var(--Grey-2); + text-align: center; + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; + max-width: 40.3rem; +} +.login-main { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.login-form { + display: flex; + flex-direction: column; + gap: 4rem; + width: 100%; + max-width: 67.2rem; + margin: 0 auto; + border-radius: 0.8rem; + background: var(--White); + padding: 4rem; +} +.login-form__inputs { + display: flex; + flex-direction: column; + gap: 2rem; +} +.login-form__input { + display: flex; + align-items: center; + position: relative; +} +.login-form__input input { + color: var(--Blue); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + border-radius: 0.6rem; + background: var(--Light-Grey); + padding: 1.9rem 0.4rem 1.9rem 2rem; + width: 100%; + border: 1px solid transparent; +} +.login-form__input input::placeholder { + color: var(--Grey-2); +} +.login-password__button { + position: absolute; + right: 2rem; + z-index: 5; + display: flex; +} +.login-password__button img { + width: 1.6rem; +} +.login-form__row { + display: flex; + align-items: center; + justify-content: space-between; +} +.login-form__remember { + position: relative; + display: flex; + align-items: center; +} +.login-form__remember label { + cursor: pointer; + padding-left: 2.5rem; + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 500; + line-height: 140%; + letter-spacing: -0.028rem; +} +.login-form__remember label a { + text-decoration: underline; +} +.login-form__remember input[type=checkbox]:before { + content: ""; + display: inline-block; + width: 1.6rem; + height: 1.6rem; + border-radius: 0.2rem; + border: 0.1rem solid var(--Blue); + position: absolute; + background-color: var(--White); + cursor: pointer; + margin-top: -0.8rem; +} +.login-form__remember input[type=checkbox]:checked:before { + background:transparent; + background-image: url('/wp-content/uploads/2025/05/chek.svg'); + background-repeat: no-repeat; + background-position: center; + position: absolute; + background-size: cover; +} +.login-form__remember input[type="checkbox"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: none; +} +.login-form__remember input[type="checkbox"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-image: none; +} +.login-form__remember input[type="checkbox"]:checked { + background-image: none; +} +.login-form__link { + color: var(--Grey-1); + font-size: 1.4rem; + font-style: normal; + font-weight: 500; + line-height: 120%; + letter-spacing: -0.028rem; +} +.login-form__actions { + display: flex; + flex-direction: column; + gap: 2rem; +} +.login-form__submit { + border-radius: 0.4rem; + background: var(--Blue); + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + text-align: center; +} +.login-form__actions-row { + display: flex; + align-items: center; + justify-content: center; + gap: 0.6rem; +} +.login-form__actions-row p { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 500; + line-height: 140%; + letter-spacing: -0.024rem; +} +.login-form__actions-row a { + color: var(--Blue); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; + display: flex; + align-items: center; + gap: 0.4rem; +} +.login-form__actions-row a svg { + width: 1.7rem; + height: auto; +} + +.login-error { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + width: 100%; + max-width: 67.2rem; + border-radius: 0.6rem; + background: var(--Light-red); + display: none; + align-items: center; + justify-content: center; + margin: 0 auto; +} +.login-error p { + color: var(--Red); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + text-align: center; +} + +@media screen and (max-width: 992px) { + .login { + margin-bottom: 9.6rem; + } + .login-name { + gap: 1.6rem; + } + .login-name p { + max-width: 25.5rem; + } + .login-main { + gap: 1rem; + } + .login-form { + max-width: none; + border-radius: 0.6rem; + padding: 3.2rem 1.6rem; + } + .login-form__inputs { + gap: 1rem; + } + .login-form__row { + margin-top: 1rem; + } + .login-form__remember { + position: relative; + display: flex; + align-items: center; + } + .login-form__remember label { + padding-left: 2.2rem; + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .login-form__remember input[type=checkbox]:before { + margin-top: -1rem; + } + .login-form__link { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .login-form__actions-row { + flex-direction: column; + gap: 0.4rem; + } + .login-form__actions-row a svg { + width: 1.6rem; + } + + .login-error { + padding: 2.3rem 1.6rem 2.4rem 1.6rem; + max-width: none; + } + .login-error p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } +} + +/* password recovery */ + +.password-recovery .login-name p { + max-width: 60.9rem; +} +.login-form__inputs > p { + color: var(--Grey-1); + font-size: 1.2rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; + margin-top: -1.2rem; +} + +@media screen and (max-width: 992px) { + .password-recovery .login-name p { + max-width: 29.8rem; + } + .password-recovery .login-name h1 { + max-width: 23.3rem; + } + .login-form__inputs > p { + margin-top: -0.2rem; + } +} + +/* password recovery complete */ + +.password-recovery-complete .login-main { + width: 100%; + max-width: 59.2rem; + margin: 0 auto; + gap: 1.6rem; +} +.password-recovery-complete__block { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.6rem; + background: var(--Light-green); +} +.password-recovery-complete__block p { + color: var(--Green); + text-align: center; + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} + +@media screen and (max-width: 992px) { + .password-recovery-complete .login-main { + max-width: none; + gap: 1rem; + } + .password-recovery-complete__block { + padding: 2.2rem 1.6rem; + } + .registration-complete .login-name p { + max-width: none; + } +} + +/* registration */ + +.registration .login-name p { + max-width: 68.8rem; +} +.registration-main { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.registration-col { + display: flex; + flex-direction: column; + gap: 2rem; + padding: 4rem; + width: 100%; + max-width: 67.2rem; + margin: 0 auto; + border-radius: 0.8rem; + background: var(--White); +} +.registration-tabs { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1.6rem; +} +.registration-tab { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + padding: 2.3rem 0.4rem 2.4rem 4.4rem; + border-radius: 0.6rem; + background: var(--Light-Grey); + border: 1px solid transparent; + position: relative; + text-align: left; +} +.registration-tab::before { + content: ''; + position: absolute; + left: 2rem; + top: 2.4rem; + width: 1.6rem; + height: 1.6rem; + background-image: url('/wp-content/uploads/2025/05/radio.svg'); + background-position: center center; + background-size: cover; + background-repeat: no-repeat; + transition: .3s all; +} +.registration-tab.active { + border-color: var(--Blue); + color: var(--Blue); +} +.registration-tab.active::before { + background-image: url('/wp-content/uploads/2025/05/radio-checked.svg'); +} +.registration-content { + display: none; +} +.registration-content.active { + display: block; +} +.registration-form { + display: flex; + flex-direction: column; + gap: 4rem; +} + +@media screen and (max-width: 992px) { + .registration .login-name p { + max-width: 30.5rem; + } + .registration-main { + gap: 1rem; + } + .registration-col { + gap: 1rem; + padding: 3.2rem 1.6rem; + max-width: none; + border-radius: 0.6rem; + } + .registration-tabs { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .registration .login-error p { + max-width: 22.7rem; + } +} + +/* popup */ + +.popup { + position: fixed; + top: 0; + left: 0; + z-index: 9999; + width: 100%; + height: 100%; + display: none; +} +.popup-fon { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: var(--black-blue-10); +} +.popup-main { + margin: auto; + width: 100%; + max-width: 55.7rem; + padding: 4rem; + border-radius: 0.8rem; + background: var(--White); + position: relative; + z-index: 2; +} +.popup-close { + position: absolute; + top: 4rem; + right: 4rem; +} +.popup-close svg { + width: 2.4rem; + height: auto; +} +.popup-registration__col { + display: flex; + flex-direction: column; + gap: 2.4rem; +} +.popup-registration__name { + display: flex; + flex-direction: column; + gap: 1.7rem; +} +.popup-registration__name p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; +} +.popup-registration__name p br { + display: none; +} +.popup-registration__name p b { + font-weight: 600; +} +.popup-registration__form { + display: flex; + flex-direction: column; + gap: 4rem; +} +.popup-registration__inputs { + display: flex; + flex-direction: column; + gap: 0.8rem; +} +.popup-registration__inputs > p { + color: var(--Grey-1); + font-size: 1.2rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.popup-registration__input { + display: flex; + position: relative; +} +.popup-registration__input input { + padding: 1.9rem 0.4rem 1.9rem 2rem; + border-radius: 0.6rem; + background: var(--Light-Grey); + width: 100%; + color: var(--Blue); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + border: 1px solid transparent; +} +.popup-registration__input input::placeholder { + color: var(--Grey-2); +} +.popup-registration__actions { + display: flex; + flex-direction: column; + gap: 2rem; +} +.popup-registration__submit { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + text-align: center; +} +.popup-registration__actions p { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 500; + line-height: 140%; + letter-spacing: -0.024rem; + text-align: center; +} +.popup-registration__code-button { + margin: 0 auto; + display: flex; + align-items: center; + gap: 0.4rem; + color: var(--Blue); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.popup-registration__code-button svg { + width: 1.7rem; + height: auto; +} +.popup-registration2 .popup-registration__input input { + color: var(--Blue); +} + +@media screen and (max-width: 992px) { + .popup-main { + max-width: 34rem; + padding: 6.4rem 1.6rem; + } + .popup-close { + top: 1.6rem; + right: 1.6rem; + } + .popup-registration__col { + gap: 3.2rem; + } + .popup-registration__name { + align-items: center; + gap: 1.6rem; + } + .popup-registration__name h4 { + text-align: center; + } + .popup-registration__name p { + text-align: center; + } + .popup-registration__name p br { + display: block; + } + .popup-registration__code-button svg { + width: 1.6rem; + } +} + +/* payment */ + +.payment { + margin-bottom: 14.4rem; +} +.payment-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.payment-main { + display: flex; + flex-direction: column; + gap: 4rem; +} +.payment-block { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.payment-block p, .payment-block li { + color: var(--Grey-2); + font-size: 1.8rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.payment-block ul { + display: flex; + flex-direction: column; + padding-left: 2.5rem; +} +.payment-requisites { + display: flex; + flex-direction: column; + gap: 2.4rem; + margin-top: 2.4rem; +} +.payment-requisites__col { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.payment-requisites__row { + display: flex; + align-items: center; + gap: 0.8rem; +} +.payment-requisites__row p { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.payment-requisites__row p:last-child { + color: var(--Black); + font-size: 1.8rem; + letter-spacing: -0.036rem; +} + +@media screen and (max-width: 992px) { + .payment { + margin-bottom: 9.6rem; + } + .payment-container { + gap: 4rem; + } + .payment-main { + gap: 2.4rem; + } + .payment-block h3 { + font-size: 1.6rem; + } + .payment-block p, .payment-block li { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .payment-requisites { + gap: 2.4rem; + margin-top: 1.6rem; + } + .payment-requisites__col { + gap: 2rem; + } + .payment-requisites__row { + flex-direction: column; + align-items: flex-start; + } + .payment-requisites__row p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .payment-requisites__row p:last-child { + font-size: 1.6rem; + letter-spacing: -0.032rem; + } +} + +/* delivery */ + +.delivery .payment-block { + max-width: 101.3rem; +} +.delivery-map { + width: 100%; + max-width: 101.6rem; + height: 40rem; +} +.delivery-map iframe { + width: 100%; + height: 100%; + border-radius: 0.8rem; +} +.delivery .delivery-block { + max-width: 88.9rem; +} +.delivery-col { + margin-top: 2.4rem; + display: flex; + flex-direction: column; + gap: 1.2rem; +} +.delivery-row { + display: flex; + align-items: center; + gap: 1.2rem; +} +.delivery-row p { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + text-transform: uppercase; +} +.delivery-row span { + border-radius: 0.4rem; + background: var(--Blue); + display: flex; + width: 3.2rem; + height: 3.2rem; + justify-content: center; + align-items: center; + color: var(--White); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 110%; + letter-spacing: -0.028rem; +} + +@media screen and (max-width: 992px) { + .delivery .payment-block { + max-width: none; + } + .delivery-map { + max-width: none; + height: 34rem; + } + .delivery .delivery-block { + max-width: none; + } + .delivery-col { + margin-top: 0.8rem; + gap: 0.8rem; + } + .delivery-row p { + font-size: 1.6rem; + } +} + +/* product_page */ + +.product_page { + margin-bottom: 14.4rem; +} +.product_page-container { + display: flex; + flex-direction: column; + gap: 9.6rem; +} +.product_page-main { + display: flex; + align-items: flex-start; + gap: 3.2rem; +} +.product_page-images { + width: 100%; + max-width: 65.6rem; + display: flex; + flex-direction: column; + position: relative; + gap: 1.2rem; +} +.product_page-labels { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.6rem; + top: 2.4rem; + left: 2.4rem; + position: absolute; + z-index: 9; +} +.product_page-popular { + padding: 0.8rem 1.2rem; + border-radius: 0.4rem; + background: var(--Green); + color: var(--White); + text-align: center; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +/* Метка скидки - красная */ +.product_page-discount { + padding: 0.8rem 1.2rem; + border-radius: 0.4rem; + background: #EF4444; + color: var(--White); + text-align: center; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.product_page-sale { + display: flex; + padding: 0.8rem 1.2rem; + align-items: center; + gap: 0.2rem; + border-radius: 0.4rem; + background: var(--Red); +} +.product_page-sale p { + color: var(--White); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.product_page-sale svg { + width: 1.2rem; + height: auto; +} +.product_page-slider { + position: relative; + display: flex; + align-items: center; + max-width: 700px; +} +.product_page-swiper { + width: 100%; +} +.product_page-swiper .swiper-slide { + height: auto; +} +.product_page-slide { + width: 100%; + height: 300px; +} +.product_page-slide img { + width: 100%; + height: 100%; + object-fit: contain; + border-radius: 0.6rem; +} +.product_page-prev { + display: flex; + width: 4rem; + height: 4rem; + justify-content: center; + align-items: center; + border-radius: 0.4rem 0rem 0rem 0.4rem; + background: var(--Dark-Blue-Grey); + position: absolute; + left: 0; + z-index: 9; +} +.product_page-next { + display: flex; + width: 4rem; + height: 4rem; + justify-content: center; + align-items: center; + border-radius: 0.4rem 0rem 0rem 0.4rem; + background: var(--Dark-Blue-Grey); + position: absolute; + right: 0; + z-index: 9; +} +.product_page-prev svg, .product_page-next svg { + width: 1.6rem; + height: auto; +} +.product_page-pagination { + display: none; +} +.product_page_thumbs { + width: 100%; +} +.product_page_thumbs .swiper-slide { + cursor: pointer; + height: 9.9rem; +} +.product_page_thumbs .swiper-slide img { + width: 100%; + border-radius: 0.4rem; + height: 100%; + object-fit: cover; +} +.product_page-col { + width: 100%; + max-width: 60.8rem; + display: flex; + flex-direction: column; + align-items: flex-start; +} +.product_page-col > .price { + display: none; +} +.product_page-col > .simple-weight { + display: none; +} +.product_page-col > .stock { + display: none; +} +.product_page-col > .product_title { + display: none; +} +.product_page-col > .product_meta { + display: none; +} +.product_page-col > h2 { + text-align: left; + margin-bottom: 2rem; +} +.product_page-aviable { + display: flex; + padding: 0.8rem 1.2rem; + align-items: center; + gap: 0.4rem; + border-radius: 0.4rem; + background: var(--Light-green); + margin-bottom: 3.2rem; +} +.product_page-aviable p { + color: var(--Green); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.product_page-aviable::before { + content: ''; + width: 0.7rem; + height: 0.7rem; + background: var(--Green); + border-radius: 100%; +} +.product_page-sku { + display: flex; + align-items: center; + gap: 0.4rem; + margin-bottom: 4rem; +} +.product_page-sku p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.product_page-sku p:nth-child(2) { + color: var(--Black); +} +.product_page-form { + display: flex; + flex-direction: column; + align-items: flex-start; + width: 100%; +} +.product_page-calc { + display: flex; + flex-direction: column; + margin-bottom: 3.2rem; + width: 100%; +} +.product_page-calc__row { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 3.2rem; + margin-bottom: 2rem; +} +.product_page-calc__col { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.product_page-calc__select { + display: flex; + flex-direction: column; + gap: 0.8rem; +} +.reset_variations { + display: none; +} +.variations { + width: 100%; +} +.product_page-calc__select p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.product_page-calc__select select { + cursor: pointer; + padding: 1.5rem 1.6rem; + border-radius: 0.6rem; + border: 1px solid var(--Light-Grey-3); + background: var(--White); + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + width: 100%; + background-image: url('/wp-content/uploads/2025/05/select.svg'); + background-position: center right 1.6rem; + background-repeat: no-repeat; + background-size: 1.2rem; +} +.product_page-calc__select select { + -webkit-appearance: none; + -moz-appearance: none; +} +.product_page-calc__select select::-ms-expand { + display: none; +} +.product_page-calc__select option { + cursor: pointer; + color: var(--Black); +} +.product_page-calc__select input { + padding: 1.5rem 1.6rem; + border-radius: 0.6rem; + border: 1px solid var(--Light-Grey-3); + background: var(--White); + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + width: 100%; +} +.product_page-calc__prices { + display: flex; + padding-top: 2.5rem; + flex-direction: column; + align-items: flex-start; + gap: 0.8rem; +} +.product_page-calc__prices-row { + display: flex; + align-items: center; + gap: 0.8rem; +} +.product_page-calc__prices-row > p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.product_page-calc__prices-row > p:nth-child(2) { + color: var(--Black); +} +.product_page-calc__prices-old { + display: flex; + align-items: center; + gap: 0.4rem; +} +.product_page-calc__price { + color: var(--Black); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.product_page-calc__oldprice { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + text-decoration-line: line-through; +} +.product_page-calc__description { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1.2rem; +} +.product_page-calc__description p { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.product_page-calc__one { + display: flex; + flex-direction: column; + gap: 0.8rem; + margin-bottom: 0.9rem; +} +.product_page-calc__one > p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.product_page-calc__one-row { + display: flex; + align-items: center; + gap: 0.4rem; +} +.product_page-calc__one-price { + color: var(--Blue); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.product_page-calc__one-oldprice { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + text-decoration-line: line-through; +} +.product_page-calc__one2 p:nth-child(2) { + color: var(--Black); + font-weight: 600; +} +.woocommerce-variation { + margin-bottom: 0.3rem; +} +.product_page .cart-product__quantity { + margin-bottom: 4rem; +} +.product_page .cart-product__quantity-row input { + width: 19.2rem; +} +.product_page-weight-price { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 2.4rem; + margin-bottom: 4rem; +} +.product_page-weight { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.6rem; +} +.product_page-weight p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.product_page-weight p:nth-child(2) { + color: var(--Black); + font-size: 2.2rem; + line-height: 120%; + letter-spacing: -0.044rem; +} +.product_page-prices { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.6rem; +} +.product_page-prices > p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.product_page-prices__row { + display: flex; + align-items: baseline; + gap: 0.8rem; +} +.product_page-price { + color: var(--Blue); + font-size: 2.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; +} +.product_page-oldprice { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: normal; + text-decoration-line: line-through; +} +.product_page-price span { + font-size: 1.6rem; +} +.product_page-oldprice span { + font-size: 1.2rem; +} +.product_page-submit { + width: 28.8rem; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.product_page-info { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.product_page-tabs { + display: flex; + gap: 1.2rem; +} +.product_page-tab { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Light-Blue); + color: var(--Black); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.product_page-tab.active { + background: var(--Blue); + color: var(--White); +} +.product_page-content { + display: none; +} +.product_page-content.active { + display: block; +} +.product_page-description { + display: flex; + flex-direction: column; + gap: 3.2rem; +} +.product_page-description h2 { + text-align: left; +} +.product_page-description ul { + display: flex; + flex-direction: column; + padding-left: 2.5rem; +} +.product_page-description li, .product_page-description p { + color: var(--Grey-2); + font-size: 1.8rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.product_page-description a { + color: var(--Blue); +} +.product_page-description-col { + display: flex; + flex-direction: column; + gap: 1rem; +} +.product_page-docs { + display: flex; + flex-direction: column; + gap: 3.2rem; +} +.product_page-docs > h2 { + text-align: left; +} +.product_page-docs__grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1.6rem; +} +.product_page-labels .product_page-aviable { + display: none; +} +.product_page-tabs__mob { + display: none; +} +.product_page-form2 .product_page-calc__one { + flex-direction: row; + align-items: center; + gap: 0.6rem; +} +.product_page-form2 .product_page-calc { + margin-bottom: 2rem; +} +.product_page-form2 .product_page-calc__row { + margin-bottom: 0; +} + +@media screen and (max-width: 992px) { + .product_page { + margin-bottom: 9.6rem; + } + .product_page-container { + gap: 4rem; + } + .product_page-main { + flex-direction: column; + gap: 2rem; + } + .product_page-images { + max-width: none; + } + .product_page-labels { + top: 1.2rem; + left: 1.2rem; + } + .product_page-labels .product_page-aviable { + display: flex; + } + .product_page-popular { + padding: 0.6rem 0.8rem; + font-size: 0.8rem; + letter-spacing: -0.016rem; + } + .product_page-discount { + padding: 0.6rem 0.8rem; + font-size: 0.8rem; + letter-spacing: -0.016rem; + } + .product_page-sale { + padding: 0.6rem 0.8rem; + } + .product_page-sale p { + font-size: 0.8rem; + letter-spacing: -0.016rem; + } + .product_page-sale svg { + width: 0.8rem; + } + .product_page-slide { + height: 34rem; + } + .product_page-prev { + display: none; + } + .product_page-next { + display: none; + } + .product_page-pagination { + display: flex; + justify-content: center; + align-items: center; + bottom: 1.2rem !important; + position: absolute; + z-index: 9; + gap: 0.4rem; + } + .product_page-pagination .swiper-pagination-bullet { + width: 1.2rem; + margin: 0 !important; + opacity: 1; + background: var(--Light-Grey-3); + height: 0.1rem; + } + .product_page-pagination .swiper-pagination-bullet-active { + background: var(--Blue); + } + .product_page_thumbs { + display: none; + } + .product_page-col { + max-width: none; + } + .product_page-col > h2 { + margin-bottom: 1.6rem; + } + .product_page-aviable { + padding: 0.6rem 0.8rem; + gap: 0.4rem; + margin-bottom: 0; + display: none; + } + .product_page-aviable p { + font-size: 0.8rem; + letter-spacing: -0.016rem; + } + .product_page-aviable::before { + width: 0.5rem; + height: 0.5rem; + } + .product_page-sku { + margin-bottom: 3.2rem; + } + .product_page-calc__row { + grid-template-columns: repeat(1, 1fr); + gap: 2.4rem; + margin-bottom: 2.4rem; + } + .product_page-calc__prices { + padding-top: 0; + } + .product_page-calc__prices-row { + justify-content: space-between; + width: 100%; + } + .product_page .cart-product__quantity { + margin-bottom: 3.2rem; + } + .product_page .cart-product__quantity-row input { + width: 24.4rem; + } + .product_page-weight-price { + margin-bottom: 3.2rem; + } + .product_page-submit { + width: 100%; + } + .product_page-info { + gap: 2.4rem; + } + .product_page-tabs { + display: none; + } + .product_page-tabs__mob { + display: flex; + position: relative; + } + .product_page-tabs__mob-button { + display: flex; + justify-content: space-between; + padding: 1.9rem 2rem 2rem 2rem; + align-items: center; + gap: 0.8rem; + border-radius: 0.4rem; + background: var(--White); + width: 100%; + } + .product_page-tabs__mob-button p { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + } + .product_page-tabs__mob-button svg { + width: 1.6rem; + height: auto; + transition: .3s all; + } + .product_page-tabs__mob-button.active { + background: var(--Blue); + } + .product_page-tabs__mob-button.active p { + color: var(--White); + } + .product_page-tabs__mob-button.active svg { + transform: rotate(180deg); + } + .product_page-tabs__mob-button.active svg path { + fill: var(--White); + } + .product_page-tabs__mob-content { + display: none; + } + .product_page-tabs__mob-content.active { + display: flex; + flex-direction: column; + position: absolute; + top: 100%; + left: 0; + z-index: 9; + margin-top: 0.8rem; + border-radius: 0.4rem; + border: 1px solid var(--Blue); + background: var(--White); + box-shadow: 1px 4px 16px 0px rgba(0, 0, 0, 0.10); + width: 100%; + padding: 2rem; + gap: 0.4rem; + } + .product_page-tabs__mob-tab { + border-radius: 0.4rem; + background: var(--Light-Blue); + padding: 1.5rem 2rem; + display: flex; + align-items: center; + justify-content: space-between; + } + .product_page-tabs__mob-tab p { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + } + .product_page-tabs__mob-tab svg { + opacity: 0; + transition: .3s all; + } + .product_page-tabs__mob-tab.active svg { + opacity: 1; + } + .product_page-description h2 { + font-size: 1.6rem; + } + .product_page-description { + gap: 2rem; + } + .product_page-description li, .product_page-description p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .product_page-description-col { + gap: 2rem; + } + .product_page-docs { + gap: 2.4rem; + } + .product_page-docs > h2 { + text-align: center; + font-size: 1.6rem; + } + .product_page-docs__grid { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .product_page-form2 .product_page-calc__one { + width: 100%; + justify-content: space-between; + } +} + +/* popup-cart */ + +.popup-cart__col { + display: flex; + flex-direction: column; + gap: 4rem; +} +.popup-cart__name { + display: flex; + flex-direction: column; + gap: 2.4rem; +} +.popup-cart__name p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; +} +.popup-cart__buttons { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1.6rem; +} +.popup-cart__cancel { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + border: 1px solid var(--Blue); + color: var(--Blue); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + text-align: center; +} +.popup-cart__delete { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + text-align: center; +} + +@media screen and (max-width: 992px) { + .popup-cart__col { + gap: 3.2rem; + } + .popup-cart__name { + gap: 1.6rem; + } + .popup-cart__name h4 { + text-align: center; + } + .popup-cart__name p { + text-align: center; + } + .popup-cart__buttons { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .popup-cart__name p br { + display: none; + } +} + +/* checkout */ + +.checkout { + margin-bottom: 14.4rem; +} +.checkout-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.checkout-main { + display: flex; + gap: 1.6rem; +} +.checkout-left { + border-radius: 0.8rem; + background: var(--White); + display: flex; + flex-direction: column; + gap: 6.4rem; + width: 100%; + max-width: 90.1rem; + padding: 4rem; +} +.checkout-col { + display: flex; + flex-direction: column; + gap: 2.4rem; + position: relative; +} +.checkout-col::before { + content: ''; + position: absolute; + top: 4.8rem; + left: 2.4rem; + width: 0.1rem; + background: var(--Light-Grey-2); + height: calc(100% + 1.6rem); +} +.checkout-col:last-child::before { + display: none; +} +.checkout-name { + display: flex; + align-items: center; + gap: 2rem; +} +.checkout-name span { + display: flex; + width: 4.8rem; + height: 4.8rem; + justify-content: center; + align-items: center; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 2.2rem; + font-style: normal; + font-weight: 600; + line-height: 110%; + letter-spacing: -0.044rem; +} +.checkout-block { + padding-left: 6.8rem; +} +.checkout-data { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.checkout-data__tabs { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1.6rem; +} +.checkout-data__tab { + display: flex; + padding: 1.9rem 0.4rem 2rem 2rem; + align-items: center; + gap: 0.8rem; + border-radius: 0.6rem; + border: 1px solid transparent; + background: var(--Light-Grey); + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.checkout-data__tab::before { + content: ''; + width: 1.6rem; + height: 1.6rem; + transition: .3s all; + background-image: url('/wp-content/uploads/2025/05/radio.svg'); + background-position: center center; + background-repeat: no-repeat; + background-size: cover; +} +.checkout-data__tab.active { + color: var(--Blue); + border-color: var(--Blue); +} +.checkout-data__tab.active::before { + background-image: url('/wp-content/uploads/2025/05/radio-checked.svg'); +} +.checkout-data__content { + display: none; +} +.checkout-data__content.active { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.checkout-data__input { + display: flex; +} +.checkout-data__input input { + color: var(--Blue); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + width: 100%; + padding: 1.9rem 0.4rem 1.9rem 2rem; + border-radius: 0.6rem; + background: var(--Light-Grey); + border: 1px solid transparent; +} +.checkout-data__input input::placeholder { + color: var(--Grey-2); +} +.checkout-delivery { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1.6rem; +} +.checkout-delivery__item { + position: relative; + display: flex; + width: 100%; +} +#add_payment_method #payment, .woocommerce-cart #payment, .woocommerce-checkout #payment { + background: transparent; + border-radius: 0; +} +#add_payment_method #payment div.form-row, .woocommerce-cart #payment div.form-row, .woocommerce-checkout #payment div.form-row { + padding: 0; + margin: 0; + display: flex; + flex-direction: column; +} +.woocommerce form .form-row label { + line-height: 140%; +} +.woocommerce form .form-row::after, .woocommerce form .form-row::before, .woocommerce-page form .form-row::after, .woocommerce-page form .form-row::before { + display: none; +} +#add_payment_method #payment ul.payment_methods, .woocommerce-cart #payment ul.payment_methods, .woocommerce-checkout #payment ul.payment_methods { + text-align: left; + padding: 0; + border-bottom: none; + margin: 0; + list-style: none outside; + display: none; +} +.checkout-delivery__item input { + position: absolute; + visibility: hidden; +} +.woocommerce ul#shipping_method { + margin: 0 !important; +} +.woocommerce ul#shipping_method li { + margin: 0; + display: flex; +} +.checkout-delivery__item label { + display: flex !important; + padding: 2.4rem 2.4rem 2.4rem 4.8rem; + flex-direction: column; + align-items: flex-start; + gap: 0.8rem; + border-radius: 0.8rem; + background: var(--Light-Grey); + border: 1px solid transparent; + cursor: pointer; + transition: .3s all; + height: 100%; + position: relative; + width: 100%; +} +.checkout-delivery__item label p { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + letter-spacing: -0.028rem; +} +.checkout-delivery__item label p:nth-child(2) { + color: var(--Grey-2); + font-size: 1.2rem; + font-weight: 500; + line-height: 140%; + letter-spacing: -0.024rem; +} +.checkout-delivery__item label::before { + content: ''; + width: 1.6rem; + height: 1.6rem; + transition: .3s all; + background-image: url('/wp-content/uploads/2025/05/radio.svg'); + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + position: absolute; + top: 2.5rem; + left: 2.4rem; +} +.checkout-delivery__item input:checked+label { + border-color: var(--Blue); +} +.checkout-delivery__item input:checked+label::before { + background-image: url('/wp-content/uploads/2025/05/radio-checked.svg'); +} +.checkout-comment { + display: flex; + flex-direction: column; + gap: 3.2rem; +} +.checkout-comment__col { + display: flex; + flex-direction: column; + gap: 2rem; +} +.checkout-comment__col textarea { + color: var(--Blue); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + width: 100%; + height: 9.6rem; + min-height: 9.6rem; + border-radius: 0.6rem; + background: var(--Light-Grey); + padding: 1.9rem 0.4rem 1.9rem 2rem; + border: 1px solid transparent; +} +.checkout-comment__col textarea::placeholder { + color: var(--Grey-2); +} +.checkout-comment__col p { + color: var(--Grey-2); + font-size: 1.1rem; + font-style: normal; + font-weight: 400; + line-height: 150%; + letter-spacing: -0.022rem; +} +.checkout-comment__file { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 2rem; +} +.checkout-comment__file > p { + color: var(--Grey-2); + font-size: 1.1rem; + font-style: normal; + font-weight: 400; + line-height: 150%; + letter-spacing: -0.022rem; +} +.checkout-comment__file-input { + position: relative; +} +.checkout-comment__file-input input { + position: absolute; + visibility: hidden; +} +.checkout-comment__file-input label { + transition: .3s all; + cursor: pointer; + display: flex; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: center; + gap: 0.8rem; + border-radius: 0.4rem; + background: var(--Blue); +} +.checkout-comment__file-input label p { + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.checkout-comment__file-input label svg { + width: 1.6rem; + height: auto; +} +.checkout-payments { + display: flex; + flex-direction: column; + gap: 2rem; +} +.checkout-payments > p { + color: var(--Grey-2); + font-size: 1.1rem; + font-style: normal; + font-weight: 400; + line-height: 150%; + letter-spacing: -0.022rem; +} +.checkout-payments > p a { + color: var(--Blue); + text-decoration: underline; +} +.checkout-payment { + position: relative; +} +.checkout-payment input { + position: absolute; + visibility: hidden; +} +.checkout-payment label { + border-radius: 0.8rem; + border: 1px solid transparent; + background: var(--Light-Grey); + transition: .3s all; + position: relative; + display: flex; + align-items: center; + gap: 0.8rem; + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + letter-spacing: -0.028rem; + padding: 2.4rem; + cursor: pointer; +} +.checkout-payment label::before { + content: ''; + width: 1.6rem; + height: 1.6rem; + transition: .3s all; + background-image: url('/wp-content/uploads/2025/05/radio.svg'); + background-position: center center; + background-repeat: no-repeat; + background-size: cover; +} +.checkout-payment input:checked+label { + color: var(--Blue); + border-color: var(--Blue); +} +.checkout-payment input:checked+label::before { + background-image: url('/wp-content/uploads/2025/05/radio-checked.svg'); +} +.checkout-right { + width: 100%; + max-width: 44.3rem; +} +.checkout-sidebar { + position: sticky; + top: 5rem; + padding: 4rem; + display: flex; + flex-direction: column; + border-radius: 0.8rem; + background: var(--White); +} +.checkout-sidebar > h3 { + padding-bottom: 2.4rem; + margin-bottom: 2.4rem; + border-bottom: 0.1rem solid var(--Light-Grey-2); +} +.checkout-sidebar__col { + display: flex; + flex-direction: column; + gap: 1.6rem; + margin-bottom: 4rem; +} +.checkout-sidebar__row { + display: flex; + align-items: flex-end; + gap: 0.4rem; + justify-content: space-between; +} +.checkout-sidebar__row p { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.checkout-sidebar__row p:nth-child(2) { + color: var(--Black); + font-size: 1.8rem; + letter-spacing: -0.036rem; +} +.checkout-sidebar__price-col { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.6rem; + margin-top: 1.6rem; + margin-bottom: 4rem; +} +.checkout-sidebar__price-title { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.checkout-sidebar__price { + color: var(--Blue); + font-size: 2.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; +} +.checkout-sidebar__price span { + font-size: 1.6rem; +} +.checkout-submit { + margin-bottom: 1.6rem !important; + padding: 2.2rem 1.4rem 2.3rem 1.4rem !important; + border-radius: 0.4rem !important; + background: var(--Blue) !important; + color: var(--White) !important; + font-size: 1.6rem !important; + font-style: normal; + font-weight: 600 !important; + line-height: 120% !important; + letter-spacing: -0.032rem; +} +.checkout-submit:disabled { + background: var(--Grey-1); +} +.checkout .consult-checkbox { + margin: 0; + align-items: flex-start; +} +.checkout .consult-checkbox input[type=checkbox]:before { + margin-top: 0; +} +.checkout-data__description { + color: var(--Grey-2); + font-size: 1.1rem; + font-style: normal; + font-weight: 400; + line-height: 150%; + letter-spacing: -0.022rem; + margin-top: 0.4rem; +} +.checkout-payments__description, +.checkout-payments__online-description { + color: var(--Grey-2); + font-size: 1.1rem; + font-style: normal; + font-weight: 400; + line-height: 150%; + letter-spacing: -0.022rem; +} +.checkout-pickup { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.checkout-pickup__block { + display: flex; + padding: 3.2rem; + align-items: flex-start; + gap: 0.8rem; + border-radius: 0.8rem; + background: var(--Light-Grey); +} +.checkout-pickup__block > svg { + width: 1.6rem; + min-width: 1.6rem; + height: auto; +} +.checkout-pickup__block-col { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1.2rem; +} +.checkout-pickup__block-title { + text-transform: none; +} +.checkout-pickup__block-time { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.checkout-pickup__block-description { + color: var(--Blue-Grey); + font-size: 1.1rem; + font-style: normal; + font-weight: 400; + line-height: 150%; + letter-spacing: -0.022rem; +} +.checkout-pickup__block-link { + display: flex; + align-items: center; + gap: 0.4rem; + color: var(--Blue); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.checkout-pickup__block-link svg { + width: 1.6rem; + height: auto; +} +.checkout-pickup__map { + height: 32rem; +} +.checkout-pickup__map iframe { + width: 100%; + height: 100%; +} + +@media screen and (max-width: 992px) { + .checkout { + margin-bottom: 9.6rem; + } + .checkout-container { + gap: 4rem; + } + .checkout-main { + flex-direction: column; + gap: 4rem; + } + .checkout-left { + border-radius: 0.6rem; + gap: 4.6rem; + max-width: none; + padding: 3.2rem 1.6rem; + } + .checkout-col::before { + display: none; + } + .checkout-name { + gap: 0.8rem; + } + .checkout-name span { + width: 3.2rem; + height: 3.2rem; + font-size: 1.6rem; + letter-spacing: -0.032rem; + } + .checkout-name h3 { + font-size: 1.6rem; + } + .checkout-block { + padding-left: 0; + } + .checkout-data { + gap: 1rem; + } + .checkout-data__tabs { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .checkout-data__content.active { + gap: 1rem; + } + .checkout-delivery { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } + .checkout-delivery__item label { + padding: 1.6rem 1.6rem 1.6rem 4rem; + border-radius: 0.6rem; + } + .checkout-delivery__item label::before { + top: 1.7rem; + left: 1.6rem; + } + .checkout-comment { + gap: 2.4rem; + } + .checkout-comment__col { + gap: 1.6rem; + } + .checkout-comment__col p { + } + .checkout-comment__file { + gap: 1.6rem; + } + .checkout-comment__file > p { + } + .checkout-comment__file-input label { + padding: 1.3rem 2rem; + gap: 0.6rem; + } + .checkout-comment__file-input label p { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .checkout-comment__file-input label svg { + width: 1.4rem; + } + .checkout-payments { + gap: 1.6rem; + } + .checkout-payment label { + padding: 1.6rem; + } + .checkout-right { + max-width: none; + } + .checkout-sidebar { + position: relative; + top: 0; + padding: 2.4rem 1.6rem; + } + .checkout-sidebar > h3 { + padding-bottom: 1.6rem; + margin-bottom: 1.6rem; + } + .checkout-sidebar__col { + gap: 1.2rem; + } + .checkout-sidebar__row p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .checkout-sidebar__row p:nth-child(2) { + font-size: 1.6rem; + letter-spacing: -0.032rem; + } + .checkout-sidebar__price-col { + gap: 1.2rem; + margin-bottom: 3.2rem; + } + .checkout-submit { + margin-bottom: 1.6rem; + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .checkout-data__description { + margin-top: 0.6rem; + } + .checkout-pickup { + gap: 1rem; + } + .checkout-pickup__block { + padding: 2rem; + } + .checkout-pickup__block-title { + margin-bottom: -0.4rem; + } + .checkout-pickup__map { + height: 24rem; + } +} + +/* checkout-error */ + +.checkout-error { + padding: 10.4rem 2rem; + border-radius: 0.8rem; + background: var(--White); + display: flex; + flex-direction: column; + align-items: center; +} +.checkout-error__icon { + display: flex; + width: 6.4rem; + height: 6.4rem; + flex-direction: column; + justify-content: center; + align-items: center; + border-radius: 100%; + background: var(--Red); + color: var(--White); + text-align: center; + font-size: 3.2rem; + font-style: normal; + font-weight: 600; + line-height: 100%; + letter-spacing: -0.064rem; + margin-bottom: 4rem; +} +.checkout-error h3 { + margin-bottom: 1.6rem; +} +.checkout-error p { + color: var(--Grey-2); + text-align: center; + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; + margin-bottom: 4rem; + max-width: 43.6rem; +} +.checkout-error p a { + color: var(--Blue); + text-decoration: underline; +} +.checkout-error__link { + display: flex; + width: 24rem; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: flex-end; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.checkout-error__link svg { + width: 1.9rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .checkout-error { + padding: 9.6rem 1.6rem; + border-radius: 0.6rem; + } + .checkout-error p { + max-width: 28rem; + } + .checkout-error__link { + width: 24.6rem; + } + .checkout-error__link svg { + width: 1.8rem; + } +} + +/* lk */ + +.lk { + margin-bottom: 14.4rem; +} +.lk-container { + display: flex; + align-items: flex-start; + gap: 1.6rem; +} +.lk-menu { + position: sticky; + top: 5rem; + width: 100%; + max-width: 32.8rem; + display: flex; + flex-direction: column; +} +.lk-menu__link { + display: flex; + padding: 2.3rem 2.4rem; + align-items: center; + gap: 1.2rem; + border-bottom: 1px solid var(--Light-Grey-2); + background: var(--White); + justify-content: space-between; +} +.lk-menu__link svg { + width: 1.2rem; + height: auto; +} +.lk-menu__link.active { + background: var(--Blue); + color: var(--White); +} +.lk-menu__link.active svg path { + fill: var(--White); +} +.lk-menu__logout { + justify-content: flex-start; +} +.lk-menu__logout svg { + width: 1.6rem; +} +.lk-menu__link:hover { + color: var(--Blue); +} +.lk-menu__link:hover path { + fill: var(--Blue); +} +.lk-menu__link.active:hover { + color: var(--White); +} +.lk-menu__link.active:hover path { + fill: var(--White); +} +.lk-menu__link:first-child { + border-radius: 0.8rem 0.8rem 0rem 0rem; +} +.lk-menu__link:last-child { + border-radius: 0rem 0rem 0.8rem 0.8rem; +} +.lk-main { + width: 100%; + max-width: 101.6rem; + padding: 4rem; + border-radius: 0.8rem; + background: var(--White); +} +.profile { + display: flex; + flex-direction: column; + gap: 4rem; +} +.profile-main { + display: flex; + flex-direction: column; + gap: 4rem; + max-width: 75.9rem; +} +.profile-col { + display: flex; + flex-direction: column; + gap: 2.4rem; +} +.profile-inputs { + display: flex; + flex-direction: column; + gap: 2rem; +} +.profile-input { + display: flex; + flex-direction: column; + gap: 0.8rem; + position: relative; +} +.profile-input input { + color: var(--Blue); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.028rem; + padding: 2rem; + width: 100%; + border-radius: 0.6rem; + background: var(--Light-Grey); + border: 1px solid transparent; +} +.profile-input input::placeholder { + color: var(--Grey-2); +} +.profile-input__button { + display: flex; + padding: 0.9rem 1.6rem; + align-items: center; + gap: 0.6rem; + border-radius: 10rem; + background: var(--Blue); + color: var(--White); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; + position: absolute; + right: 2rem; + top: 1.3rem; +} +.profile-input__button svg { + width: 1.2rem; + height: auto; +} +.profile-input > p { + color: var(--Grey-1); + font-size: 1.2rem; + font-style: normal; + font-weight: 500; + line-height: 140%; + letter-spacing: -0.024rem; +} +.profile-password { + display: flex; + align-items: flex-start; + gap: 1.6rem; +} +.profile-password__col { + width: 100%; + max-width: 52.6rem; + display: flex; + flex-direction: column; + gap: 2rem; +} +.profile-password__button { + display: flex; + position: absolute; + right: 2rem; + top: 2rem; +} +.profile-password__button img { + width: 1.6rem; +} +.profile-password__change { + color: var(--Grey-1); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + margin-top: 1.9rem; +} +.profile-buttons { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 2rem; +} +.profile-submit { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.profile-delete { + display: flex; + align-items: center; + gap: 0.2rem; + color: var(--Grey-1); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.profile-delete svg { + width: 2rem; + height: auto; +} +.profile-delete:hover { + color: var(--Red); +} +.profile-delete:hover svg path { + stroke: var(--Red); +} +.lk-menu__mobile { + display: none; +} +.lk-logout__mob { + display: none; +} +.profile-hint { + display: none; +} +.profile-hint.active { + padding: 2.4rem; + display: flex; + flex-direction: column; + gap: 1.6rem; + border-radius: 0.6rem; + border: 1px solid var(--Blue); + background: var(--White); + box-shadow: 1px 4px 16px 0px rgba(0, 0, 0, 0.10); + margin-top: 1rem; + position: absolute; + top: 100%; + left: 0; + width: 100%; + z-index: 9; +} +.profile-hint > p { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.036rem; +} +.profile-hint__col { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.profile-hint__item { + display: flex; + flex-direction: column; + gap: 0.6rem; +} +.profile-hint__item p:nth-child(1) { + color: var(--Black); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + text-align: left; +} +.profile-hint__item p:nth-child(2) { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + text-align: left; +} +.profile-password__col-new { + max-width: none; +} +.profile-password__new { + display: flex; + gap: 1.6rem; +} +.profile-password__new .profile-input { + width: 25.5rem; +} +.profile-password__new-submit { + padding: 1.8rem 2.4rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.profile-password__new-hint { + display: flex; + padding: 1.6rem; + align-items: center; + gap: 1.2rem; + border-radius: 0.6rem; + background: var(--Light-Grey); + max-width: 45.7rem; +} +.profile-password__new-hint svg { + width: 1.6rem; + min-width: 1.6rem; + height: auto; +} +.profile-password__new-hint p { + color: var(--Black); + font-size: 1.2rem; + font-style: normal; + font-weight: 500; + line-height: 140%; + letter-spacing: -0.024rem; +} +.profile-password__change:hover { + color: var(--Blue); +} +.profile-individual .profile-inputs { + max-width: 52.6rem; +} + +@media screen and (max-width: 992px) { + .lk { + margin-bottom: 9.6rem; + } + .lk-container { + flex-direction: column; + gap: 4.8rem; + } + .lk-menu { + display: none; + } + .lk-main { + max-width: none; + padding: 3.2rem 1.6rem; + } + .profile-main { + gap: 3.2rem; + } + .profile-inputs { + gap: 1rem; + } + .profile-input input { + font-size: 1.2rem; + letter-spacing: -0.024rem; + padding: 1.6rem 1.8rem; + } + .profile-input__button { + padding: 1rem 1.8rem; + font-size: 1rem; + letter-spacing: -0.02rem; + right: 0.8rem; + top: 0.8rem; + } + .profile-input__button p { + display: none; + } + .profile-input__button-email p { + display: block; + } + .profile-password { + flex-direction: column; + gap: 2rem; + } + .profile-password__col { + max-width: none; + } + .profile-password__button { + right: 1.8rem; + top: 1.5rem; + } + .profile-password__change { + margin-top: 0; + } + .profile-submit { + width: 100%; + } + .lk-menu__mobile { + display: flex; + flex-direction: column; + width: 100%; + position: relative; + } + .lk-menu__mobile > p { + padding: 2.3rem 2rem; + border-radius: 0.8rem 0.8rem 0rem 0rem; + border-bottom: 1px solid var(--Light-Grey-2); + background: var(--White); + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + } + .lk-menu__mobile-button { + display: flex; + justify-content: space-between; + padding: 1.9rem 2rem 2rem 2rem; + align-items: center; + gap: 0.8rem; + border-radius: 0rem 0rem 0.4rem 0.4rem; + background: var(--White); + } + .lk-menu__mobile-button p { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + } + .lk-menu__mobile-button svg { + width: 1.6rem; + height: auto; + } + .lk-menu__mobile-button.active { + background: var(--Blue); + } + .lk-menu__mobile-button.active p { + color: var(--White); + } + .lk-menu__mobile-button.active svg { + transform: rotate(180deg); + } + .lk-menu__mobile-button.active svg path { + fill: var(--White); + } + .lk-menu__mobile-content { + display: none; + } + .lk-menu__mobile-content.active { + display: flex; + flex-direction: column; + gap: 0.4rem; + padding: 2rem; + border-radius: 0.4rem; + border: 1px solid var(--Blue); + background: var(--White); + box-shadow: 1px 4px 16px 0px rgba(0, 0, 0, 0.10); + position: absolute; + top: 100%; + width: 100%; + left: 0; + margin-top: 0.8rem; + z-index: 9; + } + .lk-menu__mobile-content__link { + padding: 1.5rem 2rem; + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + border-radius: 0.4rem; + background: var(--Light-Blue); + display: flex; + align-items: center; + justify-content: space-between; + } + .lk-menu__mobile-content__link svg { + opacity: 0; + transition: .3s all; + } + .lk-menu__mobile-content__link.active svg { + opacity: 1; + } + .lk-logout__mob { + display: flex; + padding: 2.3rem 2.4rem; + border-radius: 0.4rem; + border-bottom: 1px solid var(--Light-Grey-2); + background: var(--White); + align-items: center; + gap: 0.8rem; + color: var(--Grey-1); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + width: 100%; + } + .lk-logout__mob svg { + width: 1.6rem; + height: auto; + } + .profile-hint.active { + padding: 1.6rem; + } + .profile-hint__item p:nth-child(1) { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .profile-hint__item p:nth-child(2) { + font-size: 1.2rem; + } + .profile-password__new { + flex-direction: column; + } + .profile-password__new .profile-input { + width: 100%; + } + .profile-password__new-submit { + padding: 1.2rem 1.7rem; + font-size: 1rem; + margin-right: auto; + letter-spacing: -0.02rem; + } + .profile-password__new-hint { + padding: 1.6rem; + flex-direction: column; + align-items: flex-start; + gap: 0.8rem; + max-width: none; + } + .profile-password__new-hint p { + font-size: 1rem; + letter-spacing: -0.03rem; + max-width: 25rem; + } + .profile-individual .profile-inputs { + max-width: none; + } +} + +/* popup password change */ + +.popup-password_change__col { + display: flex; + flex-direction: column; +} +.popup-password_change__name { + display: flex; + flex-direction: column; + gap: 2.5rem; +} +.popup-password_change__name p { + color: #7B7B7B; + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.042rem; +} + +@media screen and (max-width: 992px) { + .popup-password_change__name { + align-items: center; + gap: 1.6rem; + } + .popup-password_change__name h4 { + text-align: center; + } + .popup-password_change__name p { + text-align: center; + } +} + +/* popup delete acc */ + +.popup-delete_acc-col { + display: flex; + flex-direction: column; + gap: 4rem; +} +.popup-delete_acc-buttons { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1.6rem; +} +.popup-delete_acc-yes { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + border: 1px solid var(--Blue); + color: var(--Blue); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.popup-delete_acc-no { + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} + +@media screen and (max-width: 992px) { + .popup-delete_acc .popup-password_change__name h4 { + max-width: 20rem; + } + .popup-delete_acc .popup-password_change__name p { + max-width: 23rem; + } + .popup-delete_acc-col { + gap: 3.2rem; + } + .popup-delete_acc-buttons { + grid-template-columns: repeat(1, 1fr); + gap: 1rem; + } +} + +/* orders */ + +.lk-orders { + display: flex; + flex-direction: column; + gap: 6.4rem; + width: 100%; + max-width: 101.6rem; +} +.orders { + display: flex; + flex-direction: column; + gap: 3.2rem; + border-radius: 0.8rem; + background: var(--White); + padding: 4rem; +} +.orders-empty { + display: flex; + flex-direction: column; + align-items: center; + padding: 4rem; + border-radius: 0.6rem; + border: 1px solid var(--Light-Grey-2); + background: var(--White); +} +.orders-empty h4 { + margin-bottom: 1.6rem; +} +.orders-empty p { + color: var(--Grey-2); + text-align: center; + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; + margin-bottom: 4rem; +} +.orders-empty a { + display: flex; + width: 24rem; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: center; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.orders-empty a svg { + width: 1.8rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .lk-orders { + gap: 4rem; + max-width: none; + } + .orders { + padding: 3.2rem 1.6rem 1.6rem 1.6rem; + } + .orders-empty { + padding: 9.6rem 4rem; + } +} + +/* orders */ + +.orders-main { + margin-top: 0.8rem; + display: flex; + flex-direction: column; +} +.orders-name { + padding-bottom: 2.4rem; + border-bottom: 1px solid var(--Light-Grey-2); + display: grid; + grid-template-columns: repeat(5, 1fr); + gap: 1.6rem; +} +.orders-name p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 400; + line-height: 140%; + letter-spacing: -0.028rem; +} +.orders-col { + display: flex; + flex-direction: column; +} +.orders-row { + display: grid; + grid-template-columns: repeat(5, 1fr); + gap: 1.6rem; + border-bottom: 1px solid var(--Light-Grey-2); + padding: 2.4rem 0rem; + align-items: center; +} +.orders-row__number-col { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.6rem; +} +.orders-row__number { + color: var(--Black); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.orders-row__number-date { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.orders-row__price p { + color: var(--Black); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.orders-row__status { + display: flex; +} +.orders-row__status p { + border-radius: 0.4rem; + padding: 0.8rem 1.2rem; + text-align: center; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; +} +.orders-accept { + color: #8D53F8; + background: #F5F1FF; +} +.orders-received { + color: var(--Green); + background: var(--Light-green); +} +.orders-cancel { + color: var(--Red); + background: var(--Light-red); +} +.orders-processing { + color: #FFAC07; + background: #FFF7E8; +} +.orders-pay { + color: var(--Green); + border: 1px solid var(--Green); +} +.orders-way { + color: #1E67D3; + background: #EFF5FF; +} +.orders-row__mob { + display: none; +} + +@media screen and (max-width: 992px) { + .orders-main { + margin-top: 0; + } + .orders-name { + display: none; + } + .orders-col { + gap: 2.4rem; + } + .orders-row { + display: flex; + flex-direction: column; + align-items: flex-start; + padding: 0 0 2.4rem 0; + } + .orders-row__number-col { + order: 2; + } + .orders-row__price { + display: none; + } + .orders-row__mob { + display: flex; + flex-direction: column; + order: 3; + gap: 0.8rem; + width: 100%; + } + .orders-row__mob-row { + display: flex; + align-items: center; + justify-content: space-between; + } + .orders-row__mob-row p { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; + } + .orders-row__mob-row p:nth-child(2) { + color: var(--Black); + } +} + +/* order */ + +.order { + display: flex; + flex-direction: column; + gap: 4rem; +} +.order-back { + margin-right: auto; + display: flex; + align-items: center; + gap: 0.8rem; + color: var(--Blue); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.order-back svg { + width: 1.6rem; + height: auto; +} +.order-name { + display: flex; + align-items: center; + gap: 2rem; +} +.order-main { + display: flex; + align-items: flex-start; + gap: 4rem; +} +.order-structure { + width: 100%; + max-width: 53.1rem; + display: flex; + flex-direction: column; + gap: 2.4rem; +} +.order-structure > p { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.036rem; +} +.order-products { + display: flex; + flex-direction: column; +} +.order-product { + border-bottom: 1px solid var(--Light-Grey-2); + background: var(--White); + padding: 2.4rem 0rem; + display: flex; + align-items: flex-start; + gap: 1.6rem; +} +.order-product:first-child { + border-top: 1px solid var(--Light-Grey-2); +} +.order-product__img { + width: 12rem; + min-width: 12rem; + height: 12rem; +} +.order-product__img img { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 0.6rem; +} +.order-product__main { + display: flex; + flex-direction: column; + align-items: flex-start; +} +.order-product__sku { + display: flex; + align-items: center; + gap: 0.4rem; + margin-bottom: 2.4rem; +} +.order-product__sku p { + color: var(--Grey-2); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; +} +.order-product__sku p:nth-child(2) { + color: var(--Black); +} +.order-product__title { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + text-transform: uppercase; + margin-bottom: 1.6rem; +} +.order-product__chars { + display: flex; + flex-direction: column; + gap: 0.8rem; + margin-bottom: 1.6rem; +} +.order-product__chars-row { + display: flex; + align-items: flex-end; + gap: 0.4rem; +} +.order-product__chars-row p { + color: var(--Grey-2); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; +} +.order-product__chars-row p:nth-child(2) { + color: var(--Black); +} +.order-product__price { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + text-transform: uppercase; +} +.order-data { + width: 100%; + max-width: 36.5rem; + display: flex; + flex-direction: column; + gap: 4rem; +} +.order-data__block { + display: flex; + flex-direction: column; + gap: 2rem; +} +.order-data__block > p { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.036rem; +} +.order-data__block-col { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.order-data__block-col p { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.order-data__info { + display: flex; + flex-direction: column; + gap: 2.4rem; +} +.order-data__info-col { + display: flex; + flex-direction: column; + gap: 1.6rem; +} +.order-data__info-row { + display: flex; + justify-content: space-between; + align-items: flex-end; + gap: 0.4rem; +} +.order-data__info-row p { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.order-data__info-row p:nth-child(2) { + color: var(--Black); + text-align: right; + font-size: 1.8rem; + letter-spacing: -0.036rem; +} +.order-data__prices { + display: flex; + flex-direction: column; + gap: 0.6rem; + padding-top: 2.4rem; + border-top: 1px solid #F1F1F1; +} +.order-data__prices > p { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.order-data__prices-row { + display: flex; + align-items: flex-end; +} +.order-data__price { + color: var(--Blue); + font-size: 2.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; +} +.order-data__price span { + font-size: 1.6rem; +} + +@media screen and (max-width: 992px) { + .order { + gap: 3.2rem; + } + .order-name { + flex-direction: column; + align-items: flex-start; + gap: 1.2rem; + } + .order-main { + flex-direction: column; + gap: 3.2rem; + } + .order-structure { + max-width: none; + gap: 1.6rem; + } + .order-structure > p { + font-size: 1.6rem; + letter-spacing: -0.032rem; + } + .order-product { + gap: 1.2rem; + } + .order-product__img { + width: 6.4rem; + min-width: 6.4rem; + height: 6.4rem; + } + .order-product__img img { + border-radius: 0.4rem; + } + .order-product__sku { + gap: 0.2rem; + margin-bottom: 1.6rem; + } + .order-product__sku p { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .order-product__chars { + margin-bottom: 2.4rem; + } + .order-data { + max-width: none; + gap: 2.4rem; + } + .order-data__block { + gap: 1.6rem; + } + .order-data__block > p { + font-size: 1.6rem; + letter-spacing: -0.032rem; + } + .order-data__block-col { + gap: 1.2rem; + } + .order-data__block-col p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .order-data__info { + margin-top: 0.8rem; + } + .order-data__info-col { + gap: 1.2rem; + } + .order-data__info-row p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .order-data__info-row p:nth-child(2) { + font-size: 1.6rem; + letter-spacing: -0.032rem; + } + .order-data__prices > p { + font-size: 1.4rem; + letter-spacing: -0.028rem; + } + .order-data__prices-row { + display: flex; + align-items: flex-end; + } +} + +/* thanks */ + +.thanks { + margin-bottom: 14.4rem; +} +.thanks-container { + display: flex; + flex-direction: column; + gap: 6.4rem; +} +.thanks-main { + padding: 4rem; + border-radius: 0.8rem; + background: var(--White); + display: flex; + flex-direction: column; + gap: 2.4rem; +} +.thanks .order-structure { + max-width: 87.5rem; +} +.thanks-link { + display: flex; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: flex-end; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; + margin-right: auto; +} +.thanks-link svg { + width: 1.8rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .thanks { + margin-bottom: 9.6rem; + } + .thanks-container { + gap: 4rem; + } + .thanks-main { + padding: 3.2rem 1.6rem; + gap: 3.2rem; + } + .thanks .order-structure { + max-width: 87.5rem; + } + .thanks-link { + width: 100%; + } +} + +/* minicart */ + +.minicart__fon { + display: none; + background: rgba(44, 56, 70, 0.10); + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 998; +} +.minicart { + display: none; + position: absolute; + top: 15rem; + right: 13.5rem; + width: 100%; + max-width: 64.5rem; + z-index: 999; + border-radius: 0.8rem; + background: var(--White); + flex-direction: column; + gap: 4rem; + padding: 4rem; +} +.minicart-products { + display: flex; + flex-direction: column; + gap: 1.6rem; + max-height: 25rem; + overflow-y: auto; + padding-right: 1rem; +} +.minicart-product { + display: flex; + align-items: flex-start; + gap: 1.6rem; +} +.minicart-product__img { + width: 7.2rem; + min-width: 7.2rem; + height: 7.2rem; + display: flex; +} +.minicart-product__img img { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 0.4rem; +} +.minicart-product__main { + display: flex; + justify-content: space-between; + align-items: flex-start; + width: 100%; +} +.minicart-product__title { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + text-transform: uppercase; + max-width: 33.7rem; +} +.minicart-product__title span { + color: var(--Grey-2); +} +.minicart-product__row { + display: flex; + align-items: center; + gap: 1.6rem; +} +.minicart-product__price { + color: var(--Black); + font-size: 1.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; +} +.minicart-product__oldprice { + color: var(--Grey-2); + font-size: 1.4rem; + font-weight: 600; + text-decoration: line-through; +} +.minicart-product__delete { + display: flex; +} +.minicart-product__delete svg { + width: 2rem; + height: auto; +} +.minicart-product__delete:hover svg path { + fill: var(--Grey-2); +} +.minicart-bottom { + display: flex; + justify-content: space-between; + align-items: flex-end; + padding-top: 1.6rem; + border-top: 0.1rem solid var(--Light-Grey-2); +} +.minicart-prices { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1.2rem; +} +.minicart-price__title { + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.minicart-price { + color: var(--Blue); + font-size: 2.8rem; + font-style: normal; + font-weight: 700; + line-height: 130%; + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; +} +.minicart-price__old { + color: var(--Grey-2); + font-size: 1.6rem; + font-weight: 600; + text-decoration: line-through; +} +.minicart-price span span { + font-size: 1.6rem; +} +.minicart-link { + display: flex; + padding: 2.2rem 2.4rem 2.3rem 2.4rem; + justify-content: center; + align-items: flex-end; + gap: 0.6rem; + border-radius: 0.4rem; + background: var(--Blue); + color: var(--White); + font-size: 1.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.032rem; +} +.minicart-link svg { + width: 1.8rem; + height: auto; +} + +@media screen and (max-width: 992px) { + .minicart { + top: 10.2rem; + right: 1rem; + max-width: 34rem; + gap: 3.2rem; + padding: 2.4rem 1.6rem; + } + .minicart-product { + gap: 1.2rem; + } + .minicart-product__img { + width: 6.4rem; + min-width: 6.4rem; + height: 6.4rem; + } + .minicart-product__main { + flex-direction: column; + gap: 1.6rem; + } + .minicart-product__title { + font-size: 1.2rem; + max-width: none; + } + .minicart-product__row { + gap: 1.2rem; + } + .minicart-product__price { + font-size: 1rem; + } + .minicart-product__delete svg { + width: 1.6rem; + } + .minicart-bottom { + flex-direction: column; + align-items: flex-start; + gap: 1rem; + } + .minicart-prices { + gap: 0.8rem; + } + .minicart-price__title { + font-size: 1.2rem; + letter-spacing: -0.024rem; + } + .minicart-price { + font-size: 1.8rem; + } + .minicart-price span { + font-size: 1.8rem; + } + .minicart-link { + width: 100%; + } +} + +/* pc_menu */ + +.change .bar:nth-child(1) { + transform: rotate(-45deg) translate(-0.3rem, 0.4rem); +} +.change .bar:nth-child(2) { + opacity: 0; +} +.change .bar:nth-child(3) { + transform: rotate(45deg) translate(-0.4rem, -0.6rem); +} +.pc_menu__fon { + display: none; +} +.pc_menu__fon.active { + display: flex; + background: var(--black-blue-10); + position: fixed; + top: 14.4rem; + left: 0; + width: 100%; + height: calc(100vh - 14.4rem); + z-index: 998; +} +.pc_menu { + display: none; +} +.pc_menu.active { + z-index: 999; + display: flex; + position: fixed; + top: 14.4rem; + left: 4rem; + box-shadow: 8px 8px 10px 0px rgba(0, 0, 0, 0.04); + background: #FFF; +} +.pc_menu .topmenu > li { + list-style: none; +} +.pc_menu .topmenu { + display: flex; + flex-direction: column; + width: 25.9rem; + position: relative; +} +.pc_menu .topmenu > li > a { + border-bottom: 1px solid var(--Light-Grey-2); + background: var(--White); + display: flex; + padding: 1.2rem; + align-items: center; + gap: 1.2rem; + justify-content: space-between; + height: 6rem; +} +.pc_menu-link svg { + transition: .3s all; + width: 1.2rem; + height: auto; +} +.pc_menu-link__row { + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + display: flex; + align-items: center; + gap: 1.2rem; +} +.pc_menu-link__row img { + width: 3.6rem; +} +.pc_menu .submenu { + position: absolute; + z-index: 5; + width: 25.9rem; + left: 100%; + visibility: hidden; + opacity: 0; + transform-origin: 0% 0%; + transform: rotateX(-90deg); + transition: .3s linear; + top: 0; + height: 100%; + border-bottom: 1px solid var(--Light-Grey); + border-left: 1px solid var(--Light-Grey); + background: var(--White); + box-shadow: 8px 8px 10px 0px rgba(0, 0, 0, 0.04); +} +.pc_menu .submenu li { + list-style: none; +} +.pc_menu .submenu li a { + border-bottom: 1px solid var(--Light-Grey); + border-left: 1px solid var(--Light-Grey); + background: var(--White); + color: var(--Black); + font-size: 1.4rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.028rem; + display: flex; + align-items: center; + justify-content: space-between; + height: 6rem; + padding: 1.2rem; +} +.pc_menu .submenu li a svg { + width: 1.2rem; + height: auto; + transition: .3s all; + transform: rotate(-90deg); +} +.pc_menu .submenu .submenu { + position: absolute; + left: 100%; + transition: .3s linear; +} +.pc_menu nav li:hover > .submenu { + transform: rotateX(0deg); + visibility: visible; + opacity: 1; +} +.pc_menu nav li:hover > a svg path { + fill: var(--Blue); +} +.pc_menu nav .topmenu > li:hover > a svg { + transform: rotate(-90deg); +} +.pc_menu nav .submenu li:hover > a { + color: var(--Blue); +} +body.hidden { + overflow: hidden; +} +.menu_mob { + display: none; +} +.header-catalog__button-mob { + display: none; +} +.pc_menu-home.active { + position: absolute; + top: 16rem; +} +.checkout-description { + display: none; + color: var(--Grey-2); + font-size: 1.6rem; + font-style: normal; + font-weight: 500; + line-height: 120%; + letter-spacing: -0.032rem; +} +.checkout-description a { + text-decoration: underline; +} +body.page { + margin-bottom: 0 !important; +} +#callback-form input[type="text"], #callback-form input[type="tel"], #callback-form input[type="email"] { + background: var(--Light-Grey); +} + +@media screen and (max-width: 992px) { + .header-catalog__button { + display: none; + } + .header-catalog__button-mob { + display: flex; + align-items: center; + gap: 0.8rem; + background: var(--Blue); + width: 4rem; + min-width: 4rem; + height: 4rem; + padding: 1.3rem 1.2rem; + border-radius: 0.4rem; + } + .menu_mob.active { + display: flex; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + overflow: auto; + z-index: 997; + background: #FFF; + padding-bottom: 4rem; + flex-direction: column; + gap: 1rem; + padding-top: 1.6rem; + } + .menu_mob-logo { + margin-left: 1.6rem; + display: flex; + margin-right: auto; + } + .menu_mob-logo img { + width: 13rem; + } + .menu_mob-close { + position: absolute; + top: 1.6rem; + right: 1.6rem; + display: flex; + } + .menu_mob-close svg { + width: 2rem; + height: auto; + } + .menu_mob-column { + display: flex; + flex-direction: column; + } + .menu_mob-column > nav { + margin-bottom: 3.2rem; + padding: 0 1.6rem; + } + .menu_mob-column > nav ul { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1rem; + } + .menu_mob-column > nav ul li { + list-style: none; + display: flex; + } + .menu_mob-column > nav ul li a { + color: #000; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; + } + .menu_mob-menu { + display: flex; + flex-direction: column; + margin-bottom: 2.4rem; + } + .menu_mob-menu__button { + border-bottom: 1px solid var(--Light-Grey-2); + background: var(--White); + display: flex; + padding: 0.8rem 1.6rem; + align-items: center; + gap: 1.2rem; + justify-content: space-between; + } + .menu_mob-menu__button svg { + transition: .3s all; + width: 1.2rem; + height: auto; + } + .menu_mob-button-row { + display: flex; + align-items: center; + gap: 1.2rem; + } + .menu_mob-button-row img { + width: 2rem; + } + .menu_mob-button-row p { + color: var(--Black); + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 130%; + letter-spacing: -0.024rem; + } + .menu_mob-bottom { + display: flex; + flex-direction: column; + gap: 2.4rem; + padding: 0 1.6rem; + } + .menu_mob-contacts { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1.2rem; + } + .menu_mob-contacts a { + display: flex; + align-items: center; + gap: 0.6rem; + color: #808080; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; + } + .menu_mob-contacts a svg { + width: 1.2rem; + height: auto; + } + .menu_mob-buttons { + display: flex; + gap: 1rem; + } + .menu_mob-button { + display: flex; + padding: 0.4rem 1.2rem 0.4rem 0.4rem; + align-items: center; + gap: 0.2rem; + border-radius: 0.4rem; + background: var(--Light-Grey); + color: var(--Blue-Black); + text-align: center; + font-size: 1.2rem; + font-style: normal; + font-weight: 600; + line-height: 110%; + letter-spacing: -0.024rem; + } + .menu_mob-button__icon { + width: 3.2rem; + height: 3.2rem; + display: flex; + justify-content: center; + align-items: center; + position: relative; + } + .menu_mob-button__icon svg { + width: 1.6rem; + height: auto; + } + .menu_mob-button__icon span { + display: flex; + padding: 0.2rem 0.4rem; + position: absolute; + right: 0.2rem; + top: 0.2rem; + border-radius: 10rem; + background: var(--Blue); + color: var(--White); + text-align: center; + leading-trim: both; + text-edge: cap; + font-size: 0.6rem; + font-style: normal; + font-weight: 600; + line-height: 120%; + letter-spacing: -0.024rem; + } + .menu_mob-menu__content-name { + display: flex; + align-items: center; + gap: 1.2rem; + padding: 0 1.6rem; + } + .menu_mob-menu__content-back { + display: flex; + } + .menu_mob-menu__content-back svg { + width: 2rem; + height: auto; + } + .menu_mob-menu__content { + display: flex; + flex-direction: column; + gap: 2.9rem; + } + .pc_menu.active { + display: none; + } +} + +/* hovers */ + +.header-catalog__button:hover, +.categories-more:hover, +.product_item-link:hover, +.footer-callback:hover, +.consult-submit:hover, +.product_page-submit:hover, +.aboutus-link:hover, +.projects-more:hover, +.page_404-link:hover, +.cart-submit:hover, +.cart-empty__link:hover, +.popup-cart__delete:hover, +.checkout-comment__file-input label:hover, +.checkout-submit:hover, +.checkout-error__link:hover, +.login-form__submit:hover, +.popup-registration__submit:hover, +.profile-input__button:hover, +.profile-submit:hover, +.profile-password__new-submit:hover, +.popup-delete_acc-no:hover, +.orders-empty a:hover, +.thanks-link:hover +{ + background: var(--Dark-Blue); +} +.header-catalog__button:focus, +.categories-more:focus, +.product_item-link:focus, +.footer-callback:focus, +.consult-submit:focus, +.product_page-submit:focus, +.aboutus-link:focus, +.projects-more:focus, +.page_404-link:focus, +.cart-submit:focus, +.cart-empty__link:focus, +.popup-cart__delete:focus, +.checkout-comment__file-input label:focus, +.checkout-submit:focus, +.checkout-error__link:focus, +.login-form__submit:focus, +.popup-registration__submit:focus, +.profile-input__button:focus, +.profile-submit:focus, +.profile-password__new-submit:focus, +.popup-delete_acc-no:focus, +.orders-empty a:focus, +.thanks-link:focus +{ + background: var(--Dark-Blue-Grey); +} +.product_item-title:hover, +.footer-menu ul li a:hover, +.footer-menu ul li a.active, +.footer-copyright__row a:hover, +.footer-contacts__item a:hover, +.catalog_page-menu__item-content-item-row a:hover, +.catalog_page-menu__item-content-item-content a:hover, +.contacts-item__col > a:hover, +.login-form__link:hover +{ + color: var(--Blue); +} +.products-prev:hover, +.products-next:hover, +.product_page-prev:hover, +.product_page-next:hover, +.partners-prev:hover, +.partners-next:hover, +.history-prev:hover, +.history-next:hover, +.catalog_page-pagination-item:hover, +.product_page-tab:hover, +.documentation-tab:hover +{ + background: var(--Blue); +} +.link-more:hover, +.cart_more-link:hover, +.checkout-pickup__block-link:hover, +.login-form__actions-row a:hover, +.popup-registration__code-button:hover, +.order-back:hover +{ + color: var(--Dark-Blue); +} +.link-more:hover path, +.cart_more-link:hover path, +.checkout-pickup__block-link:hover path, +.login-form__actions-row a:hover path, +.popup-registration__code-button:hover path, +.order-back:hover path +{ + fill: var(--Dark-Blue); +} +.link-more:focus, +.cart_more-link:focus, +.checkout-pickup__block-link:focus, +.login-form__actions-row a:focus, +.popup-registration__code-button:focus, +.order-back:focus +{ + color: var(--Dark-Blue-Grey); +} +.link-more:focus path, +.cart_more-link:focus path, +.checkout-pickup__block-link:focus path, +.login-form__actions-row a:focus path, +.popup-registration__code-button:focus path, +.order-back:focus path +{ + fill: var(--Dark-Blue-Grey); +} +.breadcumbs ul li a:hover +{ + color: var(--Dark-Blue); +} +.catalog_page-pagination-item:hover, .product_page-tab:hover, .documentation-tab:hover { + color: var(--White); +} +.cart-product__delete:hover { + color: var(--Red); +} +.cart-product__delete:hover path { + stroke: var(--Red); +} +.popup-cart__cancel:hover, .popup-delete_acc-yes:hover { + border-color: var(--Dark-Blue); + color: var(--Dark-Blue); +} +.popup-cart__cancel:focus, .popup-delete_acc-yes:focus { + border-color: var(--Dark-Blue-Grey); + color: var(--Dark-Blue-Grey); +} +.catalog_page-pagination-item:hover path { + stroke: var(--White); +} +.header-catalog__button.change { + background: var(--Blue-Black); +} +.consult-form input[type="text"]:hover, .consult-form input[type="tel"]:hover, .consult-form input[type="email"]:hover { + border-color: var(--Blue); +} +.consult-form input[type="text"]:focus, .consult-form input[type="tel"]:focus, .consult-form input[type="email"]:focus { + border-color: var(--Blue); +} +.checkout-data__input input:hover { + border-color: var(--Blue); +} +.checkout-data__input input:focus { + border-color: var(--Blue); +} +.checkout-comment__col textarea:hover { + border-color: var(--Blue); +} +.checkout-comment__col textarea:focus { + border-color: var(--Blue); +} +.login-form__input input:hover { + border-color: var(--Blue); +} +.login-form__input input:focus { + border-color: var(--Blue); +} +.popup-registration__input input:hover { + border-color: var(--Blue); +} +.popup-registration__input input:focus { + border-color: var(--Blue); +} +.profile-input input:hover { + border-color: var(--Blue); +} +.profile-input input:focus { + border-color: var(--Blue); +} +.checkout-submit:disabled:hover { + background: var(--Grey-1); +} + +/* Mini-cart strikethrough price */ +.mini-cart-old-price { + color: var(--Grey-2); + font-size: 0.85em; + margin-left: 5px; +} +.woocommerce-mini-cart-item .quantity { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 3px; +} \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/assets/js/fancybox.min.js b/wp-content/themes/orgsteklo/assets/js/fancybox.min.js new file mode 100644 index 0000000..a68b257 --- /dev/null +++ b/wp-content/themes/orgsteklo/assets/js/fancybox.min.js @@ -0,0 +1,13 @@ +// ================================================== +// fancyBox v3.5.7 +// +// Licensed GPLv3 for open source use +// or fancyBox Commercial License for commercial use +// +// http://fancyapps.com/fancybox/ +// Copyright 2019 fancyApps +// +// ================================================== +!function(t,e,n,o){"use strict";function i(t,e){var o,i,a,s=[],r=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=h(t.data.options,e)),o=e.$target||n(t.currentTarget).trigger("blur"),(a=n.fancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(e.selector?s=n(e.selector):(i=o.attr("data-fancybox")||"",i?(s=t.data?t.data.items:[],s=s.length?s.filter('[data-fancybox="'+i+'"]'):n('[data-fancybox="'+i+'"]')):s=[o]),r=n(s).index(o),r<0&&(r=0),a=n.fancybox.open(s,e,r),a.$trigger=o))}if(t.console=t.console||{info:function(t){}},n){if(n.fn.fancybox)return void console.info("fancyBox already initialized");var a={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'',spinnerTpl:'
',errorTpl:'

{{ERROR}}

',btnTpl:{download:'',zoom:'',close:'',arrowLeft:'',arrowRight:'',smallBtn:''},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded.
Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden.
Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergrößern"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),u=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),f=function(){var t,n=e.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(void 0!==n.style[t])return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},h=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&&(o[t]=e)}),o},g=function(t){var o,i;return!(!t||t.ownerDocument!==e)&&(n(".fancybox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},i=e.elementFromPoint(o.x,o.y)===t,n(".fancybox-container").css("pointer-events",""),i)},b=function(t,e,o){var i=this;i.opts=h({index:o},n.fancybox.defaults),n.isPlainObject(e)&&(i.opts=h(i.opts,e)),n.fancybox.isMobile&&(i.opts=h(i.opts,i.opts.mobile)),i.id=i.opts.id||++c,i.currIndex=parseInt(i.opts.index,10)||0,i.prevIndex=null,i.prevPos=null,i.currPos=0,i.firstRun=!0,i.group=[],i.slides={},i.addContent(t),i.group.length&&i.init()};n.extend(b.prototype,{init:function(){var o,i,a=this,s=a.group[a.currIndex],r=s.opts;r.closeExisting&&n.fancybox.close(!0),n("body").addClass("fancybox-active"),!n.fancybox.getInstance()&&!1!==r.hideScrollbar&&!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(n("head").append('"),n("body").addClass("compensate-for-scrollbar")),i="",n.each(r.buttons,function(t,e){i+=r.btnTpl[e]||""}),o=n(a.translate(a,r.baseTpl.replace("{{buttons}}",i).replace("{{arrows}}",r.btnTpl.arrowLeft+r.btnTpl.arrowRight))).attr("id","fancybox-container-"+a.id).addClass(r.baseClass).data("FancyBox",a).appendTo(r.parentEl),a.$refs={container:o},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){a.$refs[t]=o.find(".fancybox-"+t)}),a.trigger("onInit"),a.activate(),a.jumpTo(a.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return void 0===n[e]?t:n[e]})},addContent:function(t){var e,o=this,i=n.makeArray(t);n.each(i,function(t,e){var i,a,s,r,c,l={},d={};n.isPlainObject(e)?(l=e,d=e.opts||e):"object"===n.type(e)&&n(e).length?(i=n(e),d=i.data()||{},d=n.extend(!0,{},d,d.options),d.$orig=i,l.src=o.opts.src||d.src||i.attr("href"),l.type||l.src||(l.type="inline",l.src=e)):l={type:"html",src:e+""},l.opts=n.extend(!0,{},o.opts,d),n.isArray(d.buttons)&&(l.opts.buttons=d.buttons),n.fancybox.isMobile&&l.opts.mobile&&(l.opts=h(l.opts,l.opts.mobile)),a=l.type||l.opts.type,r=l.src||"",!a&&r&&((s=r.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(a="video",l.opts.video.format||(l.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?a="image":r.match(/\.(pdf)((\?|#).*)?$/i)?(a="iframe",l=n.extend(!0,l,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===r.charAt(0)&&(a="inline")),a?l.type=a:o.trigger("objectNeedsType",l),l.contentType||(l.contentType=n.inArray(l.type,["html","inline","ajax"])>-1?"html":l.type),l.index=o.group.length,"auto"==l.opts.smallBtn&&(l.opts.smallBtn=n.inArray(l.type,["html","inline","ajax"])>-1),"auto"===l.opts.toolbar&&(l.opts.toolbar=!l.opts.smallBtn),l.$thumb=l.opts.$thumb||null,l.opts.$trigger&&l.index===o.opts.index&&(l.$thumb=l.opts.$trigger.find("img:first"),l.$thumb.length&&(l.opts.$orig=l.opts.$trigger)),l.$thumb&&l.$thumb.length||!l.opts.$orig||(l.$thumb=l.opts.$orig.find("img:first")),l.$thumb&&!l.$thumb.length&&(l.$thumb=null),l.thumb=l.opts.thumb||(l.$thumb?l.$thumb[0].src:null),"function"===n.type(l.opts.caption)&&(l.opts.caption=l.opts.caption.apply(e,[o,l])),"function"===n.type(o.opts.caption)&&(l.opts.caption=o.opts.caption.apply(e,[o,l])),l.opts.caption instanceof n||(l.opts.caption=void 0===l.opts.caption?"":l.opts.caption+""),"ajax"===l.type&&(c=r.split(/\s+/,2),c.length>1&&(l.src=c.shift(),l.opts.filter=c.shift())),l.opts.modal&&(l.opts=n.extend(!0,l.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),o.group.push(l)}),Object.keys(o.slides).length&&(o.updateControls(),(e=o.Thumbs)&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next()}).on("click.fb","[data-fancybox-zoom]",function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(e.requestId&&u(e.requestId),e.requestId=d(function(){e.update(t)})):(e.current&&"iframe"===e.current.type&&e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t)},n.fancybox.isMobile?600:250))}),r.on("keydown.fb",function(t){var o=n.fancybox?n.fancybox.getInstance():null,i=o.current,a=t.keyCode||t.which;if(9==a)return void(i.opts.trapFocus&&e.focus(t));if(!(!i.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is("input,textarea,video,audio,select")))return 8===a||27===a?(t.preventDefault(),void e.close(t)):37===a||38===a?(t.preventDefault(),void e.previous()):39===a||40===a?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,a)}),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1}),e.idleInterval=t.setInterval(function(){++e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var o,i,a,s,r,c,l,d,u,f=this,h=f.group.length;if(!(f.isDragging||f.isClosing||f.isAnimating&&f.firstRun)){if(t=parseInt(t,10),!(a=f.current?f.current.opts.loop:f.opts.loop)&&(t<0||t>=h))return!1;if(o=f.firstRun=!Object.keys(f.slides).length,r=f.current,f.prevIndex=f.currIndex,f.prevPos=f.currPos,s=f.createSlide(t),h>1&&((a||s.index0)&&f.createSlide(t-1)),f.current=s,f.currIndex=s.index,f.currPos=s.pos,f.trigger("beforeShow",o),f.updateControls(),s.forcedDuration=void 0,n.isNumeric(e)?s.forcedDuration=e:e=s.opts[o?"animationDuration":"transitionDuration"],e=parseInt(e,10),i=f.isMoved(s),s.$slide.addClass("fancybox-slide--current"),o)return s.opts.animationEffect&&e&&f.$refs.container.css("transition-duration",e+"ms"),f.$refs.container.addClass("fancybox-is-open").trigger("focus"),f.loadSlide(s),void f.preload("image");c=n.fancybox.getTranslate(r.$slide),l=n.fancybox.getTranslate(f.$refs.stage),n.each(f.slides,function(t,e){n.fancybox.stop(e.$slide,!0)}),r.pos!==s.pos&&(r.isComplete=!1),r.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),i?(u=c.left-(r.pos*c.width+r.pos*r.opts.gutter),n.each(f.slides,function(t,o){o.$slide.removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")});var i=o.pos*c.width+o.pos*o.opts.gutter;n.fancybox.setTranslate(o.$slide,{top:0,left:i-l.left+u}),o.pos!==s.pos&&o.$slide.addClass("fancybox-slide--"+(o.pos>s.pos?"next":"previous")),p(o.$slide),n.fancybox.animate(o.$slide,{top:0,left:(o.pos-s.pos)*c.width+(o.pos-s.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===f.currPos&&f.complete()})})):e&&s.opts.transitionEffect&&(d="fancybox-animated fancybox-fx-"+s.opts.transitionEffect,r.$slide.addClass("fancybox-slide--"+(r.pos>s.pos?"next":"previous")),n.fancybox.animate(r.$slide,d,e,function(){r.$slide.removeClass(d).removeClass("fancybox-slide--next fancybox-slide--previous")},!1)),s.isLoaded?f.revealContent(s):f.loadSlide(s),f.preload("image")}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('
').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,o){var i,a,s,r,c,l=this,d=l.current,u=d.$content,f=n.fancybox.getTranslate(d.$slide).width,p=n.fancybox.getTranslate(d.$slide).height,h=d.width,g=d.height;l.isAnimating||l.isMoved()||!u||"image"!=d.type||!d.isLoaded||d.hasError||(l.isAnimating=!0,n.fancybox.stop(u),t=void 0===t?.5*f:t,e=void 0===e?.5*p:e,i=n.fancybox.getTranslate(u),i.top-=n.fancybox.getTranslate(d.$slide).top,i.left-=n.fancybox.getTranslate(d.$slide).left,r=h/i.width,c=g/i.height,a=.5*f-.5*h,s=.5*p-.5*g,h>f&&(a=i.left*r-(t*r-t),a>0&&(a=0),ap&&(s=i.top*c-(e*c-e),s>0&&(s=0),se-.5&&(l=e),d>o-.5&&(d=o),"image"===t.type?(u.top=Math.floor(.5*(o-d))+parseFloat(c.css("paddingTop")),u.left=Math.floor(.5*(e-l))+parseFloat(c.css("paddingLeft"))):"video"===t.contentType&&(a=t.opts.width&&t.opts.height?l/d:t.opts.ratio||16/9,d>l/a?d=l/a:l>d*a&&(l=d*a)),u.width=l,u.height=d,u)},update:function(t){var e=this;n.each(e.slides,function(n,o){e.updateSlide(o,t)})},updateSlide:function(t,e){var o=this,i=t&&t.$content,a=t.width||t.opts.width,s=t.height||t.opts.height,r=t.$slide;o.adjustCaption(t),i&&(a||s||"video"===t.contentType)&&!t.hasError&&(n.fancybox.stop(i),n.fancybox.setTranslate(i,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),r.length&&(r.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",r.get(0).scrollHeight>r.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,i=o.$slide;!e.isClosing&&o&&(i.siblings().css({transform:"",opacity:""}),i.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),n.fancybox.animate(i,{top:0,left:0,opacity:1},void 0===t?0:t,function(){i.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o,i=t||this.current;return!!i&&(o=n.fancybox.getTranslate(this.$refs.stage),e=n.fancybox.getTranslate(i.$slide),!i.$slide.hasClass("fancybox-animated")&&(Math.abs(e.top-o.top)>.5||Math.abs(e.left-o.left)>.5))},updateCursor:function(t,e){var o,i,a=this,s=a.current,r=a.$refs.container;s&&!a.isClosing&&a.Guestures&&(r.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),o=a.canPan(t,e),i=!!o||a.isZoomable(),r.toggleClass("fancybox-is-zoomable",i),n("[data-fancybox-zoom]").prop("disabled",!i),o?r.addClass("fancybox-can-pan"):i&&("zoom"===s.opts.clickContent||n.isFunction(s.opts.clickContent)&&"zoom"==s.opts.clickContent(s))?r.addClass("fancybox-can-zoomIn"):s.opts.touch&&(s.opts.touch.vertical||a.group.length>1)&&"video"!==s.contentType&&r.addClass("fancybox-can-swipe"))},isZoomable:function(){var t,e=this,n=e.current;if(n&&!e.isClosing&&"image"===n.type&&!n.hasError){if(!n.isLoaded)return!0;if((t=e.getFitPos(n))&&(n.width>t.width||n.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=this,i=!1,a=o.current,s=a.$content;return void 0!==t&&void 0!==e?i=t1.5||Math.abs(a.height-s.height)>1.5)),s},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,!1===a.trigger("beforeLoad",t))return t.isLoading=!1,!1;switch(e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"video":a.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;default:a.setError(t)}return!0}},setImage:function(t){var o,i=this;setTimeout(function(){var e=t.$image;i.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||i.showLoading(t)},50),i.checkSrcset(t),t.$content=n('
').addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")),!1!==t.opts.preload&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,o=e.createElement("img"),o.onerror=function(){n(this).remove(),t.$ghost=null},o.onload=function(){i.afterLoad(t)},t.$ghost=n(o).addClass("fancybox-image").appendTo(t.$content).attr("src",t.thumb)),i.setBigImage(t)},checkSrcset:function(e){var n,o,i,a,s=e.opts.srcset||e.opts.image.srcset;if(s){i=t.devicePixelRatio||1,a=t.innerWidth*i,o=s.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);if(0===n)return e.url=t;o&&(e.value=o,e.postfix=t[t.length-1])}),e}),o.sort(function(t,e){return t.value-e.value});for(var r=0;r=a||"x"===c.postfix&&c.value>=i){n=c;break}}!n&&o.length&&(n=o[o.length-1]),n&&(e.src=n.url,e.width&&e.height&&"w"==n.postfix&&(e.height=e.width/e.height*n.value,e.width=n.value),e.opts.srcset=s)}},setBigImage:function(t){var o=this,i=e.createElement("img"),a=n(i);t.$image=a.one("error",function(){o.setError(t)}).one("load",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&&(e=t.opts.sizes,e&&"auto"!==e||(e=(t.width/t.height>1&&s.width()/s.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),a.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!o.isClosing&&t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(i.complete||"complete"==i.readyState)&&a.naturalWidth&&a.naturalHeight?a.trigger("load"):i.error&&a.trigger("error")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);t.width=e,t.height=n,o>0&&(t.width=o,t.height=Math.floor(o*n/e)),i>0&&(t.width=Math.floor(i*e/n),t.height=i)},setIframe:function(t){var e,o=this,i=t.opts.iframe,a=t.$slide;t.$content=n('
').css(i.css).appendTo(a),a.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=n(i.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(o.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),o.afterLoad(t)}),a.on("refresh.fb",function(){var n,o,s=t.$content,r=i.css.width,c=i.css.height;if(1===e[0].isReady){try{n=e.contents(),o=n.find("body")}catch(t){}o&&o.length&&o.children().length&&(a.css("overflow","visible"),s.css({width:"100%","max-width":"100%",height:"9999px"}),void 0===r&&(r=Math.ceil(Math.max(o[0].clientWidth,o.outerWidth(!0)))),s.css("width",r||"").css("max-width",""),void 0===c&&(c=Math.ceil(Math.max(o[0].clientHeight,o.outerHeight(!0)))),s.css("height",c||""),a.css("overflow","auto")),s.removeClass("fancybox-is-hidden")}})):o.afterLoad(t),e.attr("src",t.src),a.one("onReset",function(){try{n(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}n(this).off("refresh.fb").empty(),t.isLoaded=!1,t.isRevealed=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&&n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&&e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&&e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=n("
").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("
").append(n.trim(e)).contents()),t.opts.filter&&(e=n("
").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),n(e).appendTo(t.$slide),n(e).is("video,audio")&&(n(e).addClass("fancybox-video"),n(e).wrap("
"),t.contentType="video",t.opts.width=t.opts.width||n(e).attr("width"),t.opts.height=t.opts.height||n(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("
").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){var e=this;(t=t||e.current)&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){var e=this;(t=t||e.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('
').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e,n=this,o=t||n.current,i=o.opts.caption,a=o.opts.preventCaptionOverlap,s=n.$refs.caption,r=!1;s.toggleClass("fancybox-caption--separate",a),a&&i&&i.length&&(o.pos!==n.currPos?(e=s.clone().appendTo(s.parent()),e.children().eq(0).empty().html(i),r=e.outerHeight(!0),e.empty().remove()):n.$caption&&(r=n.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",r||""))},adjustLayout:function(t){var e,n,o,i,a=this,s=t||a.current;s.isLoaded&&!0!==s.opts.disableLayoutFix&&(s.$content.css("margin-bottom",""),s.$content.outerHeight()>s.$slide.height()+.5&&(o=s.$slide[0].style["padding-bottom"],i=s.$slide.css("padding-bottom"),parseFloat(i)>0&&(e=s.$slide[0].scrollHeight,s.$slide.css("padding-bottom",0),Math.abs(e-s.$slide[0].scrollHeight)<1&&(n=i),s.$slide.css("padding-bottom",o))),s.$content.css("margin-bottom",n))},revealContent:function(t){var e,o,i,a,s=this,r=t.$slide,c=!1,l=!1,d=s.isMoved(t),u=t.isRevealed;return t.isRevealed=!0,e=t.opts[s.firstRun?"animationEffect":"transitionEffect"],i=t.opts[s.firstRun?"animationDuration":"transitionDuration"],i=parseInt(void 0===t.forcedDuration?i:t.forcedDuration,10),!d&&t.pos===s.currPos&&i||(e=!1),"zoom"===e&&(t.pos===s.currPos&&i&&"image"===t.type&&!t.hasError&&(l=s.getThumbPos(t))?c=s.getFitPos(t):e="fade"),"zoom"===e?(s.isAnimating=!0,c.scaleX=c.width/l.width,c.scaleY=c.height/l.height,a=t.opts.zoomOpacity,"auto"==a&&(a=Math.abs(t.width/t.height-l.width/l.height)>.1),a&&(l.opacity=.1,c.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),l),p(t.$content),void n.fancybox.animate(t.$content,c,i,function(){s.isAnimating=!1,s.complete()})):(s.updateSlide(t),e?(n.fancybox.stop(r),o="fancybox-slide--"+(t.pos>=s.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,r.addClass(o).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),p(r),"image"!==t.type&&t.$content.hide().show(0),void n.fancybox.animate(r,"fancybox-slide--current",i,function(){r.removeClass(o).css({transform:"",opacity:""}),t.pos===s.currPos&&s.complete()},!0)):(t.$content.removeClass("fancybox-is-hidden"),u||!d||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===s.currPos&&s.complete())))},getThumbPos:function(t){var e,o,i,a,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&&(e=n.fancybox.getTranslate(c),o=parseFloat(c.css("border-top-width")||0),i=parseFloat(c.css("border-right-width")||0),a=parseFloat(c.css("border-bottom-width")||0),s=parseFloat(c.css("border-left-width")||0),r={top:e.top+o,left:e.left+s,width:e.width-i-s,height:e.height-o-a,scaleX:1,scaleY:1},e.width>0&&e.height>0&&r)},complete:function(){var t,e=this,o=e.current,i={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),p(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),e.slides=i),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&"html"===o.contentType&&(t=o.$content.find("input[autofocus]:enabled:visible:first"),t.length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n))},focus:function(t,o){var i,a,s=this,r=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");s.isClosing||(i=!t&&s.current&&s.current.isComplete?s.current.$slide.find("*:visible"+(o?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible"),i=i.filter(r).filter(function(){return"hidden"!==n(this).css("visibility")&&!n(this).hasClass("disabled")}),i.length?(a=i.index(e.activeElement),t&&t.shiftKey?(a<0||0==a)&&(t.preventDefault(),i.eq(i.length-1).trigger("focus")):(a<0||a==i.length-1)&&(t&&t.preventDefault(),i.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"))},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t)};return!u.isClosing&&(u.isClosing=!0,!1===u.trigger("beforeClose",t)?(u.isClosing=!1,d(function(){u.update()}),!1):(u.removeEvents(),a=f.$content,o=f.opts.animationEffect,i=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),!0!==t?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger("onReset").remove(),i&&u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",i+"ms"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),"zoom"!==o||a&&i&&"image"===f.type&&!u.isMoved()&&!f.hasError&&(l=u.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),s=n.fancybox.getTranslate(a),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity, +"auto"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(a,c),p(a),n.fancybox.animate(a,l,i,h),!0):(o&&i?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,i,h):!0===t?setTimeout(h,i):h(),!0)))},cleanUp:function(e){var o,i,a,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(r&&r.length&&r.is(":visible")||(r=s.$trigger),r&&r.length&&(i=t.scrollX,a=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(a).scrollLeft(i))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;if(s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),!1===o)return o;"afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i)},updateControls:function(){var t=this,o=t.current,i=o.index,a=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),r&&r.length?(t.$caption=s,s.children().eq(0).html(r)):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),a.find("[data-fancybox-count]").html(t.group.length),a.find("[data-fancybox-index]").html(i+1),a.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&&i<=0),a.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&&i>=t.group.length-1),"image"===o.type?a.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&&a.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&&e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.5.7",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(n=(void 0===e.left?t.position().left:e.left)+"px, "+(void 0===e.top?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),void 0!==e.scaleX&&void 0!==e.scaleY?n+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(n+=" scaleX("+e.scaleX+")"),n.length&&(o.transform=n),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(t,e,o,i,a){var s,r=this;n.isFunction(o)&&(i=o,o=null),r.stop(t),s=r.getTranslate(t),t.on(f,function(c){(!c||!c.originalEvent||t.is(c.originalEvent.target)&&"z-index"!=c.originalEvent.propertyName)&&(r.stop(t),n.isNumeric(o)&&t.css("transition-duration",""),n.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:s.width*e.scaleX,height:s.height*e.scaleY,scaleX:1,scaleY:1}):!0!==a&&t.removeClass(e),n.isFunction(i)&&i(c))}),n.isNumeric(o)&&t.css("transition-duration",o+"ms"),n.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f)},o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=null;r.on("mousedown mouseup focus blur",".fancybox-button",function(e){switch(e.type){case"mousedown":t=n(this);break;case"mouseup":t=null;break;case"focusin":n(".fancybox-button").removeClass("fancybox-focus"),n(this).is(t)||n(this).is("[disabled]")||n(this).addClass("fancybox-focus");break;case"focusout":n(".fancybox-button").removeClass("fancybox-focus")}})}()}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},n=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||"",h=!1;s=t.extend(!0,{},e,a.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var i=0;i1&&("youtube"===n.contentSource||"vimeo"===n.contentSource)&&o.load(n.contentSource)}})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;ee.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),n(e).off(".fb.touch"),t.requestId&&(i(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass("fancybox-animated"))return o.stopPropagation(),void o.preventDefault();i.realPoints=i.startPoints=a(o),i.startPoints.length&&(u.touch&&o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=p,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.canPan=d.canPan(),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(f[0].clientWidth),i.canvasHeight=Math.round(f[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=n.fancybox.getTranslate(f),i.stagePos=n.fancybox.getTranslate(d.$refs.stage),i.sliderStartPos.top-=i.stagePos.top,i.sliderStartPos.left-=i.stagePos.left,i.contentStartPos.top-=i.stagePos.top,i.contentStartPos.left-=i.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),((i.opts||i.canPan)&&(c.is(i.$stage)||i.$stage.find(c).length)||(c.is(".fancybox-image")&&o.preventDefault(),n.fancybox.isMobile&&c.parents(".fancybox-caption").length))&&(i.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&i.isScrollable||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.canPan?(n.fancybox.stop(i.$content),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-is-grabbing")),2===i.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))))}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var a,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(!0!==c)"x"==c&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:"x"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,r.group.length<2&&s.opts.vertical?s.isSwiping="y":r.isDragging||!1===s.opts.vertical||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,i;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),i=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&&(s.sliderStartPos.top=o.top-i.top,s.sliderStartPos.left=o.left-i.left),n.fancybox.setTranslate(e.$slide,{top:o.top-i.top,left:o.left-i.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;if(s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5))return void(t.startPoints=t.newPoints);t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&i(t.requestId),t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return i=h>r?f+l:f,a=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i0&&a>e&&(a=e-1+Math.pow(-e+p+d,.8)||0),d<0&&aa?(t=t>0?0:t,t=ts?(e=e>0?0:e,e=e1&&(o.dMs>130&&s>10||s>50);o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,250)):r&&o.distanceX>0?i=o.instance.previous(300):r&&o.distanceX<0&&(i=o.instance.next(300)),!1!==i||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(!1===i.opts.momentum||i.dMs>350?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+500*i.velocityX,e=i.contentLastPos.top+500*i.velocityY),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,366))},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),rs.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.animate(a.$content,o,150)))},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f("dblclick"+o)}else i.tapX=d,i.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,r.isAnimating||f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:''},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),n.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('
').appendTo(n.$refs.inner))},set:function(t){var n=this,o=n.instance,i=o.current;i&&(!0===t||i.opts.loop||o.currIndex'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.isAnimating=!1,n.update(!0,!0,0),n.isComplete||n.complete()),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var i;if(!n)return void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove();e&&e.group[e.currIndex].opts.fullScreen?(i=e.$refs.container,i.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:''},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var o=function(t){this.init(t)};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var i=0,a=n.length;i1));i++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this,i=o.instance,a=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('
').appendTo(i.$refs.container.find(a).addBack().filter(a)),o.$grid.on("click","a",function(){i.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('
').appendTo(o.$grid)),e.each(i.group,function(e,n){t=n.thumb,t||"image"!==n.type||(t=n.src),s.push('")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+i.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,o=this,i=o.$list,a=o.$grid;o.instance.current&&(e=i.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+o.instance.current.index+'"]').addClass("fancybox-thumbs-active"),n=e.position(),"y"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===o.opts.axis&&(n.lefta.scrollLeft()+(a.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new o(e),n.isActive&&!0===n.opts.autoStart&&n.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&!1!==n.opts.hideOnClose&&n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:''},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}, +tpl:''}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,""!==(n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""))&&n)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.fancybox.defaults.hash&&(n(e).on({"onInit.fb":function(t,e){var n,i;!1!==e.group[e.currIndex].opts.hash&&(n=o(),(i=a(e))&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&!1!==i.opts.hash&&(r=a(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},"beforeClose.fb":function(n,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery); \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/assets/js/main.js b/wp-content/themes/orgsteklo/assets/js/main.js new file mode 100644 index 0000000..8545a87 --- /dev/null +++ b/wp-content/themes/orgsteklo/assets/js/main.js @@ -0,0 +1,1691 @@ +// --- SAFE GLOBAL FALLBACK: updateQuantity --- +// Объявляем глобально и раньше любых обработчиков, чтобы не было ReferenceError. +(function ($, w, d) { + if (typeof w.updateQuantity !== 'function') { + w.updateQuantity = function (productId, quantity) { + var ajaxUrl = (w.wc_add_to_cart_params && wc_add_to_cart_params.ajax_url) + ? wc_add_to_cart_params.ajax_url + : '/wp-admin/admin-ajax.php'; + + return $.ajax({ + url: ajaxUrl, + type: 'POST', + data: { + action: 'update_cart_quantity', + product_id: productId, + quantity: quantity + } + }).done(function (response) { + // Если Woo отдал фрагменты — обновим их + if (response && response.fragments) { + $.each(response.fragments, function (key, value) { + try { $(key).replaceWith(value); } catch (e) {} + }); + } + // Перерисуем мини-корзину/счётчик, если есть + if (typeof w.updateCartButtons === 'function') { + try { w.updateCartButtons(); } catch (e) {} + } + // Триггер Woo + try { $(d.body).trigger('wc_fragment_refresh'); } catch (e) {} + }).fail(function (xhr, status, error) { + console.error('Ошибка AJAX при updateQuantity:', error || status); + }); + }; + } +})(jQuery, window, document); +// --- /SAFE GLOBAL FALLBACK --- +$(document).ready(function() { + $('.phone').inputmask('+7 999 999 99 99'); +}); + +$(document).ready(function() { + $.fancybox.defaults.hideScrollbar = false; + $.fancybox.defaults.animationEffect = "fade"; + $.fancybox.defaults.animationDuration = 600; + $('[data-fancybox]').fancybox(); +}); + +function toggleMenu($button) { + var $menu = $('.pc_menu'); + var $menu_fon = $('.pc_menu__fon'); + var $body = $('body'); + + $button.toggleClass('change'); + $menu.toggleClass('active'); + $menu_fon.toggleClass('active'); + + if ($menu.hasClass('active')) { + $body.addClass('hidden'); + $menu_fon.addClass('active'); + } else { + $body.removeClass('hidden'); + $menu_fon.removeClass('active'); + } +} + +$('.header-catalog__button').on('click', function () { + toggleMenu($(this)); +}); + +$('.pc_menu__fon').on('click', function () { + if ($('.pc_menu').hasClass('active')) { + toggleMenu($('.header-catalog__button')); + } +}); + +$('.pc_menu nav a').on('click', function () { + if ($('.pc_menu').hasClass('active')) { + toggleMenu($('.header-catalog__button')); + } +}); + +function toggleMenu2($button) { + var $menu = $('.menu_mob'); + var $menu_fon = $('.menu_mob-close'); + var $body = $('body'); + + $button.toggleClass('change'); + $menu.toggleClass('active'); + $menu_fon.toggleClass('active'); + + if ($menu.hasClass('active')) { + $body.addClass('hidden'); + $menu_fon.addClass('active'); + } else { + $body.removeClass('hidden'); + $menu_fon.removeClass('active'); + } +} + +$('.header-catalog__button-mob').on('click', function () { + toggleMenu2($(this)); +}); + +$('.menu_mob-close').on('click', function () { + if ($('.menu_mob').hasClass('active')) { + toggleMenu2($('.header-catalog__button-mob')); + } +}); + + + +$(document).ready(function () { + $('.catalog_page-menu__item').each(function () { + const dropdown = $(this); + const dropdownName = dropdown.find('.catalog_page-menu__item-button__icon'); + const dropdownContent = dropdown.find('.catalog_page-menu__item-content'); + dropdownName.on('click', function () { + if (!dropdown.hasClass('all-list')) { + dropdown.toggleClass('active'); + if (dropdown.hasClass('active')) { + dropdownContent.css('max-height', dropdownContent.prop('scrollHeight') + 'px'); + } + else { + dropdownContent.css('max-height', ''); + } + } + }); + }); +}); + +$(document).ready(function () { + $('.catalog_page-menu__item-content-item').each(function () { + const dropdown = $(this); + const dropdownName = dropdown.find('.catalog_page-menu__item-content-item-icon'); + const dropdownContent = dropdown.find('.catalog_page-menu__item-content-item-content'); + dropdownName.on('click', function () { + if (!dropdown.hasClass('all-list')) { + dropdown.toggleClass('active'); + if (dropdown.hasClass('active')) { + dropdownContent.css('max-height', dropdownContent.prop('scrollHeight') + 'px'); + } + else { + dropdownContent.css('max-height', ''); + } + } + }); + }); +}); + +// Переключатель вида каталога (компактный / расширенный) +$(document).ready(function() { + var grid = $('.catalog_page-products__grid'); + var viewBtns = $('.catalog_page-view-btn'); + if (grid.length && viewBtns.length) { + var savedView = localStorage.getItem('catalog_view') || 'extended'; + grid.addClass('view-' + savedView); + viewBtns.each(function() { + if ($(this).data('view') === savedView) { + $(this).addClass('active'); + } + }); + viewBtns.on('click', function() { + var view = $(this).data('view'); + grid.removeClass('view-compact view-extended').addClass('view-' + view); + viewBtns.removeClass('active'); + $(this).addClass('active'); + localStorage.setItem('catalog_view', view); + }); + } +}); + +$(document).ready(function() { + $('.catalog_page-count__button').on('click', function() { + $(this).toggleClass('active'); + $('.catalog_page-count__content').toggleClass('active'); + }); + $('.catalog_page-count__content-button').on('click', function() { + var selectedText = $(this).find('p').text().trim(); + var perPage = selectedText === 'Все' ? 'all' : parseInt(selectedText); + var url = new URL(window.location.href); + url.searchParams.set('per_page', perPage); + url.searchParams.delete('paged'); // сбрасываем на первую страницу + // Удаляем /page/N/ из URL + url.pathname = url.pathname.replace(/\/page\/\d+\/?/, '/'); + window.location.href = url.toString(); + }); +}); + +$(document).ready(function () { + $(".documentation-tab").click(function () { + $(".documentation-tab").removeClass("active"); + $(".documentation-content").removeClass("active"); + $(this).addClass("active"); + var index = $(this).index(); + $(".documentation-content:eq(" + index + ")").addClass("active"); + }); +}); + +$(document).ready(function() { + $('.documentation-mob__button').on('click', function() { + $(this).toggleClass('active'); + $('.documentation-mob__content').toggleClass('active'); + }); + $('.documentation-mob__item').on('click', function() { + $('.documentation-mob__item').removeClass('active'); + $(this).addClass('active'); + $('.documentation-mob__content, .documentation-mob__button').removeClass('active'); + const selectedText = $(this).find('p').text(); + $('.documentation-mob__button p').text(selectedText); + }); +}); + +$(document).ready(function () { + $(".documentation-mob__item").click(function () { + $(".documentation-mob__item").removeClass("active"); + $(".documentation-content").removeClass("active"); + $(this).addClass("active"); + var index = $(this).index(); + $(".documentation-content:eq(" + index + ")").addClass("active"); + }); +}); + + + +$(document).ready(function () { + $(".registration-tab").click(function () { + $(".registration-tab").removeClass("active"); + $(".registration-content").removeClass("active"); + $(this).addClass("active"); + var index = $(this).index(); + $(".registration-content:eq(" + index + ")").addClass("active"); + }); +}); + +$(document).ready(function() { + $('.popup-registration__open').on('click', function() { + $('.popup-registration').css('display', 'flex'); + }); + $('.popup-registration__close, .popup-registration__fon').on('click', function() { + $('.popup-registration').css('display', 'none'); + }); +}); + +$(document).ready(function() { + $('.popup-callback__open').on('click', function() { + $('.popup-callback').css('display', 'flex'); + }); + $('.popup-callback__close, .popup-callback__fon').on('click', function() { + $('.popup-callback').css('display', 'none'); + }); +}); + + + +$(document).ready(function () { + $(".product_page-tab").click(function () { + $(".product_page-tab").removeClass("active"); + $(".product_page-content").removeClass("active"); + $(this).addClass("active"); + var index = $(this).index(); + $(".product_page-content:eq(" + index + ")").addClass("active"); + }); +}); + +$(document).ready(function() { + $('.product_page-tabs__mob-button').on('click', function() { + $(this).toggleClass('active'); + $('.product_page-tabs__mob-content').toggleClass('active'); + }); + $('.product_page-tabs__mob-tab').on('click', function() { + $('.product_page-tabs__mob-tab').removeClass('active'); + $(this).addClass('active'); + $('.product_page-tabs__mob-content, .product_page-tabs__mob-button').removeClass('active'); + const selectedText = $(this).find('p').text(); + $('.product_page-tabs__mob-button p').text(selectedText); + }); +}); + +$(document).ready(function () { + $(".product_page-tabs__mob-tab").click(function () { + $(".product_page-tabs__mob-tab").removeClass("active"); + $(".product_page-content").removeClass("active"); + $(this).addClass("active"); + var index = $(this).index(); + $(".product_page-content:eq(" + index + ")").addClass("active"); + }); +}); + +$(document).ready(function() { + $('.popup-cart__open').on('click', function() { + $('.popup-cart').css('display', 'flex'); + }); + $('.popup-cart__close, .popup-cart__fon').on('click', function() { + $('.popup-cart').css('display', 'none'); + }); +}); + +$(document).ready(function() { + $('.popup-cart-product__open').on('click', function() { + $('.popup-cart-product').css('display', 'flex'); + }); + $('.popup-cart-product__close, .popup-cart-product__fon').on('click', function() { + $('.popup-cart-product').css('display', 'none'); + }); +}); + +$(document).ready(function () { + // Функция автозаполнения полей из профиля + function fillCheckoutFields(tabIndex) { + if (typeof orgstekloCheckoutUser === 'undefined' || !orgstekloCheckoutUser.isLoggedIn) return; + var u = orgstekloCheckoutUser; + if (tabIndex === 0) { + $('#billing_fio').val(u.fio || ''); + $('#billing_phone_phys').val(u.phone || ''); + $('#billing_email_phys').val(u.email || ''); + } else if (tabIndex === 1) { + $('#billing_company_name').val(u.company_name || ''); + $('#billing_inn').val(u.inn || ''); + $('#billing_kpp').val(u.kpp || ''); + $('#billing_legal_address').val(u.legal_address || ''); + $('#billing_actual_address').val(u.actual_address || ''); + $('#billing_contact_person').val(u.fio || ''); + $('#billing_phone_legal').val(u.phone || ''); + $('#billing_email_legal').val(u.email || ''); + } + } + + $(".checkout-data__tab").click(function () { + $(".checkout-data__tab").removeClass("active"); + $(".checkout-data__content").removeClass("active"); + + $(this).addClass("active"); + var index = $(this).index(); + $(".checkout-data__content").eq(index).addClass("active"); + + // Проверка на авторизацию + var isLoggedIn = $('body').hasClass('logged-in'); + + if (index === 1 && !isLoggedIn) { + // Блокировка кнопки + $("#place_order").prop("disabled", true); + + // Скрыть consult-checkbox, показать checkout-description + $(".consult-checkbox").hide(); + $(".checkout-description").show(); + } else { + // Разблокировать кнопку + $("#place_order").prop("disabled", false); + + // Показать consult-checkbox, скрыть checkout-description + $(".consult-checkbox").show(); + $(".checkout-description").hide(); + } + + // Автозаполнение полей + fillCheckoutFields(index); + + // Обновить видимость способов оплаты + if (typeof updatePaymentMethodVisibility === 'function') { + updatePaymentMethodVisibility(); + } + }); + + // Автозаполнение при загрузке страницы (активный таб по умолчанию) + fillCheckoutFields($(".checkout-data__tab.active").index()); +}); + + +$(document).ready(function() { + $('.lk-menu__mobile-button').on('click', function() { + $(this).toggleClass('active'); + $('.lk-menu__mobile-content').toggleClass('active'); + }); + $('.lk-menu__mobile-content__link').on('click', function() { + $('.lk-menu__mobile-content__link').removeClass('active'); + $(this).addClass('active'); + $('.lk-menu__mobile-content, .lk-menu__mobile-button').removeClass('active'); + const selectedText = $(this).find('p').text(); + $('.lk-menu__mobile-button p').text(selectedText); + }); +}); + +$(document).ready(function() { + $('.popup-password_change__open').on('click', function() { + $('.popup-password_change').css('display', 'flex'); + }); + $('.popup-password_change__close, .popup-password_change__fon').on('click', function() { + $('.popup-password_change').css('display', 'none'); + }); +}); + +$(document).ready(function() { + $('.popup-email_change__open').on('click', function() { + $('.popup-email_change').css('display', 'flex'); + }); + $('.popup-email_change__close, .popup-email_change__fon').on('click', function() { + $('.popup-email_change').css('display', 'none'); + }); +}); + +$(document).ready(function() { + $('.popup-delete_acc__open').on('click', function() { + $('.popup-delete_acc').css('display', 'flex'); + }); + $('.popup-delete_acc__close, .popup-delete_acc__fon').on('click', function() { + $('.popup-delete_acc').css('display', 'none'); + }); +}); + +$(document).ready(function() { + function openMinicart() { + $('.minicart__fon').css('display', 'flex'); + $('.minicart').css('display', 'flex'); + $('body').css('overflow', 'hidden'); + } + + function closeMinicart() { + $('.minicart__fon').css('display', 'none'); + $('.minicart').css('display', 'none'); + $('body').css('overflow', 'auto'); + } + + $('.minicart-open').on('click mouseenter', openMinicart); + $('.minicart__fon').on('click', closeMinicart); + + // Закрытие при уходе курсора с .minicart и .minicart-open + let minicartHover = false; + + $('.minicart, .minicart-open').on('mouseenter', function() { + minicartHover = true; + }); + + $('.minicart, .minicart-open').on('mouseleave', function() { + minicartHover = false; + + setTimeout(function() { + if (!minicartHover) { + closeMinicart(); + } + }, 500); // задержка нужна, чтобы не срабатывало при переходе между элементами + }); +}); + + + +$(document).ready(function() { + const $menuColumns = $('.menu_mob-column, .menu_mob-logo'); + const $menuContents = $('.menu_mob-menu__content'); + + $menuContents.hide(); + + $('.menu_mob-menu__button').on('click', function() { + $menuContents.hide(); + const contentId = $(this).data('content'); + $menuColumns.hide(); + $menuContents.filter('[data-content="' + contentId + '"]').show(); + }); + + $('.menu_mob-menu__content-back').on('click', function() { + $menuContents.hide(); + $(this).closest('.menu_mob-menu__content').hide(); + $menuColumns.show(); + }); +}); + + + +jQuery(document).ready(function($) { + $('.projects-more_page').on('click', function() { + const hiddenItems = $('.projects-item.hidden'); + hiddenItems.slice(0, 6).removeClass('hidden'); + if ($('.projects-item.hidden').length === 0) { + $(this).hide(); + } + }); +}); + +jQuery(document).ready(function($) { + $('.documentation-more').on('click', function() { + const $container = $(this).closest('.documentation-content'); + $container.find('.documentation-item.hidden').removeClass('hidden'); + $(this).hide(); + }); +}); + + +//login + +jQuery(document).ready(function($) { + $('#login-form').on('submit', function(e) { + e.preventDefault(); + const phone = $('#login-form input[type=tel]').val(); + const password = $('#login-form #login-password').val(); + $.ajax({ + url: '/wp-admin/admin-ajax.php', + type: 'POST', + data: { + action: 'login_by_phone', + phone: phone, + password: password + }, + success: function(response) { + if (response.success) { + window.location.href = '/account'; + } + else { + $('.login-error').show(); + } + } + }); + }); +}); + +jQuery(document).ready(function($) { + $('.login-password__button').on('click', function() { + const $button = $(this); + const $container = $button.closest('.login-form__input'); + const $input = $container.find('input'); + const $img = $button.find('img'); + + if ($input.attr('type') === 'password') { + $input.attr('type', 'text'); + $img.attr('src', '/wp-content/uploads/2025/05/password.svg'); + } else { + $input.attr('type', 'password'); + $img.attr('src', '/wp-content/uploads/2025/05/password-2.svg'); + } + }); +}); + +jQuery(document).ready(function($) { + $('#recovery-form').on('submit', function(e) { + e.preventDefault(); + const email = $(this).find('input[name="user_email"]').val(); + $.ajax({ + url: '/wp-admin/admin-ajax.php', + type: 'POST', + data: { + action: 'custom_password_reset', + user_email: email + }, + success: function(response) { + if (response.success) { + window.location.href = '/password-sent'; + } else { + $('.login-error').fadeIn(); + } + } + }); + }); +}); + + +jQuery(document).ready(function($) { + $('#home_categories_more').on('click', function(e) { + e.preventDefault(); + $('.categories-item.hidden').slideDown().removeClass('hidden'); + $(this).remove(); + }); +}); + + + +jQuery(document).ready(function($) { + let verificationCode = ''; + let timerInterval; + + function startTimer($timerElement, $resendButton) { + let timeLeft = 120; + $timerElement.show(); + $resendButton.hide(); + + timerInterval = setInterval(function () { + timeLeft--; + const minutes = String(Math.floor(timeLeft / 60)).padStart(2, '0'); + const seconds = String(timeLeft % 60).padStart(2, '0'); + $timerElement.text(`Отправить код повторно через ${minutes}:${seconds}`); + + if (timeLeft <= 0) { + clearInterval(timerInterval); + $timerElement.hide(); + $resendButton.show(); + } + }, 1000); + } + + function sendSMS(phone, callback) { + $.ajax({ + url: '/wp-admin/admin-ajax.php', + method: 'POST', + data: { + action: 'send_sms_code', + phone: phone + }, + success: function(response) { + if (response.success) { + verificationCode = response.data.code; + callback(); + } else { + alert(response.data.message || 'Ошибка отправки SMS'); + } + } + }); + } + + $('.registration-form').on('submit', function(e) { + e.preventDefault(); + + const $form = $(this); + const email = $form.find('input[type=email]').val(); + const phone = $form.find('input[type=tel]').val(); + const password = $form.find('input[type=password]').val(); + const registration_type = $form.find('input[name=registration_type]').val(); + const checkbox = $form.find('input[name="login-form__remember"]'); + if (!checkbox.is(':checked')) { + alert('Подтвердите согласие с политикой конфиденциальности'); + return; + } + $.ajax({ + url: '/wp-admin/admin-ajax.php', + method: 'POST', + data: { + action: 'check_email_exists', + email: email + }, + success: function(response) { + if (response.exists) { + $('.login-error').css('display', 'flex'); + } else { + sendSMS(phone, function() { + $('.popup-registration').css('display', 'flex'); + $('.popup-registration__name b').text(phone); + startTimer($('.popup-registration p:contains("через")'), $('.popup-registration__code-button')); + + $('.popup-registration__submit').off('click').on('click', function(e) { + e.preventDefault(); + const enteredCode = $('.popup-registration__input input').val(); + + $.ajax({ + url: '/wp-admin/admin-ajax.php', + method: 'POST', + data: { + action: 'register_user', + email: email, + password: password, + phone: phone, + registration_type: registration_type, + code: enteredCode + }, + success: function(res) { + if (res.success) { + window.location.href = '/registration-success'; + } else { + alert(res.data.message); + } + } + }); +}); + + }); + } + } + }); + }); + + $('.popup-registration__code-button').on('click', function(e) { + e.preventDefault(); + const phone = $('.popup-registration__name b').text(); + sendSMS(phone, function() { + startTimer($('.popup-registration p:contains("через")'), $('.popup-registration__code-button')); + }); + }); +}); + + +jQuery(document).ready(function ($) { + + $('.popup-delete_acc-yes').on('click', function (e) { + e.preventDefault(); + + $.ajax({ + type: 'POST', + url: '/wp-admin/admin-ajax.php', + data: { + action: 'delete_my_account' + }, + success: function () { + window.location.href = '/'; // редирект после удаления + }, + error: function () { + console.error('Ошибка при удалении аккаунта.'); + } + }); + }); +}); + + +jQuery(document).ready(function ($) { + + // Сохранение формы профиля + $('.profile-individual').on('submit', function (e) { + e.preventDefault(); + + const name = $('.profile input[placeholder="ФИО*"]').val(); + const phone = $('.profile input[type="tel"]').val(); + const email = $('.profile input[type="email"]').val(); + + $.ajax({ + type: 'POST', + url: '/wp-admin/admin-ajax.php', + data: { + action: 'save_user_profile_data', + name: name, + phone: phone, + email: email + }, + success: function (response) { + if (response.success) { + alert('Данные сохранены'); + } else { + alert('Ошибка: ' + response.data.message); + } + }, + }); + }); +}); + +jQuery(document).ready(function ($) { + + // Сохранение формы профиля + $('.profile-legal').on('submit', function (e) { + e.preventDefault(); + + const name = $('.profile input[placeholder="ФИО*"]').val(); + const phone = $('.profile input[type="tel"]').val(); + const email = $('.profile input[type="email"]').val(); + const company_name = $('.profile input[placeholder="Наименование организации*"]').val(); + const inn = $('.profile input[placeholder="ИНН*"]').val(); + const kpp = $('.profile input[placeholder="КПП"]').val(); + const legal_address = $('.profile input[placeholder="Юридический адрес*"]').val(); + const actual_address = $('.profile input[placeholder="Фактический адрес*"]').val(); + + $.ajax({ + type: 'POST', + url: '/wp-admin/admin-ajax.php', + data: { + action: 'save_user_profile_data2', + name: name, + phone: phone, + email: email, + company_name: company_name, // <-- Добавлено + inn: inn, // <-- Добавлено + kpp: kpp, // <-- Добавлено + legal_address: legal_address, // <-- Добавлено + actual_address: actual_address + }, +success: function(response) { + if (response.success) { + alert('Данные сохранены'); + } +}, + + }); + }); +}); + +jQuery(document).ready(function ($) { + $('#send-verification-email').on('click', function () { + $.post('/wp-admin/admin-ajax.php', { + action: 'send_email_verification_link' + }, function (res) { + if (res.success) { + $('.popup-email_change').css('display', 'flex'); + } else { + alert('Ошибка: ' + res.data.message); + } + }); + }); +}); + + +jQuery(document).ready(function ($) { + const $changeBtn = $('.profile-password__change'); + const $currentPassBlock = $('.profile-password__col'); + const $currentPassInput = $('.profile-password__col .individual_old_input'); + const $newPassBlock = $('.profile-password__col-new'); + const $saveNewPassBtn = $('.profile-password__new-submit'); + const $popup = $('.popup-password_change'); + + $changeBtn.on('click', function () { + const currentPassword = $currentPassInput.val(); + + if (currentPassword.length < 6) { + alert('Введите текущий пароль (не менее 6 символов)'); + return; + } + + $.post('/wp-admin/admin-ajax.php', { + action: 'check_user_password', + password: currentPassword + }, function (response) { + if (response.success) { + $changeBtn.hide(); + $currentPassBlock.hide(); + $newPassBlock.show(); + } else { + alert('Неверный текущий пароль'); + } + }); + }); + + $saveNewPassBtn.on('click', function () { + const oldPass = $newPassBlock.find('input[placeholder="Старый пароль"]').val(); + const newPass = $newPassBlock.find('input[placeholder="Новый пароль"]').val(); + + if (newPass.length < 6) { + alert('Новый пароль должен быть не менее 6 символов'); + return; + } + + $.post('/wp-admin/admin-ajax.php', { + action: 'change_user_password', + old_password: oldPass, + new_password: newPass + }, function (response) { + if (response.success) { + $popup.css('display', 'flex'); + } else { + alert(response.message || 'Ошибка при смене пароля'); + } + }); + }); +}); + + + +jQuery(document).ready(function($) { + $('.profile-password__button').on('click', function() { + const $button = $(this); + const $container = $button.closest('.profile-input'); + const $input = $container.find('input'); + const $img = $button.find('img'); + + if ($input.attr('type') === 'password') { + $input.attr('type', 'text'); + $img.attr('src', '/wp-content/uploads/2025/05/password.svg'); + } else { + $input.attr('type', 'password'); + $img.attr('src', '/wp-content/uploads/2025/05/password-2.svg'); + } + }); +}); + + + +jQuery(document).ready(function($) { + $('form.product_page-kley').on('show_variation', function(event, variation) { + const priceHtml = variation.price_html; + const $temp = $('
').html(priceHtml); + const newPrice = $temp.find('ins .amount').html() || $temp.find('.amount').html(); + const oldPrice = $temp.find('del .amount').html(); + let newHtml = ''; + if (newPrice) { + newHtml += '

' + newPrice + '

'; + } + if (oldPrice) { + newHtml += '

' + oldPrice + '

'; + } + $('.product_page-calc__one-row').html(newHtml); + }); +}); + +jQuery(document).ready(function($) { + $('form.product_page-trubi').on('show_variation', function(event, variation) { + const priceHtml = variation.price_html; + const $temp = $('
').html(priceHtml); + const newPrice = $temp.find('ins .amount').html() || $temp.find('.amount').html(); + const oldPrice = $temp.find('del .amount').html(); + let newHtml = ''; + if (newPrice) { + newHtml += '

' + newPrice + '

'; + } + if (oldPrice) { + newHtml += '

' + oldPrice + '

'; + } + $('.product_page-calc__one-row').html(newHtml); + }); +}); + +jQuery(document).ready(function($) { + $('form.product_page-sterjni').on('show_variation', function(event, variation) { + const priceHtml = variation.price_html; + const $temp = $('
').html(priceHtml); + const newPrice = $temp.find('ins .amount').html() || $temp.find('.amount').html(); + const oldPrice = $temp.find('del .amount').html(); + let newHtml = ''; + if (newPrice) { + newHtml += '

' + newPrice + '

'; + } + if (oldPrice) { + newHtml += '

' + oldPrice + '

'; + } + $('.product_page-calc__one-row').html(newHtml); + }); +}); + +jQuery(document).ready(function($) { + const priceHtml = $('.summary .price').html(); + const $temp = $('
').html(priceHtml); + const newPrice = $temp.find('ins .amount').html() || $temp.find('.amount').html(); + const oldPrice = $temp.find('del .amount').html(); + let newHtml = ''; + + if (newPrice) { + newHtml += '

' + newPrice + '

'; + } + if (oldPrice) { + newHtml += '

' + oldPrice + '

'; + } + + $('.product_page-calc__one-row').html(newHtml); +}); + + +jQuery(function ($) { + const $form = $('form.product_page-kley'); + function updateTotals(variation, qty) { + if (!variation) return; + const weight = parseFloat(variation.weight) || 0; + const totalWeight = (weight * qty).toFixed(3); + $('.product_page-weight p:last-child').text(totalWeight + ' кг'); + // Используем raw_price - точная цена как в корзине (get_price()) + const newPrice = parseFloat(variation.raw_price) || parseFloat(variation.display_price) || 0; + const oldPrice = parseFloat(variation.raw_regular_price) || parseFloat(variation.display_regular_price) || 0; + // Считаем как корзина: цена * кол-во, потом округление + const totalNew = Math.round(newPrice * qty).toLocaleString('ru-RU'); + const totalOld = Math.round(oldPrice * qty).toLocaleString('ru-RU'); + $('.product_page-price').html(totalNew + ' '); + if (oldPrice && oldPrice > newPrice) { + $('.product_page-oldprice').show().html(totalOld + ' '); + } else { + $('.product_page-oldprice').hide(); + } + } + $form.on('show_variation', function (event, variation) { + const qty = parseInt($('.qty').val(), 10) || 1; + updateTotals(variation, qty); + }); + $('body').on('input change', '.qty', function () { + const variationID = $('.variation_id').val(); + const variations = $form.data('product_variations') || []; + const variation = variations.find(v => v.variation_id == variationID); + if (variation) { + const qty = parseInt($(this).val(), 10) || 1; + updateTotals(variation, qty); + } + }); +}); + +jQuery(function ($) { + const $form = $('form.product_page-trubi'); + function updateTotals(variation, qty) { + if (!variation) return; + const weight = parseFloat(variation.weight) || 0; + const totalWeight = (weight * qty).toFixed(3); + $('.product_page-weight p:last-child').text(totalWeight + ' кг'); + // Используем raw_price - точная цена как в корзине (get_price()) + const newPrice = parseFloat(variation.raw_price) || parseFloat(variation.display_price) || 0; + const oldPrice = parseFloat(variation.raw_regular_price) || parseFloat(variation.display_regular_price) || 0; + // Считаем как корзина: цена * кол-во, потом округление + const totalNew = Math.round(newPrice * qty).toLocaleString('ru-RU'); + const totalOld = Math.round(oldPrice * qty).toLocaleString('ru-RU'); + $('.product_page-price').html(totalNew + ' '); + if (oldPrice && oldPrice > newPrice) { + $('.product_page-oldprice').show().html(totalOld + ' '); + } else { + $('.product_page-oldprice').hide(); + } + } + $form.on('show_variation', function (event, variation) { + const qty = parseInt($('.qty').val(), 10) || 1; + updateTotals(variation, qty); + }); + $('body').on('input change', '.qty', function () { + const variationID = $('.variation_id').val(); + const variations = $form.data('product_variations') || []; + const variation = variations.find(v => v.variation_id == variationID); + if (variation) { + const qty = parseInt($(this).val(), 10) || 1; + updateTotals(variation, qty); + } + }); +}); + +jQuery(function ($) { + const $form = $('form.product_page-sterjni'); + function updateTotals(variation, qty) { + if (!variation) return; + const weight = parseFloat(variation.weight) || 0; + const totalWeight = (weight * qty).toFixed(3); + $('.product_page-weight p:last-child').text(totalWeight + ' кг'); + // Используем raw_price - точная цена как в корзине (get_price()) + const newPrice = parseFloat(variation.raw_price) || parseFloat(variation.display_price) || 0; + const oldPrice = parseFloat(variation.raw_regular_price) || parseFloat(variation.display_regular_price) || 0; + // Считаем как корзина: цена * кол-во, потом округление + const totalNew = Math.round(newPrice * qty).toLocaleString('ru-RU'); + const totalOld = Math.round(oldPrice * qty).toLocaleString('ru-RU'); + $('.product_page-price').html(totalNew + ' '); + if (oldPrice && oldPrice > newPrice) { + $('.product_page-oldprice').show().html(totalOld + ' '); + } else { + $('.product_page-oldprice').hide(); + } + } + $form.on('show_variation', function (event, variation) { + const qty = parseInt($('.qty').val(), 10) || 1; + updateTotals(variation, qty); + }); + $('body').on('input change', '.qty', function () { + const variationID = $('.variation_id').val(); + const variations = $form.data('product_variations') || []; + const variation = variations.find(v => v.variation_id == variationID); + if (variation) { + const qty = parseInt($(this).val(), 10) || 1; + updateTotals(variation, qty); + } + }); +}); + +jQuery(function ($) { + // Работает только на простом товаре + if (!$('form.product_page-simple').length) { + return; + } + + function parsePrice(text) { + // Сначала заменяем запятую на точку (десятичный разделитель в RU) + // Потом удаляем пробелы и символ валюты + return parseFloat(text.replace(',', '.').replace(/\s|₽/g, '')) || 0; + } + + function updateTotals() { + const qty = parseInt($('.qty').val(), 10) || 1; + + // Приоритет: используем скрытые элементы с чистыми ценами (если есть) + // Это гарантирует точное совпадение с серверным расчётом + let newPrice = parseFloat($('.simple-price').data('price')) || 0; + let oldPrice = parseFloat($('.simple-price').data('regular-price')) || 0; + + // Fallback: парсим из .price HTML если скрытые элементы не найдены + if (!newPrice) { + const priceHtml = $('.price').html() || ''; + const $temp = $('
').html(priceHtml); + + const newPriceRaw = $temp.find('ins .amount').text() || $temp.find('.amount').first().text(); + const oldPriceRaw = $temp.find('del .amount').text(); + + newPrice = parsePrice(newPriceRaw); + oldPrice = parsePrice(oldPriceRaw); + } + + // Округляем итог чтобы совпадало с расчётом корзины + const totalNew = Math.round(newPrice * qty).toLocaleString('ru-RU'); + const totalOld = Math.round(oldPrice * qty).toLocaleString('ru-RU'); + + $('.product_page-price').html(totalNew + ' '); + if (oldPrice && oldPrice > newPrice) { + $('.product_page-oldprice').show().html(totalOld + ' '); + } else { + $('.product_page-oldprice').hide(); + } + + // ✅ Вес для простого товара (.simple-weight) — всегда 3 знака после запятой + const weight = parseFloat(($('.simple-weight').text() || '').replace(',', '.')) || 0; + const totalWeight = (weight * qty).toFixed(3); + $('.product_page-weight p:last-child').text(totalWeight + ' кг'); + } + + // Обновить при загрузке и при изменении количества + updateTotals(); + + $('body').on('input change', '.qty', function () { + updateTotals(); + }); +}); + + + + +jQuery(function($) { + function updateCartButtons() { + $.ajax({ + url: wc_add_to_cart_params.ajax_url, + type: 'POST', + data: { + action: 'get_cart_contents' + }, + success: function(response) { + console.log('Cart contents:', response); + if (!Array.isArray(response.items)) { + console.error('Invalid response format:', response); + return; + } + updateMiniCart(response.items); + updateTotalPrice(response.total, response.oldTotal); + updateCartCount(response.count); + } + }); + } + // Делаем функцию глобальной для доступа из других скриптов + window.updateCartButtons = updateCartButtons; + function updateMiniCart(items) { + var miniCart = $('.minicart-products'); + miniCart.empty(); + items.forEach(item => { + var oldPriceHtml = item.oldPrice ? `${item.oldPrice}` : ''; + miniCart.append(` +
+ + ${item.name} + +
+ ${item.name} (${item.quantity}${item.unit}) +
+

${item.price} ${oldPriceHtml}

+ +
+
+
+ `); + }); + } + function updateTotalPrice(total, oldTotal) { + let cleanTotal = total; + if (oldTotal) { + $('.minicart-price').html(cleanTotal + ' ' + oldTotal + ''); + } else { + $('.minicart-price').html(cleanTotal); + } + } + function updateCartCount(count) { + console.log('Updating cart count:', count); + var countElement = $('.header-cart__count'); + var countElement2 = $('.header-cart__count2'); + countElement.text(count).fadeOut(100, function() { + $(this).text(count).fadeIn(100); + }); + countElement2.text(count).fadeOut(100, function() { + $(this).text(count).fadeIn(100); + }); + console.log('Cart count updated in DOM:', countElement.text()); + } + $(document).ready(function() { + updateCartButtons(); + }); + $(document).on('click', '.minicart-product__delete', function(e) { + e.preventDefault(); + var button = $(this); + var productId = button.data('id'); + + $.ajax({ + url: wc_add_to_cart_params.ajax_url, + type: 'POST', + data: { + action: 'remove_from_cart', + product_id: productId + }, + success: function(response) { + updateCartButtons(); + $(document.body).trigger('wc_fragment_refresh'); + } + }); + }); + $(document).on('submit', 'form.product_page-kley', function(e) { + e.preventDefault(); + var form = $(this); + var button = form.find('.product_page-submit'); + var productId = button.data('id'); + var quantity = parseInt(form.find('input[name="quantity"]').val()) || 1; + var select = form.find('.product_page-calc__select select'); + var rawAttribute = select.data('attribute_name') || ''; + var attribute_name = String(rawAttribute).replace('attribute_', ''); + var selected_variation = select.val(); + + // Получаем цену из карточки товара (как она отображается) + var displayedPriceText = $('.product_page-price').text().replace(/\s/g, '').replace('₽', ''); + var displayedTotal = parseFloat(displayedPriceText) || 0; + var pricePerUnit = displayedTotal / quantity; + + $.ajax({ + url: wc_add_to_cart_params.ajax_url, + type: 'POST', + data: { + action: 'add_variation_by_attribute', + product_id: productId, + quantity: quantity, + attribute_name: attribute_name, + attribute_value: selected_variation, + custom_price: pricePerUnit, // Передаём цену из карточки + }, + beforeSend: function() { + button.addClass('loading'); + }, + success: function(response) { + button.removeClass('loading'); + if (response.added) { + button.addClass('active'); + } + $('.minicart__fon').css('display', 'flex'); + $('.minicart').css('display', 'flex'); + updateCartButtons(); + $(document.body).trigger('wc_fragment_refresh'); + }, + error: function(xhr, status, error) { + console.error('Ошибка при отправке запроса:', error); + } + }); + }); + + $(document).on('submit', 'form.product_page-trubi', function(e) { + e.preventDefault(); + var form = $(this); + var button = form.find('.product_page-submit'); + var productId = button.data('id'); + var quantity = parseInt(form.find('input[name="quantity"]').val()) || 1; + var select = form.find('.product_page-calc__select select'); + var rawAttribute = select.data('attribute_name') || ''; + var attribute_name = String(rawAttribute).replace('attribute_', ''); + var selected_variation = select.val(); + + // Получаем цену из карточки товара + var displayedPriceText = $('.product_page-price').text().replace(/\s/g, '').replace('₽', ''); + var displayedTotal = parseFloat(displayedPriceText) || 0; + var pricePerUnit = displayedTotal / quantity; + + $.ajax({ + url: wc_add_to_cart_params.ajax_url, + type: 'POST', + data: { + action: 'add_variation_by_attribute', + product_id: productId, + quantity: quantity, + attribute_name: attribute_name, + attribute_value: selected_variation, + custom_price: pricePerUnit, + }, + beforeSend: function() { + button.addClass('loading'); + }, + success: function(response) { + button.removeClass('loading'); + if (response.added) { + button.addClass('active'); + } + $('.minicart__fon').css('display', 'flex'); + $('.minicart').css('display', 'flex'); + updateCartButtons(); + $(document.body).trigger('wc_fragment_refresh'); + }, + error: function(xhr, status, error) { + console.error('Ошибка при отправке запроса:', error); + } + }); + }); + + $(document).on('submit', 'form.product_page-sterjni', function(e) { + e.preventDefault(); + var form = $(this); + var button = form.find('.product_page-submit'); + var productId = button.data('id'); + var quantity = parseInt(form.find('input[name="quantity"]').val()) || 1; + var select = form.find('.product_page-calc__select select'); + var rawAttribute = select.data('attribute_name') || ''; + var attribute_name = String(rawAttribute).replace('attribute_', ''); + var selected_variation = select.val(); + + // Получаем цену из карточки товара + var displayedPriceText = $('.product_page-price').text().replace(/\s/g, '').replace('₽', ''); + var displayedTotal = parseFloat(displayedPriceText) || 0; + var pricePerUnit = displayedTotal / quantity; + + $.ajax({ + url: wc_add_to_cart_params.ajax_url, + type: 'POST', + data: { + action: 'add_variation_by_attribute', + product_id: productId, + quantity: quantity, + attribute_name: attribute_name, + attribute_value: selected_variation, + custom_price: pricePerUnit, + }, + beforeSend: function() { + button.addClass('loading'); + }, + success: function(response) { + button.removeClass('loading'); + if (response.added) { + button.addClass('active'); + } + $('.minicart__fon').css('display', 'flex'); + $('.minicart').css('display', 'flex'); + updateCartButtons(); + $(document.body).trigger('wc_fragment_refresh'); + }, + error: function(xhr, status, error) { + console.error('Ошибка при отправке запроса:', error); + } + }); + }); + + jQuery(document).on('submit', 'form.product_page-simple', function(e) { + e.preventDefault(); + + var form = jQuery(this); + var button = form.find('.product_page-submit'); + // Используем attr вместо data для надёжности, также проверяем value кнопки + var productId = button.attr('data-id') || button.val() || button.attr('value'); + var quantity = parseInt(form.find('input[name="quantity"]').val()) || 1; + + // Проверяем что productId определён + if (!productId) { + console.error('Ошибка: ID товара не найден'); + console.log('Button:', button, 'data-id:', button.attr('data-id'), 'val:', button.val()); + return; + } + + console.log('Добавление в корзину: product_id=' + productId + ', quantity=' + quantity); + + jQuery.ajax({ + url: wc_add_to_cart_params.ajax_url, + type: 'POST', + data: { + action: 'woocommerce_ajax_add_to_cart', + product_id: productId, + quantity: quantity + }, + beforeSend: function() { + button.addClass('loading'); + }, + success: function(response) { + button.removeClass('loading'); + console.log('Ответ сервера:', response); + + // Проверяем на ошибку в ответе + if (response && response.error) { + console.error('Ошибка при добавлении в корзину:', response.message || 'Неизвестная ошибка'); + return; + } + + // Успешное добавление - показываем миникорзину + button.addClass('active'); + jQuery('.minicart__fon').css('display', 'flex'); + jQuery('.minicart').css('display', 'flex'); + + if (response && response.fragments) { + jQuery(document.body).trigger('added_to_cart', [response.fragments, response.cart_hash]); + } + + // Обновляем корзину и триггерим refresh + jQuery(document.body).trigger('wc_fragment_refresh'); + if (typeof updateCartButtons === 'function') { + updateCartButtons(); + } + }, + error: function(xhr, status, error) { + button.removeClass('loading'); + console.error('Ошибка при добавлении в корзину:', error); + } + }); +}); + +// Обработчик для формы калькулятора оргстекла +jQuery(document).on('submit', 'form.orgsteklo-calculator-form', function(e) { + e.preventDefault(); + + var form = jQuery(this); + var button = form.find('.single_add_to_cart_button'); + var productId = button.attr('value') || form.data('product_id'); + var quantity = parseInt(form.find('input[name="quantity"]').val()) || 1; + + // Собираем данные калькулятора + var thickness = form.find('#orgsteklo_thickness').val(); + var width = form.find('#orgsteklo_width').val(); + var length = form.find('#orgsteklo_length').val(); + + jQuery.ajax({ + url: wc_add_to_cart_params.ajax_url, + type: 'POST', + data: { + action: 'add_orgsteklo_to_cart', + product_id: productId, + quantity: quantity, + orgsteklo_thickness: thickness, + orgsteklo_width: width, + orgsteklo_length: length + }, + beforeSend: function() { + button.addClass('loading'); + }, + success: function(response) { + button.removeClass('loading'); + + if (response.success) { + button.addClass('active'); + jQuery('.minicart__fon').css('display', 'flex'); + jQuery('.minicart').css('display', 'flex'); + if (typeof updateCartButtons === 'function') { + updateCartButtons(); + } + jQuery(document.body).trigger('wc_fragment_refresh'); + } else { + alert(response.data ? response.data : 'Не удалось добавить товар в корзину'); + } + }, + error: function(xhr, status, error) { + button.removeClass('loading'); + console.error('Ошибка при добавлении в корзину:', error); + alert('Произошла ошибка при добавлении товара в корзину'); + } + }); +}); + + // ГЛОБАЛЬНАЯ функция обновления количества (исправление) + window.updateQuantity = function(productId, quantity) { + var ajaxUrl = (window.wc_add_to_cart_params && wc_add_to_cart_params.ajax_url) + ? wc_add_to_cart_params.ajax_url + : '/wp-admin/admin-ajax.php'; + + $.ajax({ + url: ajaxUrl, + type: 'POST', + dataType: 'json', + data: { + action: 'update_cart_quantity', + product_id: productId, + quantity: quantity + }, + success: function(response) { + if (response && response.fragments) { + $.each(response.fragments, function (key, value) { + $(key).replaceWith(value); + }); + } + if (response && response.updated) { + if (typeof window.updateCartButtons === 'function') { + window.updateCartButtons(); + } + $(document.body).trigger('wc_fragment_refresh'); + } else { + console.error('Ошибка обновления количества'); + } + }, + error: function(xhr, status, error) { + console.error('Ошибка AJAX:', error); + } + }); + }; + + $(document).on('click', '.cart-product__plus', function() { + const $container = $(this).closest('.cart-product-block'); + const $input = $container.find('input[type="number"]'); + const productId = $container.data('product-id'); + let currentVal = parseInt($input.val()); + let step = parseInt($input.attr('step')) || 1; + let max = parseInt($input.attr('max')); + if (!isNaN(currentVal)) { + let newVal = currentVal + step; + if (!isNaN(max)) { + newVal = Math.min(newVal, max); + } + $input.val(newVal).trigger('change'); + window.updateQuantity(productId, newVal); + } + }); + $(document).on('click', '.cart-product__minus', function() { + const $container = $(this).closest('.cart-product-block'); + const $input = $container.find('input[type="number"]'); + const productId = $container.data('product-id'); + let currentVal = parseInt($input.val()); + let step = parseInt($input.attr('step')) || 1; + let min = parseInt($input.attr('min')) || 1; + if (!isNaN(currentVal)) { + let newVal = currentVal - step; + newVal = Math.max(newVal, min); + $input.val(newVal).trigger('change'); + window.updateQuantity(productId, newVal); + } + }); + $(document).on('change', '.cart-product-block input[type="number"]', function() { + const $input = $(this); + const $container = $input.closest('.cart-product-block'); + const productId = $container.data('product-id'); + let val = parseInt($input.val()); + if (isNaN(val) || val < 1) { + val = 1; + $input.val(val); + } + window.updateQuantity(productId, val); + }); +}); + + + + + + + +function toNumber(val) { + if (val == null) return NaN; + return parseFloat(String(val).replace(',', '.')); +} +function getStepDecimals(step) { + const s = String(step); + const p = s.indexOf('.'); + return p >= 0 ? (s.length - p - 1) : 0; +} +function clamp(val, min, max) { + if (!isNaN(min)) val = Math.max(val, min); + if (!isNaN(max)) val = Math.min(val, max); + return val; +} +function roundToStep(base, step, min) { + // округление к сетке шага от минимума (или 0) + const origin = isNaN(min) ? 0 : min; + const n = Math.round((base - origin) / step) * step + origin; + const dec = getStepDecimals(step); + return parseFloat(n.toFixed(dec)); +} + +$(document).on('click', '.cart-product__quantity-plus', function () { + // Игнорируем кнопки калькулятора оргстекла - у них свой обработчик + if ($(this).attr('id') === 'orgsteklo_qty_plus') { + return; + } + + const $container = $(this).closest('.cart-product__quantity'); + const $input = $container.find('input[type="number"]'); + const productId = $container.data('product-id'); + console.log("Test") + const curr = toNumber($input.val()); + const step = toNumber($input.attr('step')) || 1; + const max = toNumber($input.attr('max')); + const min = toNumber($input.attr('min')) || 1; + + if (!isNaN(curr)) { + let newVal = curr + step; + newVal = roundToStep(newVal, step, min); + newVal = clamp(newVal, min, max); + + $input.val(newVal).trigger('change'); // для Woo + $(document).trigger('w:qty-changed', [{ productId, qty: newVal }]); // для своих скриптов + window.updateQuantity(productId, newVal); // глобальная + } +}); + +$(document).on('click', '.cart-product__quantity-minus', function () { + // Игнорируем кнопки калькулятора оргстекла - у них свой обработчик + if ($(this).attr('id') === 'orgsteklo_qty_minus') { + return; + } + + const $container = $(this).closest('.cart-product__quantity'); + const $input = $container.find('input[type="number"]'); + const productId = $container.data('product-id'); + + const curr = toNumber($input.val()); + const step = toNumber($input.attr('step')) || 1; + const max = toNumber($input.attr('max')); + const min = toNumber($input.attr('min')) || 1; + + if (!isNaN(curr)) { + let newVal = curr - step; + newVal = roundToStep(newVal, step, min); + newVal = clamp(newVal, min, max); + + $input.val(newVal).trigger('change'); + $(document).trigger('w:qty-changed', [{ productId, qty: newVal }]); + window.updateQuantity(productId, newVal); + } +}); + +var products_swiper = new Swiper(".products-swiper", { + loop: true, + breakpoints: { + 0: { + spaceBetween: 20, + slidesPerView: 1, + }, + 992: { + spaceBetween: 16, + slidesPerView: 4, + }, + }, + navigation: { + nextEl: ".products-next", + prevEl: ".products-prev", + }, +}); + +var partners_swiper = new Swiper(".partners-swiper", { + loop: true, + breakpoints: { + 0: { + spaceBetween: 16, + slidesPerView: 1.4, + }, + 992: { + spaceBetween: 16, + slidesPerView: 4.3, + }, + }, + navigation: { + nextEl: ".partners-next", + prevEl: ".partners-prev", + }, +}); + +var history_swiper = new Swiper(".history-swiper", { + loop: true, + breakpoints: { + 0: { + spaceBetween: 20, + slidesPerView: 1, + }, + }, + navigation: { + nextEl: ".history-next", + prevEl: ".history-prev", + }, +}); + +var projects_swiper = new Swiper(".projects-swiper", { + loop: true, + breakpoints: { + 0: { + spaceBetween: 20, + slidesPerView: 1, + }, + }, + navigation: { + nextEl: ".projects-next", + prevEl: ".projects-prev", + }, +}); + +var product_page_thumbs = new Swiper(".product_page_thumbs", { + breakpoints: { + 0: { + spaceBetween: 20, + slidesPerView: 1, + }, + 992: { + spaceBetween: 12, + slidesPerView: 6, + }, + }, + freeMode: true, + watchSlidesProgress: true, +}); + +var product_page_swiper = new Swiper(".product_page-swiper", { + spaceBetween: 10, + navigation: { + nextEl: ".product_page-next", + prevEl: ".product_page-prev", + }, + pagination: { + el: '.product_page-pagination', + clickable: true, + }, + thumbs: { + swiper: product_page_thumbs, + }, +}); + +var banner_swiper = new Swiper(".banner-swiper", { + loop: true, + breakpoints: { + 0: { + spaceBetween: 20, + slidesPerView: 1, + }, + }, + navigation: { + nextEl: ".banner-next", + prevEl: ".banner-prev", + }, +}); + diff --git a/wp-content/themes/orgsteklo/assets/js/price-calculator.js b/wp-content/themes/orgsteklo/assets/js/price-calculator.js new file mode 100644 index 0000000..d9f541f --- /dev/null +++ b/wp-content/themes/orgsteklo/assets/js/price-calculator.js @@ -0,0 +1,279 @@ +/** + * Калькулятор цен на оргстекло (с поддержкой скидок) + */ + +(function($) { + 'use strict'; + + if (typeof orgstekloCalc === 'undefined') { + return; + } + + var calculator = { + productId: orgstekloCalc.productId, + ajaxUrl: orgstekloCalc.ajaxUrl, + nonce: orgstekloCalc.nonce, + + $thicknessField: null, + $widthField: null, + $lengthField: null, + $quantityField: null, + + currentThickness: null, + currentWidth: null, + currentLength: null, + currentQuantity: 1, + + init: function() { + this.cacheElements(); + this.bindEvents(); + this.initializeFields(); + }, + + cacheElements: function() { + this.$thicknessField = $('#orgsteklo_thickness'); + this.$widthField = $('#orgsteklo_width'); + this.$lengthField = $('#orgsteklo_length'); + this.$quantityField = $('#orgsteklo_quantity'); + }, + + bindEvents: function() { + var self = this; + + this.$thicknessField.on('change', function() { + self.onThicknessChange(); + }); + + this.$widthField.on('input change', function() { + self.onDimensionsChange(); + }); + + this.$lengthField.on('input change', function() { + self.onDimensionsChange(); + }); + + this.$quantityField.on('input change', function() { + self.onQuantityChange(); + }); + + $('#orgsteklo_qty_plus').on('click', function(e) { + e.preventDefault(); + self.$quantityField.val((parseInt(self.$quantityField.val()) || 1) + 1).trigger('change'); + }); + + $('#orgsteklo_qty_minus').on('click', function(e) { + e.preventDefault(); + var val = parseInt(self.$quantityField.val()) || 1; + if (val > 1) { + self.$quantityField.val(val - 1).trigger('change'); + } + }); + }, + + initializeFields: function() { + if (this.$thicknessField.length === 0) { + console.error('ОШИБКА: Поле толщины #orgsteklo_thickness не найдено!'); + return; + } + + // Если толщина не выбрана, автоматически выбираем первую из списка + var currentVal = this.$thicknessField.val(); + + if (!currentVal) { + var firstThickness = this.$thicknessField.find('option:not([value=""])').first().val(); + if (firstThickness) { + this.$thicknessField.val(firstThickness); + } + } + + // Если теперь есть выбранная толщина, запускаем расчет + var finalVal = this.$thicknessField.val(); + if (finalVal) { + this.onThicknessChange(); + } + }, + + onThicknessChange: function() { + var thickness = parseFloat(this.$thicknessField.val()); + if (!thickness) return; + + this.currentThickness = thickness; + this.loadStandardDimensions(thickness); + }, + + onDimensionsChange: function() { + this.currentWidth = parseFloat(this.$widthField.val()) || null; + this.currentLength = parseFloat(this.$lengthField.val()) || null; + this.calculate(); + }, + + onQuantityChange: function() { + this.currentQuantity = parseInt(this.$quantityField.val()) || 1; + this.calculate(); + }, + + loadStandardDimensions: function(thickness) { + var self = this; + + $.post(this.ajaxUrl, { + action: 'orgsteklo_get_standard_dimensions', + nonce: this.nonce, + product_id: this.productId, + thickness: thickness + }, function(response) { + if (response.success) { + // Обновляем стандартные размеры (ТОЛЬКО здесь!) + $('#orgsteklo_standard_width').text(self.formatPrice(Math.round(response.data.width))); + $('#orgsteklo_standard_length').text(self.formatPrice(Math.round(response.data.length))); + + // Заполняем поля ввода + self.$widthField.val(response.data.width); + self.$lengthField.val(response.data.length); + self.currentWidth = response.data.width; + self.currentLength = response.data.length; + self.calculate(); + } else { + console.error('Ошибка get_standard_dimensions:', response.data); + alert('ОШИБКА: ' + (response.data?.message || 'неизвестная ошибка')); + } + }).fail(function(xhr, status, error) { + console.error('AJAX FAIL get_standard_dimensions:', status, error); + alert('AJAX ОШИБКА: ' + error); + }); + }, + + calculate: function() { + var self = this; + if (!this.currentThickness) return; + + this.showLoading(); + + $.post(this.ajaxUrl, { + action: 'orgsteklo_calculate', + nonce: this.nonce, + product_id: this.productId, + thickness: this.currentThickness, + width: this.currentWidth, + length: this.currentLength, + quantity: this.currentQuantity + }, function(response) { + if (response.success) { + self.displayResults(response.data); + } else { + console.error('Ошибка calculate:', response.data); + alert('ОШИБКА: ' + (response.data?.message || 'неизвестная ошибка')); + } + }).fail(function(xhr, status, error) { + console.error('AJAX FAIL calculate:', status, error, xhr.responseText); + alert('AJAX ОШИБКА: ' + error); + }).always(function() { + self.hideLoading(); + }); + }, + + displayResults: function(data) { + // ВАЖНО: Стандартные размеры обновляются ТОЛЬКО в loadStandardDimensions() + // и НЕ должны меняться при изменении пользовательских размеров! + + // ===== ОСНОВНЫЕ ЦЕНЫ ===== + $('#orgsteklo_price_standard_sheet').text(this.formatPrice(data.price_standard_sheet)); + + // ШАГ 5: Для заданных размеров показываем price_per_kg_current (Ст. кг ЛЗР), + // для стандартных - price_per_kg_standard (Ст. кг ЛСР) + var pricePerKg = data.price_per_kg_current || data.price_per_kg_standard; + $('#orgsteklo_price_per_kg_standard').text(this.formatPrice(pricePerKg)); + + $('#orgsteklo_price_sqm').text(this.formatPrice(data.price_sqm)); + $('#orgsteklo_current_sheet_price').text(this.formatPrice(data.price_current_sheet)); + // ВАЖНО: Вычисляем стоимость заказа как цена_за_единицу * количество + // чтобы совпадало с расчетом в корзине WooCommerce + $('#orgsteklo_order_price').text(this.formatPrice(data.price_current_sheet * this.currentQuantity)); + + // ===== ВЕС ===== + $('#orgsteklo_weight_standard_sheet').text(this.formatWeight(data.weight_standard_sheet)); + $('#orgsteklo_weight_sqm').text(this.formatWeight(data.weight_sqm)); + // Вес заказа также вычисляем как вес_за_единицу * количество + $('#orgsteklo_order_weight').text(this.formatWeight(data.weight_current_sheet * this.currentQuantity)); + + // ===== СБРОС СТАРЫХ ЦЕН ===== + $('.orgsteklo-old-price').hide().text(''); + $('#orgsteklo_order_price_old').hide(); + + // ===== СКИДКИ ===== + if (data.has_discount) { + + if (data.price_standard_sheet_old) { + $('#orgsteklo_price_standard_sheet_old') + .text(this.formatPrice(data.price_standard_sheet_old) + ' ₽') + .show(); + } + + // ШАГ 5: Для старой цены также используем правильное значение + var pricePerKgOld = data.price_per_kg_current_old || data.price_per_kg_standard_old; + if (pricePerKgOld) { + $('#orgsteklo_price_per_kg_standard_old') + .text(this.formatPrice(pricePerKgOld) + ' ₽') + .show(); + } + + if (data.price_sqm_old) { + $('#orgsteklo_price_sqm_old') + .text(this.formatPrice(data.price_sqm_old) + ' ₽') + .show(); + } + + if (data.price_current_sheet_old) { + $('#orgsteklo_current_sheet_price_old') + .text(this.formatPrice(data.price_current_sheet_old) + ' ₽') + .show(); + } + + if (data.price_current_sheet_old) { + // Старая цена заказа = старая цена за единицу * количество + $('#orgsteklo_order_price_old span:first') + .text(this.formatPrice(data.price_current_sheet_old * this.currentQuantity)); + $('#orgsteklo_order_price_old').show(); + } + } + }, + + resetOldPrices: function() { + $('.orgsteklo-old-price').hide().text(''); + $('#orgsteklo_order_price_old').hide(); + }, + + showOldPrice: function(selector, value, wrapper) { + if (!value) return; + $(selector).text(this.formatPrice(value)).show(); + if (wrapper) $(wrapper).show(); + }, + + formatPrice: function(price) { + return new Intl.NumberFormat('ru-RU', { + minimumFractionDigits: 0, + maximumFractionDigits: 0 + }).format(price); + }, + + formatWeight: function(weight) { + // Используем 'en-US' для точки как разделителя дробной части + return new Intl.NumberFormat('en-US', { + minimumFractionDigits: 3, + maximumFractionDigits: 3 + }).format(weight); + }, + + showLoading: function() { + $('.orgsteklo-calculator-results').addClass('loading'); + }, + + hideLoading: function() { + $('.orgsteklo-calculator-results').removeClass('loading'); + } + }; + + $(document).ready(function() { + calculator.init(); + }); + +})(jQuery); \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/blocks/block-consult.php b/wp-content/themes/orgsteklo/blocks/block-consult.php new file mode 100644 index 0000000..068e8a6 --- /dev/null +++ b/wp-content/themes/orgsteklo/blocks/block-consult.php @@ -0,0 +1,53 @@ + +
+
+
+
+ ' . $consult_title . ''; + } + if($consult_description) { + echo '

' . $consult_description . '

'; + } + ?> +
+
+ +
+ + +
+ + +
+ + +
+ +
+
+
+
+ +Телефон: $phone
Email: $email
Комментарий: $comment
Страница: $url"; + if(wp_mail($to, $subject, $message, $headers)) {} + } +?> \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/blocks/block-info.php b/wp-content/themes/orgsteklo/blocks/block-info.php new file mode 100644 index 0000000..6aced4c --- /dev/null +++ b/wp-content/themes/orgsteklo/blocks/block-info.php @@ -0,0 +1,41 @@ + +
+
+ ' . $info_title . ''; + } + if($info_title) { + echo '
'; + foreach ($info_repeats as $info_repeat) { + $info_repeat_icon = $info_repeat['info_repeat_icon']; + $info_repeat_title = $info_repeat['info_repeat_title']; + $info_repeat_description = $info_repeat['info_repeat_description']; + $info_repeat_link = $info_repeat['info_repeat_link']; + echo '
'; + if($info_repeat_icon) { + echo '' . esc_attr($info_repeat_icon['alt']) . ''; + } + if($info_repeat_title) { + echo '

' . $info_repeat_title . '

'; + } + if($info_repeat_description) { + echo '

' . $info_repeat_description . '

'; + } + if($info_repeat_link) { + echo 'Узнать подробнее'; + } + echo '
'; + } + echo '
'; + } + ?> +
+
+ \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/blocks/block-why.php b/wp-content/themes/orgsteklo/blocks/block-why.php new file mode 100644 index 0000000..216d8cf --- /dev/null +++ b/wp-content/themes/orgsteklo/blocks/block-why.php @@ -0,0 +1,33 @@ + +
+
+ ' . $why_title . ''; + } + if($why_repeats) { + echo '
'; + foreach ($why_repeats as $why_repeat) { + $why_repeat_title = $why_repeat['why_repeat_title']; + $why_repeat_description = $why_repeat['why_repeat_description']; + echo '
'; + if($why_repeat_title) { + echo '

' . $why_repeat_title . '

'; + } + if($why_repeat_description) { + echo '

' . $why_repeat_description . '

'; + } + echo '
'; + } + echo '
'; + } + ?> +
+
+ \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/footer.php b/wp-content/themes/orgsteklo/footer.php new file mode 100644 index 0000000..a52ed66 --- /dev/null +++ b/wp-content/themes/orgsteklo/footer.php @@ -0,0 +1,156 @@ +
+ '; + } + ?> +
'; + } + ?> + + '; + if($footer_payment_title) { + echo '

' . $footer_payment_title . '

'; + } + if($footer_payment_repeats) { + echo ''; + } + echo '
'; + } + ?> +
+ +
+ +
+ + +Телефон: $phone
Email: $email
Комментарий: $comment
Страница: $url"; + if(wp_mail($to, $subject, $message, $headers)) {} + } +?> + + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/functions.php b/wp-content/themes/orgsteklo/functions.php new file mode 100644 index 0000000..cc8657c --- /dev/null +++ b/wp-content/themes/orgsteklo/functions.php @@ -0,0 +1,2407 @@ + true, + 'fio' => $u->display_name, + 'phone' => get_user_meta( $uid, 'billing_phone', true ), + 'email' => $u->user_email, + 'company_name' => get_user_meta( $uid, 'company_name', true ), + 'inn' => get_user_meta( $uid, 'inn', true ), + 'kpp' => get_user_meta( $uid, 'kpp', true ), + 'legal_address' => get_user_meta( $uid, 'legal_address', true ), + 'actual_address' => get_user_meta( $uid, 'actual_address', true ), + 'account_type' => get_user_meta( $uid, 'account_type', true ), + )); + } else { + wp_localize_script( 'main_js', 'orgstekloCheckoutUser', array( + 'isLoggedIn' => false, + )); + } + } + function custom_theme_setup() { + add_theme_support('post-thumbnails'); + } + add_action('after_setup_theme', 'custom_theme_setup'); + + //woocommerce + + add_action( 'after_setup_theme', 'woocommerce_support' ); + function woocommerce_support() { + add_theme_support( 'woocommerce' ); + } + + ## Определение шаблона для страницы Магазина shop.php + add_filter( 'woocommerce_template_loader_files','qfurs_add_shop_template_file', 10, 1 ); + + function qfurs_add_shop_template_file($default_file){ + if( is_shop()){ + $default_file[] = WC()->template_path() .'shop.php'; + } + + return $default_file; + } + + function custom_product_category_template($template) { + if ( is_product_category() || ( is_search() && isset( $_GET['post_type'] ) && $_GET['post_type'] === 'product' ) ) { + $new_template = locate_template(array('woocommerce/shop.php')); + if (!empty($new_template)) { + return $new_template; + } + } + return $template; + } + add_filter('template_include', 'custom_product_category_template', 99); + + +//login + +add_action('wp_ajax_nopriv_login_by_phone', 'handle_login_by_phone'); +function handle_login_by_phone() { + $phone = isset($_POST['phone']) ? sanitize_text_field($_POST['phone']) : ''; + $password = isset($_POST['password']) ? $_POST['password'] : ''; + + if (!$phone || !$password) { + wp_send_json_error('Поля не заполнены'); + } + + // Найти пользователя по мета-данным billing_phone + $users = get_users([ + 'meta_key' => 'billing_phone', + 'meta_value' => $phone, + 'number' => 1, + 'fields' => ['ID'] + ]); + + if (empty($users)) { + wp_send_json_error('Пользователь не найден'); + } + + $user_id = $users[0]->ID; + $user = get_user_by('id', $user_id); + + if (wp_check_password($password, $user->user_pass, $user_id)) { + wp_set_current_user($user_id); + wp_set_auth_cookie($user_id, true); + wp_send_json_success(); + } else { + wp_send_json_error('Неверный пароль'); + } +} + +//recovey + +function custom_password_reset_handler() { + $email = sanitize_email($_POST['user_email']); + + if (!email_exists($email)) { + wp_send_json_error(['message' => 'User not found.']); + } + + $user = get_user_by('email', $email); + $new_password = wp_generate_password(12, true); + + wp_set_password($new_password, $user->ID); + + $subject = 'Ваш новый пароль'; + $message = "Здравствуйте!\n\nВаш новый пароль: $new_password\n\nВы можете войти здесь: " . wp_login_url(); + + $sent = wp_mail($email, $subject, $message); + + if ($sent) { + wp_send_json_success(); + } else { + wp_send_json_error(['message' => 'Не удалось отправить письмо.']); + } +} +add_action('wp_ajax_custom_password_reset', 'custom_password_reset_handler'); +add_action('wp_ajax_nopriv_custom_password_reset', 'custom_password_reset_handler'); + +//search + +function custom_search_by_attribute( $search, $wp_query ) { + global $wpdb; + + if ( ! empty( $wp_query->query_vars['s'] ) ) { + $attribute_search = $wpdb->esc_like( $wp_query->query_vars['s'] ); + $attribute_search = '%' . $attribute_search . '%'; + + $args = array( + 'posts_per_page' => -1, + 'post_type' => 'product', + 'meta_query' => array( + 'relation' => 'OR', + array( + 'key' => '_sku', + 'value' => $attribute_search, + 'compare' => 'LIKE' + ), + array( + 'key' => '_product_attributes', + 'value' => $attribute_search, + 'compare' => 'LIKE' + ), + ), + ); + + $products = get_posts( $args ); + + if ( $products ) { + $product_ids = wp_list_pluck( $products, 'ID' ); + $search .= " OR {$wpdb->posts}.ID IN (" . implode( ',', $product_ids ) . ")"; + } + } + + return $search; +} +add_filter( 'posts_search', 'custom_search_by_attribute', 10, 2 ); + +// Переопределение текста статусов наличия +add_action('admin_head', 'hide_default_stock_status'); +function hide_default_stock_status() { + $screen = get_current_screen(); + if ($screen->post_type === 'product') { + echo ''; + } +} + +add_action('woocommerce_product_options_stock_status', 'custom_stock_status_dropdown'); +function custom_stock_status_dropdown() { + woocommerce_wp_select([ + 'id' => '_custom_stock_status', + 'label' => 'Статус наличия (ручной)', + 'options' => [ + 'in_stock' => 'В наличии', + 'low_stock' => 'Осталось мало', + 'on_order' => 'Под заказ', + ] + ]); +} + +add_action('woocommerce_process_product_meta', 'save_custom_stock_status'); +function save_custom_stock_status($post_id) { + if (isset($_POST['_custom_stock_status'])) { + update_post_meta($post_id, '_custom_stock_status', sanitize_text_field($_POST['_custom_stock_status'])); + } +} + +// ======================================== +// ГАЛОЧКИ "ПОПУЛЯРНЫЙ" И "РЕКОМЕНДУЕМЫЙ" +// ======================================== + +/** + * Добавляем галочки в редактирование товара (вкладка "Основные") + */ +add_action( 'woocommerce_product_options_general_product_data', 'orgsteklo_add_popular_recommended_fields' ); +function orgsteklo_add_popular_recommended_fields() { + global $post; + + echo '
'; + + // Галочка "Популярный товар" + woocommerce_wp_checkbox( array( + 'id' => '_is_popular_product', + 'label' => 'Популярный товар', + 'description' => 'Добавляет метку "Популярный" на карточку товара', + ) ); + + // Галочка "Рекомендуемый товар" + woocommerce_wp_checkbox( array( + 'id' => '_is_recommended_product', + 'label' => 'Рекомендуемый товар', + 'description' => 'Товар будет показываться в блоке "Рекомендуемые товары" у других товаров этой категории', + ) ); + + echo '
'; + + // Характеристики для превью карточки товара + echo '
'; + + woocommerce_wp_text_input( array( + 'id' => '_preview_char_1', + 'label' => 'Характеристика 1', + 'description' => 'Первая строка характеристики в карточке товара (каталог, рекомендации)', + 'desc_tip' => true, + 'placeholder' => 'Например: Коэффициент пропускания света 92%', + ) ); + + woocommerce_wp_text_input( array( + 'id' => '_preview_char_2', + 'label' => 'Характеристика 2', + 'description' => 'Вторая строка характеристики в карточке товара (каталог, рекомендации)', + 'desc_tip' => true, + 'placeholder' => 'Например: Устойчив к УФ-излучению', + ) ); + + echo '
'; +} + +/** + * Сохраняем галочки и управляем тегом "Популярный" + */ +add_action( 'woocommerce_process_product_meta', 'orgsteklo_save_popular_recommended_fields' ); +function orgsteklo_save_popular_recommended_fields( $post_id ) { + // Сохраняем "Популярный" + $is_popular = isset( $_POST['_is_popular_product'] ) ? 'yes' : 'no'; + update_post_meta( $post_id, '_is_popular_product', $is_popular ); + + // Управляем тегом "Популярный" + $popular_tag = get_term_by( 'name', 'Популярный', 'product_tag' ); + + if ( $is_popular === 'yes' ) { + // Добавляем тег если его нет + if ( ! $popular_tag ) { + // Создаём тег если не существует + $new_tag = wp_insert_term( 'Популярный', 'product_tag' ); + if ( ! is_wp_error( $new_tag ) ) { + wp_set_object_terms( $post_id, $new_tag['term_id'], 'product_tag', true ); + } + } else { + wp_set_object_terms( $post_id, $popular_tag->term_id, 'product_tag', true ); + } + } else { + // Удаляем тег + if ( $popular_tag ) { + wp_remove_object_terms( $post_id, $popular_tag->term_id, 'product_tag' ); + } + } + + // Сохраняем "Рекомендуемый" + $is_recommended = isset( $_POST['_is_recommended_product'] ) ? 'yes' : 'no'; + update_post_meta( $post_id, '_is_recommended_product', $is_recommended ); + + // Сохраняем характеристики превью + if ( isset( $_POST['_preview_char_1'] ) ) { + update_post_meta( $post_id, '_preview_char_1', sanitize_text_field( $_POST['_preview_char_1'] ) ); + } + if ( isset( $_POST['_preview_char_2'] ) ) { + update_post_meta( $post_id, '_preview_char_2', sanitize_text_field( $_POST['_preview_char_2'] ) ); + } +} + +add_filter('woocommerce_get_availability_text', 'custom_availability_text', 10, 2); +function custom_availability_text($text, $product) { + $status = get_post_meta($product->get_id(), '_custom_stock_status', true); + switch ($status) { + case 'in_stock': + return 'В наличии'; + case 'low_stock': + return 'Осталось мало'; + case 'on_order': + return 'Под заказ'; + default: + return $text; + } +} + +add_action('wp_ajax_send_sms_code', 'send_sms_code'); +add_action('wp_ajax_nopriv_send_sms_code', 'send_sms_code'); + +function send_sms_code() { + $phone = sanitize_text_field($_POST['phone']); + + if (empty($phone)) { + wp_send_json_error(['message' => 'Телефон не указан']); + } + + $code = rand(1000, 9999); + set_transient('sms_verification_' . $phone, $code, 5 * MINUTE_IN_SECONDS); + + $api_id = '2DA8FFB5-365F-4A68-B369-14E40F5E81C4'; + $msg = "Код подтверждения: $code"; + + $response = wp_remote_post('https://sms.ru/sms/send', [ + 'body' => [ + 'api_id' => $api_id, + 'to' => $phone, + 'msg' => $msg, + 'json' => 1 + ] + ]); + + if (is_wp_error($response)) { + wp_send_json_error(['message' => 'Ошибка отправки SMS']); + } + + // ⚠️ в проде не стоит возвращать код, здесь — только для тестов + wp_send_json_success(['message' => 'Код отправлен', 'code' => $code]); +} + + +add_action('wp_ajax_check_email_exists', 'check_email_exists'); +add_action('wp_ajax_nopriv_check_email_exists', 'check_email_exists'); + +function check_email_exists() { + $email = sanitize_email($_POST['email']); + + if (!is_email($email)) { + wp_send_json_error(['message' => 'Неверный формат email']); + } + + if (email_exists($email)) { + wp_send_json_error(['message' => 'Email уже зарегистрирован']); + } + + wp_send_json_success(['message' => 'Email доступен']); +} + + + +add_action('wp_ajax_custom_register_user', 'custom_register_user'); +add_action('wp_ajax_nopriv_custom_register_user', 'custom_register_user'); + +function custom_register_user() { + $email = sanitize_email($_POST['email']); + $phone = sanitize_text_field($_POST['phone']); + $password = $_POST['password']; + $type = sanitize_text_field($_POST['type']); + + if (email_exists($email)) { + wp_send_json_error(['message' => 'Email уже существует']); + } + + $code = rand(1000, 9999); + set_transient('sms_verification_' . $phone, $code, 5 * MINUTE_IN_SECONDS); + + // Отправка SMS через SMS.ru + $api_id = '2DA8FFB5-365F-4A68-B369-14E40F5E81C4'; + $msg = "Код подтверждения: $code"; + + $response = wp_remote_post('https://sms.ru/sms/send', [ + 'body' => [ + 'api_id' => $api_id, + 'to' => $phone, + 'msg' => $msg, + 'json' => 1 + ] + ]); + + wp_send_json_success(['code' => $code]); +} + +add_action('wp_ajax_register_user', 'register_user'); +add_action('wp_ajax_nopriv_register_user', 'register_user'); + +function register_user() { + $email = sanitize_email($_POST['email']); + $phone = sanitize_text_field($_POST['phone']); + $password = $_POST['password']; + $type = sanitize_text_field($_POST['registration_type']); + $entered_code = sanitize_text_field($_POST['code']); + + $saved_code = get_transient('sms_verification_' . $phone); + + if (!$saved_code || $saved_code != $entered_code) { + wp_send_json_error(['message' => 'Неверный или просроченный код']); + } + + if (email_exists($email)) { + wp_send_json_error(['message' => 'Email уже зарегистрирован']); + } + + $user_id = wp_create_user($email, $password, $email); + + if (is_wp_error($user_id)) { + wp_send_json_error(['message' => 'Ошибка регистрации']); + } + + $user = new WP_User($user_id); + $user->set_role('customer'); + + // Сохраняем телефон в billing_phone (WooCommerce) + update_user_meta($user_id, 'billing_phone', $phone); + + // Сохраняем тип аккаунта + update_user_meta($user_id, 'account_type', $type); + + delete_transient('sms_verification_' . $phone); + wp_set_current_user($user_id); + wp_set_auth_cookie($user_id); + wp_send_json_success(['message' => 'Пользователь зарегистрирован']); +} + + + +add_action('wp_ajax_resend_sms_code', 'resend_sms_code'); +add_action('wp_ajax_nopriv_resend_sms_code', 'resend_sms_code'); + +function resend_sms_code() { + $phone = sanitize_text_field($_POST['phone']); + $code = rand(1000, 9999); + set_transient('sms_verification_' . $phone, $code, 5 * MINUTE_IN_SECONDS); + + $api_id = '2DA8FFB5-365F-4A68-B369-14E40F5E81C4'; + $msg = "Код подтверждения: $code"; + + $response = wp_remote_post('https://sms.ru/sms/send', [ + 'body' => [ + 'api_id' => $api_id, + 'to' => $phone, + 'msg' => $msg, + 'json' => 1 + ] + ]); + + wp_send_json_success(['code' => $code]); +} + + +add_action('show_user_profile', 'add_account_type_field_admin'); +add_action('edit_user_profile', 'add_account_type_field_admin'); + +function add_account_type_field_admin($user) { + $account_type = get_user_meta($user->ID, 'account_type', true); + ?> +

Дополнительная информация

+ + + + + +
+ +
+ 'Не авторизован']); + } + + $name = sanitize_text_field($_POST['name']); + $phone = sanitize_text_field($_POST['phone']); + $email = sanitize_email($_POST['email']); + + // Обновим имя + wp_update_user([ + 'ID' => $user_id, + 'display_name' => $name + ]); + + // Обновим номер телефона в billing_phone (WooCommerce) + update_user_meta($user_id, 'billing_phone', $phone); + + wp_send_json_success(); +}); + +add_action('wp_ajax_save_user_profile_data2', function () { + $user_id = get_current_user_id(); + if (!$user_id) { + wp_send_json_error(['message' => 'Не авторизован']); + } + + // Получаем данные + $name = sanitize_text_field($_POST['name']); + $phone = sanitize_text_field($_POST['phone']); + $email = sanitize_email($_POST['email']); + $company_name = sanitize_text_field($_POST['company_name']); + $inn = sanitize_text_field($_POST['inn']); + $kpp = sanitize_text_field($_POST['kpp']); + $legal_address = sanitize_text_field($_POST['legal_address']); + $actual_address = sanitize_text_field($_POST['actual_address']); + + // Обновляем пользователя + $user_update = wp_update_user([ + 'ID' => $user_id, + 'display_name' => $name, + 'user_email' => $email, + ]); + + if (is_wp_error($user_update)) { + wp_send_json_error(['message' => $user_update->get_error_message()]); + } + + update_user_meta($user_id, 'billing_phone', $phone); + update_user_meta($user_id, 'company_name', $company_name); + update_user_meta($user_id, 'inn', $inn); + update_user_meta($user_id, 'kpp', $kpp); + update_user_meta($user_id, 'legal_address', $legal_address); + update_user_meta($user_id, 'actual_address', $actual_address); + + wp_send_json_success(['message' => 'Данные успешно сохранены']); +}); + + + +add_action('wp_ajax_send_email_verification_link', function () { + $user_id = get_current_user_id(); + if (!$user_id) { + wp_send_json_error(['message' => 'Вы не авторизованы']); + } + + $user = wp_get_current_user(); + $email = $user->user_email; + + $token = bin2hex(random_bytes(16)); + update_user_meta($user_id, 'email_verification_token', $token); + + $link = add_query_arg([ + 'verify_email' => 1, + 'user_id' => $user_id, + 'token' => $token + ], site_url()); + + wp_mail($email, 'Подтверждение Email', "Подтвердите email, перейдя по ссылке: $link"); + + wp_send_json_success(['message' => 'Письмо отправлено']); +}); + +add_action('init', function () { + if ( + isset($_GET['verify_email']) && + $_GET['verify_email'] == 1 && + isset($_GET['user_id']) && + isset($_GET['token']) + ) { + $user_id = intval($_GET['user_id']); + $token = sanitize_text_field($_GET['token']); + + $saved_token = get_user_meta($user_id, 'email_verification_token', true); + + if ($token === $saved_token) { + update_user_meta($user_id, 'email_verified', 1); + delete_user_meta($user_id, 'email_verification_token'); + + wp_redirect(home_url('/?email_verified=1')); + exit; + } else { + wp_die('Неверная или просроченная ссылка.'); + } + } +}); + +add_filter('manage_users_columns', function ($columns) { + $columns['email_verified'] = 'Email подтвержден'; + return $columns; +}); + +add_filter('manage_users_custom_column', function ($value, $column_name, $user_id) { + if ($column_name === 'email_verified') { + return get_user_meta($user_id, 'email_verified', true) === '1' ? '✅ Да' : '❌ Нет'; + } + return $value; +}, 10, 3); + +add_action('wp_ajax_check_user_password', 'check_user_password_callback'); +function check_user_password_callback() { + if (!is_user_logged_in()) { + wp_send_json_error(); + } + $user = wp_get_current_user(); + $password = $_POST['password']; + + if (wp_check_password($password, $user->data->user_pass, $user->ID)) { + wp_send_json_success(); + } else { + wp_send_json_error(); + } +} + +add_action('wp_ajax_change_user_password', 'change_user_password_callback'); +function change_user_password_callback() { + if (!is_user_logged_in()) { + wp_send_json_error(['message' => 'Вы не авторизованы']); + } + + $user = wp_get_current_user(); + $old_password = $_POST['old_password']; + $new_password = $_POST['new_password']; + + if (!wp_check_password($old_password, $user->data->user_pass, $user->ID)) { + wp_send_json_error(['message' => 'Старый пароль неверен']); + } + + wp_set_password($new_password, $user->ID); + wp_send_json_success(); +} + + + + +function find_variation_id_by_attribute($product_id, $attribute_name, $attribute_value) { + $product = wc_get_product($product_id); + + if (!$product || !$product->is_type('variable')) { + return false; + } + + $available_variations = $product->get_available_variations(); + + foreach ($available_variations as $variation) { + $attributes = $variation['attributes']; + if ( + isset($attributes['attribute_' . $attribute_name]) && + $attributes['attribute_' . $attribute_name] === $attribute_value + ) { + return $variation['variation_id']; + } + } + + return false; +} + +add_action('wp_ajax_add_variation_by_attribute', 'add_variation_by_attribute'); +add_action('wp_ajax_nopriv_add_variation_by_attribute', 'add_variation_by_attribute'); +function add_variation_by_attribute() { + try { + $product_id = isset($_POST['product_id']) ? absint($_POST['product_id']) : 0; + $attribute_name = isset($_POST['attribute_name']) ? wc_clean($_POST['attribute_name']) : ''; + $attribute_value = isset($_POST['attribute_value']) ? sanitize_text_field(urldecode($_POST['attribute_value'])) : ''; + $quantity = isset($_POST['quantity']) ? absint($_POST['quantity']) : 1; + $custom_price = isset($_POST['custom_price']) ? floatval($_POST['custom_price']) : 0; + + if (!$product_id || !$attribute_name || !$attribute_value) { + throw new Exception('Не указаны обязательные параметры'); + } + + $variation_id = find_variation_id_by_attribute($product_id, $attribute_name, $attribute_value); + + if (!$variation_id) { + throw new Exception('Вариация с указанными параметрами не найдена'); + } + + $variation_product = wc_get_product($variation_id); + + if (!$variation_product) { + throw new Exception('Вариация не найдена'); + } + + if (!$variation_product->is_purchasable()) { + throw new Exception('Эта вариация недоступна для покупки'); + } + + if (!$variation_product->is_in_stock()) { + throw new Exception('Эта вариация нет в наличии'); + } + + // Автоматически соберём все атрибуты вариации + $variation_attributes = $variation_product->get_attributes(); + $attributes = array(); + foreach ($variation_attributes as $key => $value) { + $attributes['attribute_' . $key] = $value; + } + + // Передаём кастомную цену из карточки товара + $cart_item_data = array(); + if ($custom_price > 0) { + $cart_item_data['custom_display_price'] = $custom_price; + } + + $cart_item_key = WC()->cart->add_to_cart( + $product_id, + $quantity, + $variation_id, + $attributes, + $cart_item_data + ); + + if (!$cart_item_key) { + throw new Exception('Не удалось добавить товар в корзину'); + } + + $data = array( + 'success' => true, + 'added' => true, + 'message' => 'Товар успешно добавлен в корзину', + 'cart_item_count' => WC()->cart->get_cart_contents_count(), + 'fragments' => apply_filters('woocommerce_add_to_cart_fragments', array()), + 'cart_hash' => WC()->cart->get_cart_hash() + ); + + wp_send_json($data); + + } catch (Exception $e) { + wp_send_json_error($e->getMessage()); + } +} + +// Сохраняем кастомную цену в сессии корзины +add_filter('woocommerce_add_cart_item_data', 'save_custom_price_to_cart_item', 10, 3); +function save_custom_price_to_cart_item($cart_item_data, $product_id, $variation_id) { + if (isset($cart_item_data['custom_display_price'])) { + $cart_item_data['custom_display_price'] = floatval($cart_item_data['custom_display_price']); + } + return $cart_item_data; +} + +// Восстанавливаем кастомную цену из сессии +add_filter('woocommerce_get_cart_item_from_session', 'restore_custom_price_from_session', 10, 3); +function restore_custom_price_from_session($cart_item, $values, $key) { + if (isset($values['custom_display_price'])) { + $cart_item['custom_display_price'] = $values['custom_display_price']; + } + return $cart_item; +} + +// Применяем кастомную цену при расчете корзины +add_action('woocommerce_before_calculate_totals', 'apply_custom_display_price', 20, 1); +function apply_custom_display_price($cart) { + if (is_admin() && !defined('DOING_AJAX')) { + return; + } + + foreach ($cart->get_cart() as $cart_item_key => $cart_item) { + if (isset($cart_item['custom_display_price']) && $cart_item['custom_display_price'] > 0) { + $cart_item['data']->set_price($cart_item['custom_display_price']); + } + } +} + +add_action('wp_ajax_get_cart_contents', 'custom_get_cart_contents'); +add_action('wp_ajax_nopriv_get_cart_contents', 'custom_get_cart_contents'); + +function custom_get_cart_contents() { + $items = []; + $regular_total = 0; + $sale_total = 0; + + foreach (WC()->cart->get_cart() as $cart_item) { + $product = $cart_item['data']; + $variation_id = $cart_item['variation_id']; + $quantity = (int) $cart_item['quantity']; + + // Use same logic as cart.php - get_regular_price and get_sale_price + $regular_price = $product->get_regular_price(); + $sale_price = $product->get_sale_price(); + if ( $sale_price === '' ) { + $sale_price = $regular_price; + } + + $line_regular = $regular_price * $quantity; + $line_sale = $sale_price * $quantity; + + $regular_total += $line_regular; + $sale_total += $line_sale; + + $line_subtotal = number_format( $line_sale, 0, '', ' ' ) . ' ₽'; + $old_price = ''; + if ( $line_regular > $line_sale ) { + $old_price = number_format( $line_regular, 0, '', ' ' ) . ' ₽'; + } + + // Определяем единицу измерения + $unit = 'ШТ'; + if ( isset( $cart_item['orgsteklo_calculator'] ) ) { + $unit = 'ЛИСТ'; + } + + // Получаем название товара без вариаций + $product_name = $product->get_name(); + if ( $product->is_type('variation') ) { + $parent_product = wc_get_product( $cart_item['product_id'] ); + if ( $parent_product ) { + $product_name = $parent_product->get_name(); + } + } + + $items[] = [ + 'id' => (int) $cart_item['product_id'], + 'variation_id' => (int) $variation_id, + 'name' => $product_name, + 'sku' => $product->get_sku(), + 'price' => $line_subtotal, + 'oldPrice' => $old_price, + 'quantity' => $quantity, + 'unit' => $unit, + 'image' => get_the_post_thumbnail_url($cart_item['product_id'], 'thumbnail'), + 'url' => get_permalink($cart_item['product_id']), + ]; + } + + $count = WC()->cart->get_cart_contents_count(); + + // Применяем скидку от суммы заказа (порог проверяется по сумме СО скидками на товары) + $cart_discount = orgsteklo_calculate_cart_discount( $sale_total ); + $final_total = $sale_total - $cart_discount['amount']; + + $old_total = ''; + if ($regular_total > $final_total) { + $old_total = number_format($regular_total, 0, '', ' ') . ' ₽'; + } + + wp_send_json([ + 'items' => $items, + 'total' => number_format($final_total, 0, '', ' ') . ' ₽', + 'oldTotal' => $old_total, + 'count' => (int) $count + ]); +} + + + +add_action('wp_ajax_remove_from_cart', 'custom_remove_from_cart'); +add_action('wp_ajax_nopriv_remove_from_cart', 'custom_remove_from_cart'); +function custom_remove_from_cart() { + $product_id = absint($_POST['product_id']); + foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) { + if ($cart_item['product_id'] == $product_id) { + WC()->cart->remove_cart_item($cart_item_key); + break; + } + } + wp_send_json(['removed' => true, 'total' => WC()->cart->get_total()]); +} + + +add_action('wp_ajax_update_cart_quantity', 'custom_update_cart_quantity'); +add_action('wp_ajax_nopriv_update_cart_quantity', 'custom_update_cart_quantity'); + +function custom_update_cart_quantity() { + $product_id = absint($_POST['product_id']); + $quantity = isset($_POST['quantity']) ? absint($_POST['quantity']) : 1; + + // Найдем ключ товара в корзине + $cart = WC()->cart->get_cart(); + $updated = false; + + foreach ($cart as $cart_item_key => $cart_item) { + if ($cart_item['product_id'] == $product_id) { + // Обновим количество + WC()->cart->set_quantity($cart_item_key, $quantity, true); + $updated = true; + break; + } + } + + wp_send_json([ + 'updated' => $updated + ]); +} + + + +add_action('template_redirect', function() { + // Не обрабатываем обновление количества, если это запрос на удаление выбранных товаров + if (isset($_POST['delete_selected']) && $_POST['delete_selected'] == '1') { + return; + } + if (isset($_POST['update_checkout_cart']) && !empty($_POST['cart'])) { + foreach ($_POST['cart'] as $cart_item_key => $values) { + if (isset($values['qty'])) { + WC()->cart->set_quantity($cart_item_key, (int) $values['qty'], true); + } + } + WC()->cart->calculate_totals(); // Пересчет корзины + wp_safe_redirect(wc_get_cart_url()); // Обновляем страницу + exit; + } +}); + + +add_action('template_redirect', function() { + if ( isset($_POST['delete_selected']) && $_POST['delete_selected'] == '1' && !empty($_POST['cart_product_keys']) && is_array($_POST['cart_product_keys']) ) { + foreach ($_POST['cart_product_keys'] as $cart_item_key) { + WC()->cart->remove_cart_item($cart_item_key); + } + wc_clear_notices(); // Чистим сообщения об ошибках/успехе + + // Редирект на страницу корзины для обновления состояния + wp_safe_redirect(wc_get_cart_url()); + exit; + } +}); + + + +add_filter( 'woocommerce_checkout_fields', 'custom_checkout_fields' ); +function custom_checkout_fields( $fields ) { + // Billing fields + $fields['billing'] = array( + 'billing_country' => array( + 'type' => 'hidden', + 'default' => 'RU', + 'required' => false, + 'priority' => 1, + ), + 'billing_email' => array( + 'label' => __('Email', 'woocommerce'), + 'required' => true, + 'class' => array('form-row-wide'), + 'priority' => 10, + ), + 'billing_phone' => array( + 'label' => __('Номер телефона', 'woocommerce'), + 'required' => true, + 'class' => array('form-row-wide'), + 'priority' => 20, + ), + 'billing_first_name' => array( + 'label' => __('ФИО', 'woocommerce'), + 'required' => true, + 'class' => array('form-row-wide'), + 'priority' => 30, + ), + ); + + // Shipping fields — необязательные, т.к. при самовывозе адрес не нужен + $fields['shipping'] = array( + 'shipping_address_1' => array( + 'label' => __('Адрес доставки', 'woocommerce'), + 'required' => false, + 'class' => array('form-row-wide'), + 'priority' => 10, + 'placeholder' => __('Улица, дом, квартира', 'woocommerce'), + ), + ); + + return $fields; +} + +/** + * Принудительно устанавливаем страну RU для всех клиентов, + * чтобы WooCommerce всегда показывал способы доставки. + */ +add_action( 'woocommerce_before_checkout_form', 'orgsteklo_set_default_country', 5 ); +function orgsteklo_set_default_country() { + if ( WC()->customer && ! WC()->customer->get_billing_country() ) { + WC()->customer->set_billing_country( 'RU' ); + WC()->customer->set_shipping_country( 'RU' ); + } +} + +add_action( 'woocommerce_checkout_create_order', 'save_custom_shipping_field_to_order', 20, 2 ); +function save_custom_shipping_field_to_order( $order, $data ) { + if ( isset( $_POST['shipping_address_1'] ) ) { + $order->set_shipping_address_1( sanitize_text_field( $_POST['shipping_address_1'] ) ); + } +} + +// Сохраняем доп. поля заказа (тип лица, ИНН, КПП, адреса юр. лица) +add_action( 'woocommerce_checkout_create_order', 'orgsteklo_save_custom_billing_fields', 30, 2 ); +function orgsteklo_save_custom_billing_fields( $order, $data ) { + $fields = array( + 'billing_person_type' => '_billing_person_type', + 'billing_company_name_val' => '_billing_company_name', + 'billing_inn_val' => '_billing_inn', + 'billing_kpp_val' => '_billing_kpp', + 'billing_legal_address_val'=> '_billing_legal_address', + 'billing_actual_address_val'=> '_billing_actual_address', + 'shipping_km_mkad' => '_shipping_km_mkad', + ); + foreach ( $fields as $post_key => $meta_key ) { + if ( isset( $_POST[ $post_key ] ) && $_POST[ $post_key ] !== '' ) { + $order->update_meta_data( $meta_key, sanitize_text_field( $_POST[ $post_key ] ) ); + } + } +} + +add_action('wp_ajax_load_products', 'custom_ajax_load_products'); +add_action('wp_ajax_nopriv_load_products', 'custom_ajax_load_products'); + +function custom_ajax_load_products() { + $paged = isset($_POST['page']) ? intval($_POST['page']) : 1; + $posts_per_page = isset($_POST['per_page']) ? intval($_POST['per_page']) : 12; + + $args = array( + 'post_type' => 'product', + 'post_status' => array( 'publish', 'draft' ), + 'paged' => $paged, + 'posts_per_page' => $posts_per_page, + ); + + $query = new WP_Query($args); + $total = $query->found_posts; + $total_pages = $query->max_num_pages; + + if ($query->have_posts()) { + ob_start(); + + echo '
'; + while ($query->have_posts()) { + $query->the_post(); + wc_get_template_part('content', 'product'); + } + echo '
'; + + // === ПАГИНАЦИЯ === + echo '
'; + + // Показ количества + echo '
'; + echo '

Количество товаров на странице:

'; + // (Можно оставить HTML как есть — JS сам обновляет активную кнопку) + echo '
'; + + echo '
'; + echo '
'; + + // Prev + if ($paged > 1) { + echo ''; + } + + // Номера страниц + for ($i = 1; $i <= $total_pages; $i++) { + $active = $i == $paged ? ' active' : ''; + echo '' . $i . ''; + } + + // Next + if ($paged < $total_pages) { + echo ''; + } + + echo '
'; + + // Показ "00 товаров из 000" + $from = ($paged - 1) * $posts_per_page + 1; + $to = min($paged * $posts_per_page, $total); + echo '

' . $from . '–' . $to . ' товаров из ' . $total . '

'; + + echo '
'; + + wp_reset_postdata(); + + echo ob_get_clean(); + } else { + echo '

Нет товаров.

'; + } + + wp_die(); +} + + +// Добавляем поле "Длина" в вариации +add_action( 'woocommerce_variation_options_pricing', 'add_custom_length_field_to_variations', 10, 3 ); +function add_custom_length_field_to_variations( $loop, $variation_data, $variation ) { + woocommerce_wp_text_input( array( + 'id' => 'variation_length[' . $loop . ']', + 'class' => 'short', + 'label' => __('Длина', 'woocommerce') . ' (мм)', + 'value' => get_post_meta( $variation->ID, '_variation_length', true ) + ) ); +} + +// Добавляем поле "Ширина" в вариации +add_action( 'woocommerce_variation_options_pricing', 'add_custom_width_field_to_variations', 10, 3 ); +function add_custom_width_field_to_variations( $loop, $variation_data, $variation ) { + woocommerce_wp_text_input( array( + 'id' => 'variation_width[' . $loop . ']', + 'class' => 'short', + 'label' => __('Ширина', 'woocommerce') . ' (мм)', + 'value' => get_post_meta( $variation->ID, '_variation_width', true ) + ) ); +} + +// Сохраняем значение "Длина" +add_action( 'woocommerce_save_product_variation', 'save_custom_length_field_variations', 10, 2 ); +function save_custom_length_field_variations( $variation_id, $i ) { + if ( isset( $_POST['variation_length'][$i] ) ) { + update_post_meta( $variation_id, '_variation_length', sanitize_text_field( $_POST['variation_length'][$i] ) ); + } +} + +// Сохраняем значение "Ширина" +add_action( 'woocommerce_save_product_variation', 'save_custom_width_field_variations', 10, 2 ); +function save_custom_width_field_variations( $variation_id, $i ) { + if ( isset( $_POST['variation_width'][$i] ) ) { + update_post_meta( $variation_id, '_variation_width', sanitize_text_field( $_POST['variation_width'][$i] ) ); + } +} + +// Добавляем мета-данные в объект вариации +add_filter( 'woocommerce_available_variation', 'add_length_to_available_variations', 10, 3 ); +function add_length_to_available_variations( $variation, $product, $variation_obj ) { + // Сначала проверяем кастомное поле + $length = get_post_meta( $variation['variation_id'], '_variation_length', true ); + + // Если кастомное пустое, берём стандартное поле WooCommerce + if ( empty( $length ) && $variation_obj ) { + $length = $variation_obj->get_length(); + } + + if ( $length ) { + $variation['length'] = $length; + } + return $variation; +} + +// Добавляем ширину в объект вариации +add_filter( 'woocommerce_available_variation', 'add_width_to_available_variations', 10, 3 ); +function add_width_to_available_variations( $variation, $product, $variation_obj ) { + // Сначала проверяем кастомное поле + $width = get_post_meta( $variation['variation_id'], '_variation_width', true ); + + // Если кастомное пустое, берём стандартное поле WooCommerce + if ( empty( $width ) && $variation_obj ) { + $width = $variation_obj->get_width(); + } + + if ( $width ) { + $variation['width'] = $width; + } + return $variation; +} + +// Добавляем вес в данные вариации для отображения в шаблоне +add_filter( 'woocommerce_available_variation', 'add_weight_to_available_variations', 20 ); +function add_weight_to_available_variations( $variation ) { + $variation_obj = wc_get_product( $variation['variation_id'] ); + if ( $variation_obj ) { + $weight_raw = $variation_obj->get_weight(); + if ( $weight_raw !== '' ) { + $weight_num = (float) wc_format_decimal( $weight_raw ); + $variation['weight_formatted'] = number_format( $weight_num, 3, '.', '' ) . ' кг'; + } else { + $variation['weight_formatted'] = ''; + } + } + return $variation; +} + +// Добавляем точные цены (как в корзине) в данные вариации +add_filter( 'woocommerce_available_variation', 'add_raw_prices_to_variations', 25 ); +function add_raw_prices_to_variations( $variation ) { + $variation_obj = wc_get_product( $variation['variation_id'] ); + if ( $variation_obj ) { + // Точные цены как их использует корзина, округлённые до целых рублей + $variation['raw_price'] = round( (float) $variation_obj->get_price() ); + $variation['raw_regular_price'] = round( (float) $variation_obj->get_regular_price() ); + $sale_price = $variation_obj->get_sale_price(); + $variation['raw_sale_price'] = $sale_price !== '' ? round( (float) $sale_price ) : null; + } + return $variation; +} + +// Показываем дополнительные поля в админке на странице редактирования пользователя +add_action('show_user_profile', 'add_custom_user_fields_admin'); +add_action('edit_user_profile', 'add_custom_user_fields_admin'); + +function add_custom_user_fields_admin($user) { + ?> +

Юридическая информация

+ + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ 10, "-5%" => 5, "10%" => 10, "10 %" => 10 + * @return int|false процент скидки или false если не найден + */ +function get_discount_from_tag_name( $tag_name ) { + // Убираем пробелы по краям + $tag_name = trim( $tag_name ); + + // Ищем число с опциональным минусом и символом процента (с пробелом или без) + // Поддерживает: "-10%", "10%", "-10 %", "10 %", "- 10%", и т.д. + if ( preg_match( '/^-?\s*(\d+)\s*%/', $tag_name, $matches ) ) { + return absint( $matches[1] ); + } + return false; +} + +/** + * Получает процент скидки для товара из его меток (тегов) + * @param int $product_id ID товара + * @return int|false процент скидки или false + */ +function get_product_discount_percent( $product_id ) { + $tags = get_the_terms( $product_id, 'product_tag' ); + if ( ! $tags || is_wp_error( $tags ) ) { + return false; + } + + foreach ( $tags as $tag ) { + $discount = get_discount_from_tag_name( $tag->name ); + if ( $discount !== false ) { + return $discount; + } + } + + return false; +} + +/** + * Рассчитывает цену со скидкой на основе процента + * @param float $price исходная цена + * @param int $discount_percent процент скидки + * @return float цена со скидкой + */ +function calculate_discounted_price( $price, $discount_percent ) { + // Округляем до целых рублей для консистентности между PHP и JS + return round( $price * ( 100 - $discount_percent ) / 100 ); +} + +/** + * Рассчитывает процент скидки между двумя ценами + * @param float $regular_price обычная цена + * @param float $sale_price акционная цена + * @return int процент скидки (округленный) + */ +function calculate_discount_percentage( $regular_price, $sale_price ) { + if ( $regular_price <= 0 || $sale_price <= 0 || $sale_price >= $regular_price ) { + return 0; + } + return round( ( ( $regular_price - $sale_price ) / $regular_price ) * 100 ); +} + +/** + * Получает отсортированные метки (теги) товара + * Сначала идут метки статуса (без дефиса и процента), затем метки со скидками (с "-" и "%") + * @param int $product_id ID товара + * @return array массив объектов WP_Term, отсортированных + */ +function get_sorted_product_tags( $product_id ) { + $tags = get_the_terms( $product_id, 'product_tag' ); + if ( ! $tags || is_wp_error( $tags ) ) { + return []; + } + + $status_tags = []; + $discount_tags = []; + + foreach ( $tags as $tag ) { + // Если метка содержит "-" и "%", это скидка + if ( get_discount_from_tag_name( $tag->name ) !== false ) { + $discount_tags[] = $tag; + } else { + $status_tags[] = $tag; + } + } + + // Возвращаем: сначала статусные, потом скидки + return array_merge( $status_tags, $discount_tags ); +} + +/** + * Проверяет, является ли метка скидкой (содержит "-" и "%") + * @param string $tag_name название метки + * @return bool + */ +function is_discount_tag( $tag_name ) { + return get_discount_from_tag_name( $tag_name ) !== false; +} + +// ======================================== +// АВТОМАТИЧЕСКИЙ РАСЧЁТ СКИДОК ПО МЕТКАМ +// ======================================== + +/** + * Автоматически рассчитывает sale price для простого товара на основе метки со скидкой + * Хук срабатывает при получении цены со скидкой + */ +add_filter( 'woocommerce_product_get_sale_price', 'auto_calculate_sale_price_from_tag', 10, 2 ); +add_filter( 'woocommerce_product_get_price', 'auto_apply_discount_to_price', 10, 2 ); + +function auto_calculate_sale_price_from_tag( $sale_price, $product ) { + // ПРИОРИТЕТ: Если вручную установлена sale price - используем её + // Читаем напрямую из мета, чтобы избежать рекурсии + $manual_sale_price = get_post_meta( $product->get_id(), '_sale_price', true ); + + if ( $manual_sale_price !== '' && $manual_sale_price !== null && $manual_sale_price !== false ) { + return $manual_sale_price; // Вручную установленная цена имеет приоритет + } + + // Получаем процент скидки из меток товара + $discount_percent = get_product_discount_percent( $product->get_id() ); + + if ( $discount_percent === false ) { + return $sale_price; // Нет метки со скидкой - возвращаем как есть + } + + // Если скидка есть, рассчитываем sale price от regular price + $regular_price = $product->get_regular_price(); + + if ( empty( $regular_price ) || $regular_price <= 0 ) { + return $sale_price; // Нет обычной цены - не можем рассчитать + } + + // Рассчитываем цену со скидкой + $calculated_sale = calculate_discounted_price( $regular_price, $discount_percent ); + + return $calculated_sale; +} + +function auto_apply_discount_to_price( $price, $product ) { + // Применяем скидку к финальной цене + $sale_price = $product->get_sale_price(); + + if ( $sale_price !== '' && $sale_price !== null ) { + return $sale_price; + } + + return $price; +} + +/** + * Автоматически рассчитывает sale price для вариаций на основе метки родителя или самой вариации + */ +add_filter( 'woocommerce_product_variation_get_sale_price', 'auto_calculate_variation_sale_price_from_tag', 10, 2 ); +add_filter( 'woocommerce_product_variation_get_price', 'auto_apply_variation_discount_to_price', 10, 2 ); + +function auto_calculate_variation_sale_price_from_tag( $sale_price, $variation ) { + // ПРИОРИТЕТ: Если вручную установлена sale price на вариации - используем её + $manual_sale_price = get_post_meta( $variation->get_id(), '_sale_price', true ); + + if ( $manual_sale_price !== '' && $manual_sale_price !== null && $manual_sale_price !== false ) { + return $manual_sale_price; // Вручную установленная цена имеет приоритет + } + + // Сначала проверяем метку на самой вариации (если есть) + $discount_percent = get_product_discount_percent( $variation->get_id() ); + + // Если на вариации нет метки, проверяем родительский товар + if ( $discount_percent === false ) { + $parent_id = $variation->get_parent_id(); + if ( $parent_id ) { + $discount_percent = get_product_discount_percent( $parent_id ); + } + } + + if ( $discount_percent === false ) { + return $sale_price; // Нет метки со скидкой + } + + // Рассчитываем sale price от regular price вариации + $regular_price = $variation->get_regular_price(); + + if ( empty( $regular_price ) || $regular_price <= 0 ) { + return $sale_price; + } + + $calculated_sale = calculate_discounted_price( $regular_price, $discount_percent ); + + return $calculated_sale; +} + +function auto_apply_variation_discount_to_price( $price, $variation ) { + $sale_price = $variation->get_sale_price(); + + if ( $sale_price !== '' && $sale_price !== null ) { + return $sale_price; + } + + return $price; +} + +/** + * Помечаем товар как "on sale" если есть метка со скидкой + */ +add_filter( 'woocommerce_product_is_on_sale', 'mark_product_on_sale_if_has_discount_tag', 10, 2 ); + +function mark_product_on_sale_if_has_discount_tag( $on_sale, $product ) { + // Проверяем есть ли метка со скидкой + $discount_percent = get_product_discount_percent( $product->get_id() ); + + if ( $discount_percent !== false ) { + return true; // Есть метка со скидкой = товар на распродаже + } + + // Для вариативных товаров проверяем метку на родителе + if ( $product->is_type( 'variation' ) ) { + $parent_id = $product->get_parent_id(); + if ( $parent_id ) { + $parent_discount = get_product_discount_percent( $parent_id ); + if ( $parent_discount !== false ) { + return true; + } + } + } + + return $on_sale; +} + +// Глобальная сортировка вариантов по ЧИСЛАМ: по УБЫВАНИЮ (lexicographic: [x1,x2,…] desc) +add_filter('woocommerce_dropdown_variation_attribute_options_args', function ($args) { + if (empty($args['options']) || empty($args['product']) || empty($args['attribute'])) { + return $args; + } + + // <= поменяйте на 'asc' если нужно по возрастанию + $direction = 'desc'; // 'desc' или 'asc' + + $attribute = $args['attribute']; + $options = (array) $args['options']; + + // Берём видимую метку для опции + $get_label_for_option = function($opt) use ($attribute) { + static $cache = []; + $key = $attribute . '|' . (string)$opt; + if (isset($cache[$key])) return $cache[$key]; + + if (taxonomy_exists($attribute)) { + $field = is_numeric($opt) ? 'id' : 'slug'; + $term = get_term_by($field, $opt, $attribute); + if ($term && !is_wp_error($term)) { + return $cache[$key] = (string)$term->name; + } + } + + // fallback (кастомный атрибут или слаг) + $label = (string)$opt; + $label = str_replace(['-', '_'], ' ', $label); + $label = preg_replace('~\s+~u', ' ', $label); + return $cache[$key] = trim($label); + }; + + // Извлекаем ВСЕ числа из строки (поддержка "1,5" как 1.5) + $extract_numbers = function(string $label): array { + $normalized = str_replace(',', '.', $label); + preg_match_all('/\d+(?:\.\d+)?/u', $normalized, $m); + return array_map('floatval', $m[0] ?? []); + }; + + // Подготовка данных + $rows = []; + foreach ($options as $i => $opt) { + $label = ($opt === '') ? '' : $get_label_for_option($opt); + $nums = ($opt === '') ? [] : $extract_numbers($label); + $rows[] = [ + 'value' => $opt, + 'label' => $label, + 'nums' => $nums, + 'i' => $i, // исходный индекс для стабильности + ]; + } + + // Оставим пустую опцию первой + $firstEmpty = null; + $data = []; + foreach ($rows as $r) { + if ($r['value'] === '' && $firstEmpty === null) { + $firstEmpty = $r; + continue; + } + $data[] = $r; + } + + // Сортировка по кортежам чисел (лексикографически), направление: asc/desc + usort($data, function($a, $b) use ($direction) { + $na = $a['nums']; $nb = $b['nums']; + + $aHas = !empty($na); $bHas = !empty($nb); + if ($aHas && !$bHas) return -1; // числовые — выше текстовых + if (!$aHas && $bHas) return 1; + if (!$aHas && !$bHas) { + $c = strnatcasecmp($a['label'], $b['label']); + return ($c !== 0) ? $c : ($a['i'] <=> $b['i']); + } + + $len = max(count($na), count($nb)); + for ($k = 0; $k < $len; $k++) { + $ai = $na[$k] ?? null; + $bi = $nb[$k] ?? null; + + if ($ai === null && $bi === null) break; + if ($ai === null) return 1; // короче — НИЖЕ (напр. [50] после [50,10]) + if ($bi === null) return -1; + + if ($ai != $bi) { + // КОМБИНИРОВАННАЯ СОРТИРОВКА: + // Первое число: от меньшего к большему (ASC) + // Второе и последующие: от большего к меньшему (DESC) + if ($k === 0) { + // Первое число: ASC (5 → 6 → 10) + return ($ai < $bi) ? -1 : 1; // меньше — выше + } else { + // Второе+ число: DESC (при одинаковом первом: 7 → 6 → 4) + return ($ai < $bi) ? 1 : -1; // больше — выше + } + } + } + + // Полное равенство чисел — по метке, затем по исходному индексу + $c = strnatcasecmp($a['label'], $b['label']); + return ($c !== 0) ? $c : ($a['i'] <=> $b['i']); + }); + + $ordered = array_map(fn($r) => $r['value'], $data); + if ($firstEmpty !== null) array_unshift($ordered, ''); + + $args['options'] = $ordered; + return $args; +}, 20); + +// АВТОМАТИЧЕСКАЯ СОРТИРОВКА ТЕРМИНОВ АТРИБУТОВ ПО ЧИСЛАМ (ОТ БОЛЬШЕГО К МЕНЬШЕМУ) +// Применяется ВЕЗДЕ: в админке, на фронте, в вариациях +// Решает проблему: после импорта термины в правильном порядке БЕЗ ручного вмешательства + +add_filter( 'get_terms', 'auto_sort_attribute_terms_by_numbers', 10, 4 ); +function auto_sort_attribute_terms_by_numbers( $terms, $taxonomies, $args, $term_query ) { + // Применяем только к таксономиям атрибутов WooCommerce + if ( empty( $terms ) || is_wp_error( $terms ) ) { + return $terms; + } + + // Проверяем, что это атрибут товара + $is_product_attribute = false; + foreach ( (array) $taxonomies as $taxonomy ) { + if ( strpos( $taxonomy, 'pa_' ) === 0 ) { + $is_product_attribute = true; + break; + } + } + + if ( ! $is_product_attribute ) { + return $terms; + } + + // Направление сортировки (как в вариациях) + $direction = 'desc'; // от большего к меньшему + + // Функция извлечения чисел (ТОЧНО как в вариациях) + $extract_numbers = function( $label ) { + $normalized = str_replace( ',', '.', $label ); + preg_match_all( '/\d+(?:\.\d+)?/u', $normalized, $m ); + return array_map( 'floatval', $m[0] ?? [] ); + }; + + // Подготовка данных + $data = []; + foreach ( $terms as $i => $term ) { + // Пропускаем, если термин не объект (может быть строка в некоторых случаях) + if ( ! is_object( $term ) || ! isset( $term->name ) ) { + continue; + } + + $label = $term->name; + $nums = $extract_numbers( $label ); + $data[] = [ + 'term' => $term, + 'label' => $label, + 'nums' => $nums, + 'i' => $i, + ]; + } + + // Сортировка по кортежам чисел (КОМБИНИРОВАННАЯ: первое число ASC, второе+ DESC) + usort( $data, function( $a, $b ) { + $na = $a['nums']; + $nb = $b['nums']; + + $aHas = ! empty( $na ); + $bHas = ! empty( $nb ); + if ( $aHas && ! $bHas ) return -1; + if ( ! $aHas && $bHas ) return 1; + if ( ! $aHas && ! $bHas ) { + $c = strnatcasecmp( $a['label'], $b['label'] ); + return ( $c !== 0 ) ? $c : ( $a['i'] <=> $b['i'] ); + } + + $len = max( count( $na ), count( $nb ) ); + for ( $k = 0; $k < $len; $k++ ) { + $ai = $na[$k] ?? null; + $bi = $nb[$k] ?? null; + + if ( $ai === null && $bi === null ) break; + if ( $ai === null ) return 1; + if ( $bi === null ) return -1; + + if ( $ai != $bi ) { + // КОМБИНИРОВАННАЯ СОРТИРОВКА: + // Первое число: от меньшего к большему (ASC) + // Второе и последующие: от большего к меньшему (DESC) + if ($k === 0) { + return ($ai < $bi) ? -1 : 1; // меньше — выше + } else { + return ($ai < $bi) ? 1 : -1; // больше — выше + } + } + } + + $c = strnatcasecmp( $a['label'], $b['label'] ); + return ( $c !== 0 ) ? $c : ( $a['i'] <=> $b['i'] ); + } ); + + // Возвращаем отсортированные термины + return array_map( function( $item ) { + return $item['term']; + }, $data ); +} + +// СОХРАНЕНИЕ ПОЛЬЗОВАТЕЛЬСКОГО ПОРЯДКА АТРИБУТОВ ПРИ ОБНОВЛЕНИИ ТОВАРА +// Решает проблему: порядок самих атрибутов (не терминов!) сбрасывается + +add_action( 'woocommerce_process_product_meta', 'preserve_attribute_order_on_save', 20 ); +function preserve_attribute_order_on_save( $product_id ) { + // Получаем текущие атрибуты из POST (если они были отправлены) + if ( ! isset( $_POST['attribute_names'] ) || ! is_array( $_POST['attribute_names'] ) ) { + return; + } + + // Получаем существующие атрибуты товара + $product_attributes = get_post_meta( $product_id, '_product_attributes', true ); + + if ( ! is_array( $product_attributes ) ) { + return; + } + + // Обновляем позиции атрибутов согласно порядку из формы + $position = 0; + foreach ( $_POST['attribute_names'] as $attribute_name ) { + if ( isset( $product_attributes[ $attribute_name ] ) ) { + $product_attributes[ $attribute_name ]['position'] = $position; + $position++; + } + } + + // Сохраняем обновлённые атрибуты напрямую в meta (без вызова save) + update_post_meta( $product_id, '_product_attributes', $product_attributes ); +} + +// ПЕРЕИМЕНОВАНИЕ АТРИБУТА "ВЕС" В "ВЕС 1 ШТ" ДЛЯ ВАРИАТИВНЫХ ТОВАРОВ +// Применяется только на странице товара с вариациями + +add_filter( 'woocommerce_attribute_label', 'rename_weight_attribute_for_variations', 10, 3 ); +function rename_weight_attribute_for_variations( $label, $name, $product ) { + // Проверяем что это атрибут "Вес" + // Проверяем и slug (pa_ves) и оригинальное название (Вес) + if ( + $name === 'pa_ves' || + $name === 'Вес' || + $label === 'Вес' || + strpos( $name, 'ves' ) !== false + ) { + // Если есть product и это вариативный товар + if ( $product && is_object( $product ) && $product->is_type( 'variable' ) ) { + return 'Вес 1 шт'; + } + + // Если мы на странице вариативного товара (даже если $product не передан) + if ( is_product() ) { + global $post; + if ( $post ) { + $current_product = wc_get_product( $post->ID ); + if ( $current_product && $current_product->is_type( 'variable' ) ) { + return 'Вес 1 шт'; + } + } + } + } + + return $label; +} + +// Убираем дублирование "Вес 1 шт" у клея и труб в корзине +add_filter( 'woocommerce_get_item_data', 'remove_duplicate_weight_from_cart', 10, 2 ); +function remove_duplicate_weight_from_cart( $item_data, $cart_item ) { + // Проверяем что это вариативный товар + if ( ! isset( $cart_item['variation_id'] ) || empty( $cart_item['variation_id'] ) ) { + return $item_data; + } + + // Получаем product_id родительского товара + $product_id = $cart_item['product_id']; + $product_template = get_field('product_template', $product_id); + + // Если это клей или трубы, убираем атрибут веса из отображения + if ( in_array( $product_template, array( 'Клей', 'Трубы' ) ) ) { + // Фильтруем массив, убирая элементы с ключом содержащим "вес" или "Вес" + $item_data = array_filter( $item_data, function( $data ) { + $key = isset( $data['key'] ) ? $data['key'] : ( isset( $data['name'] ) ? $data['name'] : '' ); + // Убираем если ключ содержит "вес" в любом регистре + return stripos( $key, 'вес' ) === false; + }); + } + + return $item_data; +} + +// Подключаем админ-панель для калькулятора цен на оргстекло +require_once get_template_directory() . '/inc/price-calculator-admin.php'; + +// Подключаем функции расчета цен на оргстекло +require_once get_template_directory() . '/inc/price-calculator-functions.php'; + +/** + * Создание атрибута "Толщина листа" для вариаций без калькулятора + */ +add_action( 'after_switch_theme', 'orgsteklo_create_thickness_attribute' ); +function orgsteklo_create_thickness_attribute() { + // Проверяем, существует ли уже атрибут + $attribute_taxonomy = 'pa_tolschina_lista'; + + if ( ! taxonomy_exists( $attribute_taxonomy ) ) { + // Создаем атрибут через WordPress + $attribute_data = array( + 'slug' => 'tolschina_lista', + 'name' => __( 'Толщина листа', 'woocommerce' ), + 'type' => 'select', + 'order_by' => 'menu_order', + 'has_archives' => false, + ); + + // Используем функцию WooCommerce для создания атрибута + if ( function_exists( 'wc_create_attribute' ) ) { + $attribute_id = wc_create_attribute( $attribute_data ); + + if ( ! is_wp_error( $attribute_id ) ) { + // Регистрируем таксономию + register_taxonomy( + $attribute_taxonomy, + 'product', + array( + 'labels' => array( + 'name' => __( 'Толщина листа', 'woocommerce' ), + ), + 'hierarchical' => false, + 'show_ui' => false, + 'query_var' => true, + 'rewrite' => false, + ) + ); + } + } + } +} + +// Регистрируем таксономию атрибута при каждой загрузке +add_action( 'init', 'orgsteklo_register_thickness_taxonomy', 5 ); +function orgsteklo_register_thickness_taxonomy() { + if ( taxonomy_exists( 'pa_tolschina_lista' ) ) { + return; + } + + register_taxonomy( + 'pa_tolschina_lista', + 'product', + array( + 'labels' => array( + 'name' => __( 'Толщина листа', 'woocommerce' ), + 'singular_name' => __( 'Толщина листа', 'woocommerce' ), + ), + 'hierarchical' => false, + 'show_ui' => false, + 'query_var' => true, + 'rewrite' => false, + 'public' => true, + ) + ); +} + +/** + * Убираем вариации из названий товаров в корзине и оформлении заказа + */ +add_filter( 'woocommerce_cart_item_name', 'orgsteklo_remove_variation_from_cart_item_name', 10, 3 ); +add_filter( 'woocommerce_order_item_name', 'orgsteklo_remove_variation_from_order_item_name', 10, 2 ); + +function orgsteklo_remove_variation_from_cart_item_name( $product_name, $cart_item, $cart_item_key ) { + $_product = $cart_item['data']; + + if ( $_product && $_product->is_type('variation') ) { + $parent_product = wc_get_product( $cart_item['product_id'] ); + if ( $parent_product ) { + $product_name = $parent_product->get_name(); + } + } + + return $product_name; +} + +function orgsteklo_remove_variation_from_order_item_name( $product_name, $item ) { + $product = $item->get_product(); + + if ( $product && $product->is_type('variation') ) { + $parent_product = wc_get_product( $product->get_parent_id() ); + if ( $parent_product ) { + $product_name = $parent_product->get_name(); + } + } + + return $product_name; +} + +/** + * Страница настроек скидок от суммы заказа + */ +add_action( 'admin_menu', 'orgsteklo_add_cart_discount_page', 99 ); +function orgsteklo_add_cart_discount_page() { + add_submenu_page( + 'woocommerce', + 'Скидки от суммы заказа', + 'Скидки от суммы', + 'manage_woocommerce', + 'orgsteklo-cart-discounts', + 'orgsteklo_cart_discount_settings_page' + ); +} + +function orgsteklo_cart_discount_settings_page() { + // Сохранение настроек + if ( isset( $_POST['orgsteklo_discount_save'] ) && check_admin_referer( 'orgsteklo_discount_settings' ) ) { + $discounts = array(); + + if ( isset( $_POST['discount_amount'] ) && is_array( $_POST['discount_amount'] ) ) { + foreach ( $_POST['discount_amount'] as $index => $amount ) { + $amount = floatval( $amount ); + $percent = floatval( $_POST['discount_percent'][$index] ?? 0 ); + + if ( $amount > 0 && $percent > 0 ) { + $discounts[$amount] = $percent; + } + } + } + + // Сортируем по возрастанию суммы + ksort( $discounts ); + update_option( 'orgsteklo_cart_discounts', $discounts ); + + echo '

Настройки сохранены!

'; + } + + $discounts = get_option( 'orgsteklo_cart_discounts', array( + 10000 => 3, + 50000 => 5, + 100000 => 7, + 200000 => 10, + ) ); + + ?> +
+

Настройки скидок от суммы заказа

+

Настройте автоматические скидки в зависимости от суммы корзины. Скидка применяется автоматически при достижении указанной суммы.

+ +
+ + + + + + + + + + + + $percent ) : ?> + + + + + + + +
От суммы (₽)Скидка (%)Действия
+ +

+ +

+ +

+ +

+
+
+ + + + + 'В этом поле вы можете указать график работы склада, необходимость заказа пропуска, а также другие комментарии к заказу', + 'file_hint' => '', + 'payment_description' => '*Ваш заказ, информация о желаемом способе доставки и Ваши контакты будут направлены менеджеру компании "ОРГСТЕКЛО" для дальнейшей обработки заказа и выставления счета на оплату. Счет на оплату будет направлен Вам на указанный e-mail.', + 'pickup_address' => 'Московская обл., г. Реутов, ул. Победы, д. 1', + 'pickup_hours' => 'Часы работы: с 10:00 до 20:00', + 'pickup_description' => '(заезд грузового транспорта только со стороны шоссе Энтузиастов по проспекту Мира)', + 'pickup_map_link' => '', + 'pickup_map_iframe' => 'https://yandex.ru/map-widget/v1/?um=constructor%3A292408e4d7b13e325054d9d40cfd751bedc6dcb36775466b6e852ed33b3d2d1f&source=constructor', + 'samovyvoz_label' => 'Московская обл., г. Реутов, ул. Победы, д. 1', + 'moscow_label' => 'Стоимость: {cost}', + 'moscow_area_label' => 'Стоимость: {cost} + {km_rate} ₽ за каждый километр за МКАД', + 'moscow_area_km_rate' => '30', + 'region_label' => 'Транспортной компанией', + 'pochta_label' => 'Стоимость зависит от веса и габаритов заказа', + 'moscow_area_warning' => '*Если Вы введете недостоверные данные и не доплатите за доставку по области, продавец оставляет за собой право не доставлять товар.', + 'region_description' => 'Стоимость и условия доставки в другой регион рассчитываются индивидуально, после оформления заказа с вами свяжется менеджер для уточнения деталей доставки.', + 'pochta_description' => 'Стоимость и условия доставки в другой регион Почтой России рассчитываются индивидуально, после оформления заказа с вами свяжется менеджер для уточнения деталей доставки.', + 'online_payment_description' => '', + ); +} + +function orgsteklo_get_checkout_setting( $key ) { + $settings = get_option( 'orgsteklo_checkout_settings', array() ); + $defaults = orgsteklo_checkout_settings_defaults(); + return isset( $settings[ $key ] ) && $settings[ $key ] !== '' ? $settings[ $key ] : ( isset( $defaults[ $key ] ) ? $defaults[ $key ] : '' ); +} + +function orgsteklo_checkout_settings_page() { + if ( isset( $_POST['orgsteklo_checkout_save'] ) && check_admin_referer( 'orgsteklo_checkout_settings_nonce' ) ) { + $fields = array_keys( orgsteklo_checkout_settings_defaults() ); + $settings = array(); + foreach ( $fields as $field ) { + $settings[ $field ] = isset( $_POST[ $field ] ) ? wp_kses_post( wp_unslash( $_POST[ $field ] ) ) : ''; + } + update_option( 'orgsteklo_checkout_settings', $settings ); + echo '

Настройки сохранены!

'; + } + + $defaults = orgsteklo_checkout_settings_defaults(); + $settings = get_option( 'orgsteklo_checkout_settings', array() ); + $get = function( $key ) use ( $settings, $defaults ) { + return isset( $settings[ $key ] ) ? $settings[ $key ] : $defaults[ $key ]; + }; + ?> +
+

Настройки страницы доставки

+
+ + +

Комментарий к заказу

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

Способ оплаты

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

Самовывоз

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

Описания способов доставки (серый текст под названием)

+

Для «Доставка по Москве» и «Доставка по МО» используйте {cost} — подставится стоимость из WooCommerce. Для МО также доступен {km_rate} — стоимость за 1 км.

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

Используйте {km_rate} для подстановки стоимости за км.

+ +

Тексты-комментарии к адресным формам доставки

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

+ +

+
+
+ - Проверено и активировано + * + * Применяет скидку на основе общей суммы корзины: + * - От 10 000 ₽ - скидка 3% + * - От 50 000 ₽ - скидка 5% + * - От 100 000 ₽ - скидка 7% + * - От 200 000 ₽ - скидка 10% + * + * Настройки можно изменить в админке: WooCommerce → Скидки от суммы + */ +/** + * Вспомогательная функция для расчета скидки от суммы заказа + * Возвращает массив: ['percent' => %, 'amount' => сумма скидки] + */ +function orgsteklo_calculate_cart_discount( $cart_total ) { + $discount_tiers = get_option( 'orgsteklo_cart_discounts', array( + 10000 => 3, + 50000 => 5, + 100000 => 7, + 200000 => 10, + ) ); + + if ( empty( $discount_tiers ) ) { + return array( 'percent' => 0, 'amount' => 0 ); + } + + $discount_percent = 0; + krsort( $discount_tiers ); + foreach ( $discount_tiers as $threshold => $percent ) { + if ( $cart_total >= $threshold && $percent > $discount_percent ) { + $discount_percent = $percent; + break; + } + } + + $discount_amount = 0; + if ( $discount_percent > 0 ) { + $discount_amount = round( ( $cart_total * $discount_percent ) / 100 ); + } + + return array( 'percent' => $discount_percent, 'amount' => $discount_amount ); +} + +add_action( 'woocommerce_cart_calculate_fees', 'orgsteklo_cart_discount_based_on_total', 10 ); + +function orgsteklo_cart_discount_based_on_total() { + if ( is_admin() && ! defined( 'DOING_AJAX' ) ) { + return; + } + + // Получаем настройки скидок из админки + $discount_tiers = get_option( 'orgsteklo_cart_discounts', array( + 10000 => 3, + 50000 => 5, + 100000 => 7, + 200000 => 10, + ) ); + + if ( empty( $discount_tiers ) ) { + return; // Если настройки пусты, не применяем скидку + } + + // Считаем сумму СО скидками на товары для проверки порога и применения скидки + $sale_total = 0; + foreach ( WC()->cart->get_cart() as $item ) { + $product = $item['data']; + $qty = $item['quantity']; + $sale_price = $product->get_sale_price(); + if ( $sale_price === '' ) { + $sale_price = $product->get_regular_price(); + } + $sale_total += $sale_price * $qty; + } + + $discount_percent = 0; + + // Определяем скидку по сумме СО скидками на товары + krsort( $discount_tiers ); + foreach ( $discount_tiers as $threshold => $percent ) { + if ( $sale_total >= $threshold && $percent > $discount_percent ) { + $discount_percent = $percent; + break; + } + } + + // Применяем скидку + if ( $discount_percent > 0 ) { + $discount_amount = round( ( $sale_total * $discount_percent ) / 100 ); + WC()->cart->add_fee( 'Скидка от суммы заказа (' . $discount_percent . '%)', -$discount_amount ); + } +} + +/** + * Включаем черновики (draft) в поиск и каталог товаров + */ +add_action( 'pre_get_posts', 'orgsteklo_include_drafts_in_product_queries' ); +function orgsteklo_include_drafts_in_product_queries( $query ) { + if ( is_admin() || ! $query->is_main_query() ) { + return; + } + + // Поиск по товарам + if ( $query->is_search() && isset( $query->query_vars['post_type'] ) && $query->query_vars['post_type'] === 'product' ) { + $query->set( 'post_status', array( 'publish', 'draft' ) ); + } + + // Каталог / категории товаров + if ( $query->is_post_type_archive( 'product' ) || $query->is_tax( 'product_cat' ) ) { + $query->set( 'post_status', array( 'publish', 'draft' ) ); + } +} + +/** + * Переключатель количества товаров на странице (?per_page=24) + */ +add_filter( 'loop_shop_per_page', 'orgsteklo_products_per_page', 20 ); +function orgsteklo_products_per_page( $cols ) { + if ( isset( $_GET['per_page'] ) ) { + $val = sanitize_text_field( $_GET['per_page'] ); + if ( $val === 'all' ) { + return 9999; + } + $num = intval( $val ); + if ( in_array( $num, array( 12, 24, 48 ), true ) ) { + return $num; + } + } + return 12; +} + +/** + * Делаем черновики видимыми в каталоге/поиске, + * чтобы is_visible() не скрывала их в шаблоне content-product.php + */ +add_filter( 'woocommerce_product_is_visible', 'orgsteklo_draft_products_visible', 10, 2 ); +function orgsteklo_draft_products_visible( $visible, $product_id ) { + if ( ! $visible && get_post_status( $product_id ) === 'draft' ) { + return true; + } + return $visible; +} + +/** + * AJAX обработчик для добавления простых товаров в корзину + */ +add_action( 'wp_ajax_woocommerce_ajax_add_to_cart', 'woocommerce_ajax_add_to_cart' ); +add_action( 'wp_ajax_nopriv_woocommerce_ajax_add_to_cart', 'woocommerce_ajax_add_to_cart' ); + +function woocommerce_ajax_add_to_cart() { + $product_id = isset( $_POST['product_id'] ) ? absint( $_POST['product_id'] ) : 0; + $product_id = apply_filters( 'woocommerce_add_to_cart_product_id', $product_id ); + $quantity = empty( $_POST['quantity'] ) ? 1 : wc_stock_amount( $_POST['quantity'] ); + $variation_id = isset( $_POST['variation_id'] ) ? absint( $_POST['variation_id'] ) : 0; + + // Проверяем что product_id передан + if ( ! $product_id ) { + wp_send_json( array( + 'error' => true, + 'message' => 'ID товара не указан' + ) ); + wp_die(); + } + + // Получаем товар + $product = wc_get_product( $product_id ); + + if ( ! $product ) { + wp_send_json( array( + 'error' => true, + 'message' => 'Товар не найден' + ) ); + wp_die(); + } + + // Проверяем можно ли купить товар + if ( ! $product->is_purchasable() ) { + wp_send_json( array( + 'error' => true, + 'message' => 'Товар нельзя купить' + ) ); + wp_die(); + } + + // Проверяем наличие + if ( ! $product->is_in_stock() ) { + wp_send_json( array( + 'error' => true, + 'message' => 'Товар не в наличии' + ) ); + wp_die(); + } + + $passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity ); + + if ( ! $passed_validation ) { + wp_send_json( array( + 'error' => true, + 'message' => 'Ошибка валидации товара' + ) ); + wp_die(); + } + + // Добавляем в корзину + $cart_item_key = WC()->cart->add_to_cart( $product_id, $quantity, $variation_id ); + + if ( $cart_item_key ) { + do_action( 'woocommerce_ajax_added_to_cart', $product_id ); + + if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) { + wc_add_to_cart_message( array( $product_id => $quantity ), true ); + } + + WC_AJAX::get_refreshed_fragments(); + } else { + wp_send_json( array( + 'error' => true, + 'message' => 'Не удалось добавить товар в корзину', + 'product_url' => apply_filters( 'woocommerce_cart_redirect_after_error', get_permalink( $product_id ), $product_id ) + ) ); + } + + wp_die(); +} diff --git a/wp-content/themes/orgsteklo/header.php b/wp-content/themes/orgsteklo/header.php new file mode 100644 index 0000000..cec8050 --- /dev/null +++ b/wp-content/themes/orgsteklo/header.php @@ -0,0 +1,466 @@ + + + + + + + <?php + if (is_category()) { + single_cat_title(); + } elseif (is_tag()) { + single_tag_title(); + } elseif (is_tax()) { + single_term_title(); + } elseif (is_post_type_archive()) { + post_type_archive_title(); + } elseif (is_archive()) { + the_archive_title(); + } elseif (is_search()) { + echo 'Результаты поиска: ' . get_search_query(); + } elseif (is_404()) { + echo 'Страница не найдена'; + } elseif (is_home()) { + bloginfo('name'); + } elseif (is_singular()) { + echo get_the_title(); + } else { + wp_title(''); + } + ?> + + + + + + + + +> +
+
+
+ '; + echo '' . esc_attr($logo['alt']) . ''; + echo ''; + } + ?> +
+ menu_item_parent ? $item->menu_item_parent : 0; + $menu_tree[$parent_id][] = $item; + } + function render_menu($parent_id, $menu_tree) { + if (!isset($menu_tree[$parent_id])) { + return; + } + echo ''; + foreach ($menu_tree[$parent_id] as $item) { + $has_children = isset($menu_tree[$item->ID]); + $is_active = is_page($item->object_id) ? ' class="active"' : ''; + echo '
  • '; + echo '' . esc_html($item->title); + if ($has_children) { + echo ' '; + } + echo ''; + if ($has_children) { + render_menu($item->ID, $menu_tree); + } + echo '
  • '; + } + echo ''; + } + echo ''; + } + ?> +
    + ' . $phone . ''; + } + ?> + ' . $email . ''; + } + ?> +
    +
    +
    + '; + } + ?> + '; + } + ?> + + +
    +
    +
    +
    +
    + +
    + + +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +

    Товары в корзине (cart->get_cart_contents_count(); ?>)

    + cart->get_cart_contents_count();?> +
    + cart->get_cart() as $cart_item ) : + $product = $cart_item['data']; + if ( ! $product || ! $product->exists() ) continue; + + // Получаем название товара без вариаций + $product_name = $product->get_name(); + if ( $product->is_type('variation') ) { + $parent_product = wc_get_product( $cart_item['product_id'] ); + if ( $parent_product ) { + $product_name = $parent_product->get_name(); + } + } + ?> +
    + + <?php echo esc_attr( $product_name ); ?> + +
    + + (' . $cart_item['quantity'] . $unit . ')'; + ?> + +
    + get_regular_price(); + $sale_price = $product->get_sale_price(); + if ( $sale_price === '' ) { + $sale_price = $regular_price; + } + $line_regular = $regular_price * $cart_item['quantity']; + $line_sale = $sale_price * $cart_item['quantity']; + + if ( $line_regular > $line_sale ) { + echo '

    ' . wc_price( $line_sale ) . ' ' . wc_price( $line_regular ) . '

    '; + } else { + echo '

    ' . wc_price( $line_sale ) . '

    '; + } + ?> + +
    +
    +
    + +
    +
    +
    +

    Стоимость заказа:

    + cart->get_cart() as $cart_item ) { + $product = $cart_item['data']; + if ( ! $product ) continue; + + $quantity = $cart_item['quantity']; + $regular_price = $product->get_regular_price(); + $sale_price = $product->get_sale_price(); + if ( $sale_price === '' ) { + $sale_price = $regular_price; + } + $regular_total += $regular_price * $quantity; + $sale_total += $sale_price * $quantity; + } + + // Применяем скидку от суммы заказа (порог проверяется по сумме СО скидками на товары) + $cart_discount = function_exists('orgsteklo_calculate_cart_discount') + ? orgsteklo_calculate_cart_discount( $sale_total ) + : array( 'percent' => 0, 'amount' => 0 ); + + $final_total = $sale_total - $cart_discount['amount']; + + if ( $regular_total > $final_total ) { + echo '

    ' . number_format($final_total, 0, ',', ' ') . ' ₽ ' . number_format($regular_total, 0, ',', ' ') . ' ₽

    '; + } else { + echo '

    ' . number_format($final_total, 0, ',', ' ') . ' ₽

    '; + } + ?> +
    + +

    Перейти в корзину

    + +
    +
    +
    +
    +
    + term_id : 0; + $args = array( + 'taxonomy' => 'product_cat', + 'hide_empty' => false, + 'parent' => $parent_id, + 'exclude' => array($exclude_id), + 'orderby' => 'menu_order', + 'order' => 'ASC', + ); + $categories = get_terms($args); + foreach ($categories as $category) { + $child_args = array( + 'taxonomy' => 'product_cat', + 'hide_empty' => false, + 'parent' => $category->term_id, + ); + $children = get_terms($child_args); + $has_children = !empty($children); + echo '
  • '; + echo ''; + echo ''; + if ($has_children) { + echo ''; + } + echo ''; + if ($has_children) { + echo ''; + } + echo '
  • '; + } + } + ?> + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/inc/price-calculator-admin.php b/wp-content/themes/orgsteklo/inc/price-calculator-admin.php new file mode 100644 index 0000000..fe8ebc7 --- /dev/null +++ b/wp-content/themes/orgsteklo/inc/price-calculator-admin.php @@ -0,0 +1,669 @@ + sanitize_text_field( $_POST["table_{$table_num}_name"] ), + 'rows' => [] + ]; + + // Получаем строки таблицы + if ( isset( $_POST["table_{$table_num}_rows"] ) && is_array( $_POST["table_{$table_num}_rows"] ) ) { + foreach ( $_POST["table_{$table_num}_rows"] as $row ) { + $table_data['rows'][] = [ + 'thickness' => floatval( $row['thickness'] ?? 0 ), + 'width' => floatval( $row['width'] ?? 0 ), + 'length' => floatval( $row['length'] ?? 0 ), + 'k1' => floatval( $row['k1'] ?? 1 ), + 'k2' => floatval( $row['k2'] ?? 1 ), + 'k3' => floatval( $row['k3'] ?? 1 ), + 'k4' => floatval( $row['k4'] ?? 1 ), + 'k5' => floatval( $row['k5'] ?? 1 ), + 'n' => floatval( $row['n'] ?? 0 ), + ]; + } + } + + $tables[ $table_num ] = $table_data; + } + + update_option( 'orgsteklo_price_tables', $tables ); + update_option( 'orgsteklo_price_tables_count', $table_count ); + + // Редирект с сообщением об успехе + wp_redirect( add_query_arg( 'settings-updated', 'true', wp_get_referer() ) ); + exit; +} + +// Страница админки +function orgsteklo_price_calculator_page() { + // Получаем сохраненные данные + $base_price = get_option( 'orgsteklo_base_price_per_kg', 300 ); + $tables = get_option( 'orgsteklo_price_tables', [] ); + $table_count = get_option( 'orgsteklo_price_tables_count', 5 ); + + // Названия таблиц по умолчанию + $default_table_names = [ + 1 => 'Оргстекло прозрачное, бесцветное', + 2 => 'Оргстекло прозрачное, цветное', + 3 => 'Оргстекло глухое, сатинированное', + 4 => 'Оргстекло флуоресцентное, день/ночь, зеркальное', + 5 => 'Оргстекло с особыми свойствами', + ]; + + // Генерируем названия для дополнительных таблиц + for ( $i = 6; $i <= $table_count; $i++ ) { + $default_table_names[$i] = "Таблица {$i}"; + } + + ?> +
    +

    Калькулятор цен на оргстекло

    + + +
    +

    Настройки сохранены!

    +
    + + +
    + + + +

    Основные параметры

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

    При изменении этого значения пересчитываются все цены

    +
    + + + +

    По умолчанию: 1.19 г/см³

    +
    + + + +

    Множитель для нестандартных размеров. По умолчанию: 1.2

    +
    + +
    + + +

    Таблицы стандартных размеров, коэффициентов и надбавок

    + + + +
    + + + +
    +

    Таблица

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

    Строки данных

    + + + + + + + + + + + + + + + + + + $row ) : ?> + + + + + + + + + + + + + + + +
    Толщина (мм)Ширина (мм)Длина (мм)K1K2K3K4K5N (надбавка, руб)Действия
    + + +
    +
    + + + +
    +
    + + +
    + +
    + +

    По умолчанию: 5 таблиц. Нажмите кнопку для добавления новой таблицы.

    +
    + +

    + +

    +
    +
    + + + + + '-- Не выбрано --' + ]; + + $default_names = [ + 1 => 'Оргстекло прозрачное, бесцветное', + 2 => 'Оргстекло прозрачное, цветное', + 3 => 'Оргстекло глухое, сатинированное', + 4 => 'Оргстекло флуоресцентное, день/ночь, зеркальное', + 5 => 'Оргстекло с особыми свойствами', + ]; + + for ( $i = 1; $i <= $table_count; $i++ ) { + $name = $tables[ $i ]['name'] ?? ( $default_names[$i] ?? "Таблица {$i}" ); + $options[ $i ] = "Таблица {$i}: {$name}"; + } + + echo '
    '; + + woocommerce_wp_select( + [ + 'id' => '_orgsteklo_price_table', + 'label' => 'Таблица расчета цен', + 'description' => 'Выберите таблицу для расчета цен на оргстекло. Данные берутся из "Калькулятор цен" в меню.', + 'desc_tip' => true, + 'options' => $options, + ] + ); + + woocommerce_wp_textarea_input( + [ + 'id' => '_orgsteklo_important_text', + 'label' => 'Текст "Важно"', + 'description' => 'Информационный текст под калькулятором. Оставьте пустым для стандартного текста.', + 'desc_tip' => true, + 'placeholder' => 'Важно: оргстекло толщиной более 6 мм...', + ] + ); + + echo '
    '; +} + +// Сохранение поля +add_action( 'woocommerce_process_product_meta', 'orgsteklo_save_price_table_field' ); +function orgsteklo_save_price_table_field( $post_id ) { + $table_number = isset( $_POST['_orgsteklo_price_table'] ) ? sanitize_text_field( $_POST['_orgsteklo_price_table'] ) : ''; + update_post_meta( $post_id, '_orgsteklo_price_table', $table_number ); + + $important_text = isset( $_POST['_orgsteklo_important_text'] ) ? wp_kses_post( $_POST['_orgsteklo_important_text'] ) : ''; + update_post_meta( $post_id, '_orgsteklo_important_text', $important_text ); + + // Автоматически создаем вариации из таблицы калькулятора + if ( ! empty( $table_number ) && function_exists( 'orgsteklo_create_variations_from_table' ) ) { + $result = orgsteklo_create_variations_from_table( $post_id ); + + // Выводим alert с результатом + add_action( 'admin_notices', function() use ( $result ) { + $class = $result['success'] ? 'notice-success' : 'notice-error'; + $message = $result['message']; + echo "

    Вариации калькулятора: $message

    "; + + // Дополнительно выводим JS alert для гарантии + echo ""; + } ); + } +} + +// Отображение поля в вариациях (если нужно для вариативных товаров) +add_action( 'woocommerce_product_after_variable_attributes', 'orgsteklo_add_variation_price_table_field', 10, 3 ); +function orgsteklo_add_variation_price_table_field( $loop, $variation_data, $variation ) { + // Получаем значение для родительского товара (вариации наследуют таблицу от родителя) + $parent_id = wp_get_post_parent_id( $variation->ID ); + $parent_table = get_post_meta( $parent_id, '_orgsteklo_price_table', true ); + + if ( $parent_table ) { + echo '
    '; + echo 'Таблица расчета цен: Таблица ' . esc_html( $parent_table ) . ' (наследуется от родительского товара)'; + echo '
    '; + } +} diff --git a/wp-content/themes/orgsteklo/inc/price-calculator-functions.php b/wp-content/themes/orgsteklo/inc/price-calculator-functions.php new file mode 100644 index 0000000..a25deb9 --- /dev/null +++ b/wp-content/themes/orgsteklo/inc/price-calculator-functions.php @@ -0,0 +1,1019 @@ +get_cart() as $cart_item_key => $cart_item ) { + // Проверяем что элемент корректный + if ( ! isset( $cart_item['product_id'] ) || ! isset( $cart_item['data'] ) || ! is_object( $cart_item['data'] ) ) { + $to_remove[] = $cart_item_key; + } + } + + // Удаляем битые элементы + if ( ! empty( $to_remove ) ) { + foreach ( $to_remove as $key ) { + unset( $cart->cart_contents[ $key ] ); + } + $cart->set_session(); + } +} + +// ВРЕМЕННАЯ ОЧИСТКА И КОНВЕРТАЦИЯ - ЗАКОММЕНТИРОВАНО! +/* +add_action( 'init', 'orgsteklo_clear_and_convert', 1 ); +function orgsteklo_clear_and_convert() { + global $wpdb; + + // Очищаем корзину + $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '_wc_session_%'" ); + $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_wc_session_%'" ); + $wpdb->query( "DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE '_woocommerce_persistent_cart%'" ); + if ( function_exists( 'WC' ) && WC()->cart ) { + WC()->cart->empty_cart(); + } + + // Находим все товары с калькулятором и меняем их тип на simple + $products_with_calculator = $wpdb->get_results( + "SELECT post_id FROM {$wpdb->postmeta} + WHERE meta_key = '_orgsteklo_price_table' + AND meta_value != ''" + ); + + foreach ( $products_with_calculator as $row ) { + $product_id = $row->post_id; + + // Меняем тип на simple + wp_set_object_terms( $product_id, 'simple', 'product_type' ); + update_post_meta( $product_id, '_product_type', 'simple' ); + + // Удаляем все вариации если есть + $variations = $wpdb->get_results( $wpdb->prepare( + "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_type = 'product_variation'", + $product_id + ) ); + + foreach ( $variations as $variation ) { + wp_delete_post( $variation->ID, true ); + } + } +} +*/ +// ========== КОНЕЦ - ВРЕМЕННАЯ ОЧИСТКА ЗАКОММЕНТИРОВАНА ========== + +/** + * Получение констант из настроек (с возможностью изменения в админке) + */ + +function orgsteklo_get_discount_percent_from_tags( int $product_id ): int { + $tags = wp_get_post_terms( $product_id, 'product_tag', ['fields' => 'names'] ); + + if ( empty( $tags ) || is_wp_error( $tags ) ) { + return 0; + } + + foreach ( $tags as $tag ) { + if ( preg_match('/-(\d{1,2})%/', $tag, $m) ) { + return min( (int) $m[1], 90 ); // защита от -100% + } + } + + return 0; +} + +function orgsteklo_get_material_density() { + return floatval( get_option( 'orgsteklo_material_density', 1.19 ) ); +} + +function orgsteklo_get_custom_size_coefficient() { + return floatval( get_option( 'orgsteklo_custom_size_coefficient', 1.2 ) ); +} + +/** + * Получить данные таблицы для товара + * + * @param int $product_id ID товара + * @return array|null Данные таблицы или null если не найдено + */ +function orgsteklo_get_product_table_data( $product_id ) { + $table_number = get_post_meta( $product_id, '_orgsteklo_price_table', true ); + + if ( empty( $table_number ) ) { + return null; + } + + $tables = get_option( 'orgsteklo_price_tables', [] ); + + if ( ! isset( $tables[ $table_number ] ) ) { + return null; + } + + return $tables[ $table_number ]; +} + +/** + * Получить строку данных из таблицы по толщине + * + * @param array $table_data Данные таблицы + * @param float $thickness Толщина листа в мм + * @return array|null Строка данных или null если не найдено + */ +function orgsteklo_get_table_row_by_thickness( $table_data, $thickness ) { + if ( empty( $table_data['rows'] ) ) { + return null; + } + + foreach ( $table_data['rows'] as $row ) { + if ( abs( $row['thickness'] - $thickness ) < 0.01 ) { + return $row; + } + } + + return null; +} + +/** + * Расчет веса 1 листа + * Формула: В = А × В × С × 1.19 / 1000000 + * + * @param float $width Ширина в мм + * @param float $length Длина в мм + * @param float $thickness Толщина в мм + * @return float Вес в кг (округлено до 3 знаков) + */ +function orgsteklo_calculate_sheet_weight( $width, $length, $thickness ) { + $density = orgsteklo_get_material_density(); + $weight = ( $width * $length * $thickness * $density ) / 1000000; + return round( $weight, 3 ); +} + +/** + * Расчет веса 1 м² + * Формула: В_М² = С × 1.19 + * + * @param float $thickness Толщина в мм + * @return float Вес в кг (округлено до 3 знаков) + */ +function orgsteklo_calculate_sqm_weight( $thickness ) { + $density = orgsteklo_get_material_density(); + $weight = $thickness * $density; + return round( $weight, 3 ); +} + +/** + * Расчет стоимости 1 кг для листа стандартного размера + * Формула: Ст.кг_ЛСР = Ст.кг_баз × К1 × К2 × К3 × К4 × К5 + * + * @param array $row Строка данных из таблицы + * @return float Стоимость в рублях (округлено до целых) + */ +function orgsteklo_calculate_standard_price_per_kg( $row ) { + $base_price = get_option( 'orgsteklo_base_price_per_kg', 300 ); + + $k1 = $row['k1'] ?? 1; + $k2 = $row['k2'] ?? 1; + $k3 = $row['k3'] ?? 1; + $k4 = $row['k4'] ?? 1; + $k5 = $row['k5'] ?? 1; + + $price = $base_price * $k1 * $k2 * $k3 * $k4 * $k5; + return round( $price ); +} + +/** + * АЛГОРИТМ 1: Расчет для листа стандартного размера + * + * @param int $product_id ID товара + * @param float $thickness Толщина в мм + * @param int $quantity Количество листов + * @return array|WP_Error Массив с результатами расчета или ошибка + */ +function orgsteklo_calculate_standard_size( $product_id, $thickness, $quantity = 1 ) { + // Получаем данные таблицы + $table_data = orgsteklo_get_product_table_data( $product_id ); + if ( ! $table_data ) { + return new WP_Error( 'no_table', 'Для товара не выбрана таблица расчета цен' ); + } + + // Получаем строку данных по толщине + $row = orgsteklo_get_table_row_by_thickness( $table_data, $thickness ); + if ( ! $row ) { + return new WP_Error( 'no_thickness', 'В таблице нет данных для толщины ' . $thickness . ' мм' ); + } + + // Базовая стоимость 1 кг + $base_price_kg = get_option( 'orgsteklo_base_price_per_kg', 300 ); + + // Шаг 2: Стоимость 1 кг для листа стандартного размера + $price_per_kg_standard = orgsteklo_calculate_standard_price_per_kg( $row ); + + // Шаг 3: Вес 1 листа стандартного размера + $weight_standard_sheet = orgsteklo_calculate_sheet_weight( + $row['width'], + $row['length'], + $row['thickness'] + ); + + // Шаг 4: Стоимость 1 листа стандартного размера + $price_standard_sheet = round( $price_per_kg_standard * $weight_standard_sheet ); + + // Шаг 6: Вес заказа + $order_weight = round( $weight_standard_sheet * $quantity, 3 ); + + // Шаг 7: Стоимость заказа + $order_price = round( $price_standard_sheet * $quantity ); + + // Шаг 8: Вес 1 м² + $weight_sqm = orgsteklo_calculate_sqm_weight( $row['thickness'] ); + + // Шаг 9: Стоимость 1 м² + $price_sqm = round( ( $price_standard_sheet * 1000000 ) / ( $row['width'] * $row['length'] ) ); + + return [ + 'is_standard_size' => true, + 'base_price_kg' => $base_price_kg, + 'price_per_kg_standard' => $price_per_kg_standard, + 'weight_standard_sheet' => $weight_standard_sheet, + 'price_standard_sheet' => $price_standard_sheet, + 'width' => $row['width'], + 'length' => $row['length'], + 'thickness' => $row['thickness'], + 'price_per_kg_current' => $price_per_kg_standard, // Для стандартного = standard + 'weight_current_sheet' => $weight_standard_sheet, // Для стандартного = standard + 'price_current_sheet' => $price_standard_sheet, // Для стандартного = standard + 'weight_sqm' => $weight_sqm, + 'price_sqm' => $price_sqm, + 'quantity' => $quantity, + 'order_weight' => $order_weight, + 'order_price' => $order_price, + ]; +} + +/** + * АЛГОРИТМ 2: Расчет для листа заданного размера + * + * @param int $product_id ID товара + * @param float $thickness Толщина в мм + * @param float $width Заданная ширина в мм + * @param float $length Заданная длина в мм + * @param int $quantity Количество листов + * @return array|WP_Error Массив с результатами расчета или ошибка + */ +function orgsteklo_calculate_custom_size( $product_id, $thickness, $width, $length, $quantity = 1 ) { + // Сначала получаем все значения из Алгоритма 1 (они не меняются) + $standard_calc = orgsteklo_calculate_standard_size( $product_id, $thickness, $quantity ); + + if ( is_wp_error( $standard_calc ) ) { + return $standard_calc; + } + + // Получаем данные таблицы для надбавки N + $table_data = orgsteklo_get_product_table_data( $product_id ); + $row = orgsteklo_get_table_row_by_thickness( $table_data, $thickness ); + + // Шаг 1: Вес 1 листа заданного размера + $weight_custom_sheet = orgsteklo_calculate_sheet_weight( $width, $length, $thickness ); + + // Шаг 2: Вес заказа + $order_weight = round( $weight_custom_sheet * $quantity, 3 ); + + // Шаг 3: Стоимость 1 листа заданного размера + // Формула: Ст.ЛЗР = (Ст.кг_ЛСР × коэфф × В_ЛЗР) + N + $n_surcharge = $row['n'] ?? 0; + $custom_coeff = orgsteklo_get_custom_size_coefficient(); + $price_custom_sheet = round( + ( $standard_calc['price_per_kg_standard'] * $custom_coeff * $weight_custom_sheet ) + $n_surcharge + ); + + // Шаг 4: Стоимость заказа и стоимость 1 м² + $order_price = round( $price_custom_sheet * $quantity ); + $price_sqm = round( ( $price_custom_sheet * 1000000 ) / ( $width * $length ) ); + + // Шаг 5: Стоимость 1 кг для листа заданного размера + $price_per_kg_custom = $order_weight > 0 ? round( $order_price / $order_weight ) : 0; + + // Обновляем результаты + $result = $standard_calc; + $result['is_standard_size'] = false; + $result['width'] = $width; + $result['length'] = $length; + $result['weight_current_sheet'] = $weight_custom_sheet; + $result['price_current_sheet'] = $price_custom_sheet; + $result['price_per_kg_current'] = $price_per_kg_custom; + $result['price_sqm'] = $price_sqm; + $result['order_weight'] = $order_weight; + $result['order_price'] = $order_price; + $result['n_surcharge'] = $n_surcharge; + + return $result; +} + +/** + * Универсальная функция расчета - автоматически определяет алгоритм + * + * @param int $product_id ID товара + * @param float $thickness Толщина в мм + * @param float|null $width Ширина в мм (null = стандартная) + * @param float|null $length Длина в мм (null = стандартная) + * @param int $quantity Количество листов + * @return array|WP_Error Массив с результатами расчета или ошибка + */ +function orgsteklo_calculate_price( $product_id, $thickness, $width = null, $length = null, $quantity = 1 ) { + // Получаем данные таблицы + $table_data = orgsteklo_get_product_table_data( $product_id ); + if ( ! $table_data ) { + return new WP_Error( 'no_table', 'Для товара не выбрана таблица расчета цен' ); + } + + // Получаем строку данных по толщине + $row = orgsteklo_get_table_row_by_thickness( $table_data, $thickness ); + if ( ! $row ) { + return new WP_Error( 'no_thickness', 'В таблице нет данных для толщины ' . $thickness . ' мм' ); + } + + // Определяем стандартные размеры + $standard_width = $row['width']; + $standard_length = $row['length']; + + // Если размеры не заданы или равны стандартным - используем Алгоритм 1 + if ( + ( $width === null && $length === null ) || + ( abs( $width - $standard_width ) < 0.01 && abs( $length - $standard_length ) < 0.01 ) + ) { + return orgsteklo_calculate_standard_size( $product_id, $thickness, $quantity ); + } + + // Иначе используем Алгоритм 2 + return orgsteklo_calculate_custom_size( $product_id, $thickness, $width, $length, $quantity ); +} + +/** + * Получить все доступные толщины для товара + * + * @param int $product_id ID товара + * @return array Массив толщин + */ +function orgsteklo_get_available_thicknesses( $product_id ) { + $table_data = orgsteklo_get_product_table_data( $product_id ); + + if ( ! $table_data || empty( $table_data['rows'] ) ) { + return []; + } + + $thicknesses = []; + foreach ( $table_data['rows'] as $row ) { + $thicknesses[] = $row['thickness']; + } + + return $thicknesses; +} + +/** + * Получить стандартные размеры для толщины + * + * @param int $product_id ID товара + * @param float $thickness Толщина в мм + * @return array|null Массив ['width' => ..., 'length' => ...] или null + */ +function orgsteklo_get_standard_dimensions( $product_id, $thickness ) { + $table_data = orgsteklo_get_product_table_data( $product_id ); + + if ( ! $table_data ) { + return null; + } + + $row = orgsteklo_get_table_row_by_thickness( $table_data, $thickness ); + + if ( ! $row ) { + return null; + } + + return [ + 'width' => $row['width'], + 'length' => $row['length'], + ]; +} + +/** + * AJAX обработчик для расчета цен + */ +add_action( 'wp_ajax_orgsteklo_calculate', 'orgsteklo_ajax_calculate' ); +add_action( 'wp_ajax_nopriv_orgsteklo_calculate', 'orgsteklo_ajax_calculate' ); + +function orgsteklo_ajax_calculate() { + + check_ajax_referer( 'orgsteklo_calc_nonce', 'nonce' ); + + $product_id = intval( $_POST['product_id'] ?? 0 ); + $thickness = floatval( $_POST['thickness'] ?? 0 ); + $width = isset($_POST['width']) ? floatval($_POST['width']) : null; + $length = isset($_POST['length']) ? floatval($_POST['length']) : null; + $quantity = intval( $_POST['quantity'] ?? 1 ); + + if ( ! $product_id || ! $thickness ) { + wp_send_json_error( [ 'message' => 'Не указаны обязательные параметры', 'debug' => 'params missing' ] ); + } + + /** 1️⃣ Получаем данные из таблицы калькулятора (как раньше!) */ + $result = orgsteklo_calculate_price( $product_id, $thickness, $width, $length, $quantity ); + + if ( is_wp_error( $result ) ) { + wp_send_json_error( [ 'message' => $result->get_error_message() ] ); + } + + /** 2️⃣ Получаем стандартные размеры из таблицы для вывода */ + $table_data = orgsteklo_get_product_table_data( $product_id ); + $row = orgsteklo_get_table_row_by_thickness( $table_data, $thickness ); + + // Добавляем стандартные размеры в результат + $result['standard_width'] = $row['width']; + $result['standard_length'] = $row['length']; + + /** 3️⃣ СКИДКА ПО МЕТКАМ */ + $discount_percent = orgsteklo_get_discount_percent_from_tags( $product_id ); + $has_discount = $discount_percent > 0; + + $result['has_discount'] = $has_discount; + + // гарантируем ключи + $result['price_standard_sheet_old'] = null; + $result['price_per_kg_standard_old'] = null; + $result['price_per_kg_current_old'] = null; + $result['price_sqm_old'] = null; + $result['price_current_sheet_old'] = null; + $result['order_price_old'] = null; + + if ( $has_discount ) { + + // сохраняем старые цены + $result['price_standard_sheet_old'] = $result['price_standard_sheet']; + $result['price_per_kg_standard_old'] = $result['price_per_kg_standard']; + $result['price_sqm_old'] = $result['price_sqm']; + $result['price_current_sheet_old'] = $result['price_current_sheet']; + $result['order_price_old'] = $result['order_price']; + + // Сохраняем старую цену за кг для заданного размера (если есть) + if ( isset( $result['price_per_kg_current'] ) ) { + $result['price_per_kg_current_old'] = $result['price_per_kg_current']; + } + + $coef = (100 - $discount_percent) / 100; + + // применяем скидку + $result['price_standard_sheet'] = round($result['price_standard_sheet'] * $coef); + $result['price_per_kg_standard'] = round($result['price_per_kg_standard'] * $coef); + $result['price_sqm'] = round($result['price_sqm'] * $coef); + $result['price_current_sheet'] = round($result['price_current_sheet'] * $coef); + $result['order_price'] = round($result['order_price'] * $coef); + + // Применяем скидку к цене за кг для заданного размера (если есть) + if ( isset( $result['price_per_kg_current'] ) ) { + $result['price_per_kg_current'] = round($result['price_per_kg_current'] * $coef); + } + } + + /** 4️⃣ Отправляем результат */ + wp_send_json_success( $result ); +} +/** + * AJAX обработчик для получения стандартных размеров + */ +add_action( 'wp_ajax_orgsteklo_get_standard_dimensions', 'orgsteklo_ajax_get_standard_dimensions' ); +add_action( 'wp_ajax_nopriv_orgsteklo_get_standard_dimensions', 'orgsteklo_ajax_get_standard_dimensions' ); + +function orgsteklo_ajax_get_standard_dimensions() { + check_ajax_referer( 'orgsteklo_calc_nonce', 'nonce' ); + + $product_id = intval( $_POST['product_id'] ?? 0 ); + $thickness = floatval( $_POST['thickness'] ?? 0 ); + + if ( ! $product_id || ! $thickness ) { + wp_send_json_error( [ 'message' => 'Не указаны обязательные параметры' ] ); + } + + /** Получаем стандартные размеры из таблицы (как раньше!) */ + $table_data = orgsteklo_get_product_table_data( $product_id ); + if ( ! $table_data ) { + wp_send_json_error( [ 'message' => 'Для товара не выбрана таблица расчета цен' ] ); + } + + $row = orgsteklo_get_table_row_by_thickness( $table_data, $thickness ); + if ( ! $row ) { + wp_send_json_error( [ 'message' => 'В таблице нет данных для толщины ' . $thickness . ' мм' ] ); + } + + wp_send_json_success( [ + 'width' => floatval( $row['width'] ), + 'length' => floatval( $row['length'] ), + ] ); +} + +/** + * Подключение скриптов калькулятора на странице товара + */ +add_action( 'wp_enqueue_scripts', 'orgsteklo_enqueue_calculator_scripts' ); +function orgsteklo_enqueue_calculator_scripts() { + // Только на странице товара + if ( ! is_product() ) { + return; + } + + global $post; + $product_id = $post->ID; + + // Проверяем что у товара выбрана таблица + $table_number = get_post_meta( $product_id, '_orgsteklo_price_table', true ); + if ( empty( $table_number ) ) { + return; + } + + // Подключаем скрипт + wp_enqueue_script( + 'orgsteklo-price-calculator', + get_template_directory_uri() . '/assets/js/price-calculator.js', + [ 'jquery' ], + '1.0.1', + true + ); + + // Передаем данные в JS + wp_localize_script( + 'orgsteklo-price-calculator', + 'orgstekloCalc', + [ + 'productId' => $product_id, + 'ajaxUrl' => admin_url( 'admin-ajax.php' ), + 'nonce' => wp_create_nonce( 'orgsteklo_calc_nonce' ), + ] + ); +} + +/** + * Подключение шаблона калькулятора для товаров с выбранной таблицей + */ +add_filter( 'woocommerce_locate_template', 'orgsteklo_use_calculator_template', 10, 3 ); +function orgsteklo_use_calculator_template( $template, $template_name, $template_path ) { + // Проверяем что это шаблон вариативного или простого товара + if ( $template_name !== 'single-product/add-to-cart/variable.php' && $template_name !== 'single-product/add-to-cart/simple.php' ) { + return $template; + } + + // Проверяем что мы на странице товара + if ( ! is_product() ) { + return $template; + } + + global $post; + if ( ! $post ) { + return $template; + } + + // Проверяем что у товара выбрана таблица калькулятора + $table_number = get_post_meta( $post->ID, '_orgsteklo_price_table', true ); + if ( empty( $table_number ) ) { + return $template; + } + + // Используем наш шаблон калькулятора + $calculator_template = get_template_directory() . '/woocommerce/single-product/add-to-cart/orgsteklo-calculator.php'; + + if ( file_exists( $calculator_template ) ) { + return $calculator_template; + } + + return $template; +} + +/** + * Отключаем проверку атрибутов для универсальных вариаций калькулятора + */ +add_filter( 'woocommerce_add_to_cart_validation', 'orgsteklo_skip_variation_validation', 10, 3 ); +function orgsteklo_skip_variation_validation( $passed, $product_id, $quantity ) { + // Если это товар с калькулятором - пропускаем валидацию атрибутов + $table_number = get_post_meta( $product_id, '_orgsteklo_price_table', true ); + + if ( ! empty( $table_number ) ) { + // Очищаем ошибки связанные с атрибутами + wc_clear_notices(); + return true; + } + + return $passed; +} + +/** + * Создаем вариации из таблицы калькулятора + */ +function orgsteklo_create_variations_from_table( $product_id ) { + // Проверяем что товар использует калькулятор + $table_number = get_post_meta( $product_id, '_orgsteklo_price_table', true ); + if ( empty( $table_number ) ) { + return array( 'success' => false, 'message' => 'Таблица не выбрана' ); + } + + // Получаем данные таблицы + $table_data = orgsteklo_get_product_table_data( $product_id ); + if ( ! $table_data || empty( $table_data['rows'] ) ) { + return array( 'success' => false, 'message' => 'Нет данных в таблице' ); + } + + // Убеждаемся что товар вариативный + wp_set_object_terms( $product_id, 'variable', 'product_type' ); + + // Получаем родительский товар + $product = wc_get_product( $product_id ); + + // Собираем все значения толщин как строки + $thickness_values = array(); + foreach ( $table_data['rows'] as $row ) { + if ( ! empty( $row['thickness'] ) ) { + $thickness_values[] = floatval( $row['thickness'] ) . ' мм'; + } + } + + // Создаем атрибут на уровне товара (кастомный, не глобальный) + $attribute = new WC_Product_Attribute(); + $attribute->set_id( 0 ); + $attribute->set_name( 'Толщина листа' ); // Имя без pa_ + $attribute->set_options( $thickness_values ); // Массив строк + $attribute->set_position( 0 ); + $attribute->set_visible( true ); + $attribute->set_variation( true ); + $product->set_attributes( array( $attribute ) ); + $product->save(); + + // Создаем вариации + $count = 0; + foreach ( $table_data['rows'] as $row ) { + if ( empty( $row['thickness'] ) ) continue; + + $thickness = floatval( $row['thickness'] ); + $thickness_string = $thickness . ' мм'; + + // Создаем вариацию + $variation = new WC_Product_Variation(); + $variation->set_parent_id( $product_id ); + $variation->set_status( 'publish' ); + $variation->set_virtual( true ); + $variation->set_manage_stock( false ); + $variation->set_stock_status( 'instock' ); + // Устанавливаем минимальную цену 1 ₽ и вес 0.001 кг чтобы WooCommerce не ругался + // Реальная цена и вес будут установлены через хуки + $variation->set_regular_price( 1 ); + $variation->set_weight( 0.001 ); + + // Устанавливаем атрибут - slug атрибута и значение + $variation->set_attributes( array( + sanitize_title( 'Толщина листа' ) => $thickness_string + ) ); + + $variation_id = $variation->save(); + + if ( $variation_id ) { + // Сохраняем ТОЛЬКО толщину для поиска вариации (вариация = заглушка для WooCommerce) + // Все расчеты делаются из таблицы, НЕ из вариации! + update_post_meta( $variation_id, '_orgsteklo_thickness', $thickness ); + + $count++; + } + } + + return array( 'success' => true, 'message' => 'Создано вариаций: ' . $count, 'count' => $count ); +} + + +/** + * Сохраняем данные калькулятора в корзине через cart_item_data + * Теперь данные передаются через 6-й параметр add_to_cart() + */ +add_filter( 'woocommerce_add_cart_item_data', 'orgsteklo_add_calculator_to_cart', 10, 3 ); +function orgsteklo_add_calculator_to_cart( $cart_item_data, $product_id, $variation_id ) { + // Данные уже переданы через параметр cart_item_data в add_to_cart() + // Просто возвращаем их как есть + return $cart_item_data; +} + +/** + * Устанавливаем цену и вес СРАЗУ при добавлении в корзину + */ +add_filter( 'woocommerce_add_cart_item', 'orgsteklo_set_price_on_add', 10, 2 ); +function orgsteklo_set_price_on_add( $cart_item, $cart_item_key ) { + if ( isset( $cart_item['orgsteklo_calculator'] ) && isset( $cart_item['data'] ) ) { + $calc = $cart_item['orgsteklo_calculator']; + + // Округляем до целых для гарантии отсутствия копеек + $price = isset( $calc['price_per_unit'] ) ? round(floatval( $calc['price_per_unit'] )) : 0; + $price_old = isset( $calc['price_per_unit_old'] ) ? round(floatval( $calc['price_per_unit_old'] )) : 0; + $weight = isset( $calc['weight_per_unit'] ) ? floatval( $calc['weight_per_unit'] ) : 0; + + if ( $price > 0 ) { + $variation_id = $cart_item['data']->get_id(); + if ( $variation_id ) { + // Если есть старая цена (скидка), устанавливаем: + // regular_price = старая цена (зачеркнутая) + // sale_price = новая цена (финальная) + if ( $price_old > 0 && $price_old > $price ) { + update_post_meta( $variation_id, '_regular_price', $price_old ); + update_post_meta( $variation_id, '_sale_price', $price ); + update_post_meta( $variation_id, '_price', $price ); + + $cart_item['data']->set_regular_price( $price_old ); + $cart_item['data']->set_sale_price( $price ); + } else { + // Нет скидки - обе цены одинаковые + update_post_meta( $variation_id, '_regular_price', $price ); + update_post_meta( $variation_id, '_sale_price', $price ); + update_post_meta( $variation_id, '_price', $price ); + + $cart_item['data']->set_regular_price( $price ); + $cart_item['data']->set_sale_price( $price ); + } + } + + // Устанавливаем финальную цену + $cart_item['data']->set_price( $price ); + } + + if ( $weight > 0 ) { + $cart_item['data']->set_weight( $weight ); + } + } + + return $cart_item; +} + +/** + * Восстановление данных калькулятора из сессии + */ +add_filter( 'woocommerce_get_cart_item_from_session', 'orgsteklo_get_cart_item_from_session', 10, 3 ); +function orgsteklo_get_cart_item_from_session( $cart_item, $values, $key ) { + if ( isset( $values['orgsteklo_calculator'] ) ) { + $cart_item['orgsteklo_calculator'] = $values['orgsteklo_calculator']; + } + return $cart_item; +} + +/** + * Устанавливаем цену и вес для вариаций с калькулятором при пересчете корзины + */ +add_action( 'woocommerce_before_calculate_totals', 'orgsteklo_set_cart_item_price', 10, 1 ); +function orgsteklo_set_cart_item_price( $cart ) { + if ( is_admin() && ! defined( 'DOING_AJAX' ) ) { + return; + } + + foreach ( $cart->get_cart() as $cart_item_key => $cart_item ) { + if ( isset( $cart_item['orgsteklo_calculator'] ) && isset( $cart_item['data'] ) ) { + $calc = $cart_item['orgsteklo_calculator']; + + // Округляем до целых для гарантии отсутствия копеек + $price = isset( $calc['price_per_unit'] ) ? round(floatval( $calc['price_per_unit'] )) : 0; + $price_old = isset( $calc['price_per_unit_old'] ) ? round(floatval( $calc['price_per_unit_old'] )) : 0; + $weight = isset( $calc['weight_per_unit'] ) ? floatval( $calc['weight_per_unit'] ) : 0; + + if ( $price > 0 ) { + $variation_id = $cart_item['data']->get_id(); + if ( $variation_id ) { + // Если есть старая цена (скидка), устанавливаем: + // regular_price = старая цена (зачеркнутая) + // sale_price = новая цена (финальная) + if ( $price_old > 0 && $price_old > $price ) { + update_post_meta( $variation_id, '_regular_price', $price_old ); + update_post_meta( $variation_id, '_sale_price', $price ); + update_post_meta( $variation_id, '_price', $price ); + + $cart_item['data']->set_regular_price( $price_old ); + $cart_item['data']->set_sale_price( $price ); + } else { + // Нет скидки - обе цены одинаковые + update_post_meta( $variation_id, '_regular_price', $price ); + update_post_meta( $variation_id, '_sale_price', $price ); + update_post_meta( $variation_id, '_price', $price ); + + $cart_item['data']->set_regular_price( $price ); + $cart_item['data']->set_sale_price( $price ); + } + } + + // Устанавливаем финальную цену + $cart_item['data']->set_price( $price ); + } + + if ( $weight > 0 ) { + $cart_item['data']->set_weight( $weight ); + } + } + } +} + +/** + * Отображение данных калькулятора в корзине + */ +add_filter( 'woocommerce_get_item_data', 'orgsteklo_display_cart_item_data', 10, 2 ); +function orgsteklo_display_cart_item_data( $item_data, $cart_item ) { + if ( ! isset( $cart_item['orgsteklo_calculator'] ) ) { + return $item_data; + } + + $calc = $cart_item['orgsteklo_calculator']; + + if ( isset( $calc['thickness'] ) ) { + $item_data[] = [ + 'name' => 'Толщина', + 'value' => $calc['thickness'] . ' мм', + ]; + } + + if ( isset( $calc['width'] ) && isset( $calc['length'] ) ) { + $item_data[] = [ + 'key' => 'Ширина', + 'name' => 'Ширина', + 'value' => $calc['width'] . ' мм', + 'display' => $calc['width'] . ' мм', + ]; + $item_data[] = [ + 'key' => 'Длина', + 'name' => 'Длина', + 'value' => $calc['length'] . ' мм', + 'display' => $calc['length'] . ' мм', + ]; + } + + if ( isset( $calc['weight_per_unit'] ) ) { + $item_data[] = [ + 'name' => 'Вес 1 листа', + 'value' => number_format( (float)$calc['weight_per_unit'], 3, '.', ' ' ) . ' кг', + ]; + } + + if ( isset( $calc['is_standard_size'] ) && ! $calc['is_standard_size'] ) { + $item_data[] = [ + 'name' => 'Тип размера', + 'value' => 'Нестандартный', + ]; + } + + return $item_data; +} + +/** + * Вариации больше не нужны - товары стали simple + */ + +/** + * AJAX handler для добавления товара с калькулятором в корзину + * Использует стандартный add_to_cart() с реальной вариацией + */ +add_action( 'wp_ajax_add_orgsteklo_to_cart', 'orgsteklo_ajax_add_to_cart' ); +add_action( 'wp_ajax_nopriv_add_orgsteklo_to_cart', 'orgsteklo_ajax_add_to_cart' ); + +function orgsteklo_ajax_add_to_cart() { + try { + $product_id = isset( $_POST['product_id'] ) ? absint( $_POST['product_id'] ) : 0; + $quantity = isset( $_POST['quantity'] ) ? absint( $_POST['quantity'] ) : 1; + $thickness = isset( $_POST['orgsteklo_thickness'] ) ? floatval( $_POST['orgsteklo_thickness'] ) : 0; + $width = isset( $_POST['orgsteklo_width'] ) ? floatval( $_POST['orgsteklo_width'] ) : 0; + $length = isset( $_POST['orgsteklo_length'] ) ? floatval( $_POST['orgsteklo_length'] ) : 0; + + if ( ! $product_id || ! $thickness || ! $width || ! $length ) { + throw new Exception( 'Не указаны обязательные параметры' ); + } + + // Получаем продукт + $product = wc_get_product( $product_id ); + if ( ! $product ) { + throw new Exception( 'Товар не найден' ); + } + + // Находим вариацию по толщине через наше поле + $variations = get_posts( array( + 'post_type' => 'product_variation', + 'post_parent' => $product_id, + 'numberposts' => -1, + 'fields' => 'ids' + ) ); + + $variation_id = 0; + foreach ( $variations as $var_id ) { + $var_thickness = get_post_meta( $var_id, '_orgsteklo_thickness', true ); + if ( abs( floatval( $var_thickness ) - $thickness ) < 0.01 ) { + $variation_id = $var_id; + break; + } + } + + if ( ! $variation_id ) { + throw new Exception( 'Не найдена вариация для толщины ' . $thickness . ' мм. Пересохраните товар в админке.' ); + } + + // Получаем атрибуты вариации + $variation_obj = wc_get_product( $variation_id ); + $variation_attributes = $variation_obj ? $variation_obj->get_variation_attributes() : array(); + + // Рассчитываем цену из таблицы (НЕ из вариации!) + $calc_result = orgsteklo_calculate_price( $product_id, $thickness, $width, $length, 1 ); + if ( is_wp_error( $calc_result ) ) { + throw new Exception( $calc_result->get_error_message() ); + } + + // Применяем скидку + $discount_percent = orgsteklo_get_discount_percent_from_tags( $product_id ); + $price_current_sheet = $calc_result['price_current_sheet']; + $price_current_sheet_old = 0; // Старая цена (до скидки) + + if ( $discount_percent > 0 ) { + $price_current_sheet_old = $price_current_sheet; // Сохраняем старую цену + $coef = (100 - $discount_percent) / 100; + $price_current_sheet = round( $price_current_sheet * $coef ); + } + + $is_standard_size = $calc_result['is_standard_size']; + $weight_current_sheet = $calc_result['weight_current_sheet']; + + // Данные калькулятора для сохранения + // Явно округляем цены до целых, чтобы избежать расхождений в копейках + $calc_data = array( + 'thickness' => $thickness, + 'width' => $width, + 'length' => $length, + 'price_per_unit' => round($price_current_sheet), + 'price_per_unit_old' => $price_current_sheet_old ? round($price_current_sheet_old) : null, + 'weight_per_unit' => $weight_current_sheet, + 'is_standard_size'=> $is_standard_size, + ); + + // Добавляем в корзину через стандартный метод с найденной вариацией + $cart_item_key = WC()->cart->add_to_cart( + $product_id, + $quantity, + $variation_id, + $variation_attributes, + array( 'orgsteklo_calculator' => $calc_data ) + ); + + if ( ! $cart_item_key ) { + // Получаем ошибки WooCommerce + $notices = wc_get_notices( 'error' ); + $error_message = 'Не удалось добавить товар в корзину (variation_id: ' . $variation_id . ')'; + if ( ! empty( $notices ) ) { + $errors = array(); + foreach ( $notices as $notice ) { + $errors[] = is_array( $notice ) && isset( $notice['notice'] ) ? $notice['notice'] : $notice; + } + $error_message .= ': ' . implode( ', ', $errors ); + } + wc_clear_notices(); + throw new Exception( $error_message ); + } + + wp_send_json( array( + 'success' => true, + 'message' => 'Товар успешно добавлен в корзину', + 'cart_item_count' => WC()->cart->get_cart_contents_count(), + 'fragments' => apply_filters( 'woocommerce_add_to_cart_fragments', array() ), + 'cart_hash' => WC()->cart->get_cart_hash() + ) ); + + } catch ( Exception $e ) { + wp_send_json_error( $e->getMessage() ); + } +} + +/** + * Сохранение данных калькулятора в заказе + */ +add_action( 'woocommerce_checkout_create_order_line_item', 'orgsteklo_add_calculator_to_order', 10, 4 ); +function orgsteklo_add_calculator_to_order( $item, $cart_item_key, $values, $order ) { + if ( ! isset( $values['orgsteklo_calculator'] ) ) { + return; + } + + $calc = $values['orgsteklo_calculator']; + + if ( isset( $calc['thickness'] ) ) { + $item->add_meta_data( 'Толщина', $calc['thickness'] . ' мм' ); + } + + if ( isset( $calc['width'] ) && isset( $calc['length'] ) ) { + $item->add_meta_data( 'Размер', $calc['width'] . ' × ' . $calc['length'] . ' мм' ); + } + + if ( isset( $calc['weight_per_unit'] ) ) { + $item->add_meta_data( 'Вес 1 листа', number_format( $calc['weight_per_unit'], 3, '.', '' ) . ' кг' ); + } + + if ( isset( $calc['is_standard_size'] ) && ! $calc['is_standard_size'] ) { + $item->add_meta_data( 'Тип', 'Нестандартный размер' ); + } +} diff --git a/wp-content/themes/orgsteklo/index.php b/wp-content/themes/orgsteklo/index.php new file mode 100644 index 0000000..a6ec30e --- /dev/null +++ b/wp-content/themes/orgsteklo/index.php @@ -0,0 +1,19 @@ + +
    + +
    +
    +

    +
    + +
    +
    +
    +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/style.css b/wp-content/themes/orgsteklo/style.css new file mode 100644 index 0000000..e69de29 diff --git a/wp-content/themes/orgsteklo/templates/template-about.php b/wp-content/themes/orgsteklo/templates/template-about.php new file mode 100644 index 0000000..0e33d39 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-about.php @@ -0,0 +1,232 @@ + + +
    + + +
    +
    + ' . $aboutus_title . ''; + } + ?> +
    +
    + ' . $aboutus_subtitle . ''; + } + if($aboutus_description) { + echo '

    ' . $aboutus_description . '

    '; + } + if($aboutus_link) { + echo '

    ' . $aboutus_button . '

    '; + } + ?> +
    + '; + } + ?> +
    +
    +
    + + + +
    +
    + ' . $partners_title . ''; + } + if($partners_repeats) { + echo '
    '; + foreach ($partners_repeats as $partners_repeat) { + $partners_repeat_title = $partners_repeat['partners_repeat_title']; + $partners_repeat_link = $partners_repeat['partners_repeat_link']; + $partners_repeat_img = $partners_repeat['partners_repeat_img']; + echo '
    '; + echo '
    '; + if($partners_repeat_title) { + echo '

    ' . $partners_repeat_title . '

    '; + } + if($partners_repeat_link) { + echo ''; + if($partners_repeat_img) { + echo '' . esc_attr($partners_repeat_img['alt']) . ''; + } + echo ''; + } + echo '
    '; + echo '
    '; + } + echo '
    '; + } + ?> +
    +
    + + +
    +
    + ' . $history_title . ''; + } + if($history_repeats) { + echo '
    '; + foreach ($history_repeats as $history_repeat) { + $history_repeat_img = $history_repeat['history_repeat_img']; + $history_repeat_title = $history_repeat['history_repeat_title']; + $history_repeat_subtitle = $history_repeat['history_repeat_subtitle']; + $history_repeat_description = $history_repeat['history_repeat_description']; + echo '
    '; + echo '
    '; + if($history_repeat_img) { + echo '' . esc_attr($history_repeat_img['alt']) . ''; + } + echo '
    '; + if($history_repeat_title) { + echo '

    ' . $history_repeat_title . '

    '; + } + if($history_repeat_subtitle) { + echo '

    ' . $history_repeat_subtitle . '

    '; + } + if($history_repeat_description) { + echo '

    ' . $history_repeat_description . '

    '; + } + echo '
    '; + echo '
    '; + echo '
    '; + } + echo '
    '; + } + ?> +
    +
    + + +
    +
    + ' . $projects_title . ''; + } + if ($projects_repeats) { + $total_projects = count($projects_repeats); + echo '
    '; + $index = 0; + foreach ($projects_repeats as $projects_repeat) { + $projects_repeat_img = $projects_repeat['projects_repeat_img']; + $projects_repeat_tags = $projects_repeat['projects_repeat_tag']; + $projects_repeat_title = $projects_repeat['projects_repeat_title']; + $projects_repeat_description = $projects_repeat['projects_repeat_description']; + $extra_class = ($index >= 6) ? ' hidden' : ''; + echo '
    '; + if ($projects_repeat_img) { + echo '' . esc_attr($projects_repeat_img['alt']) . ''; + } + echo '
    '; + if ($projects_repeat_tags) { + echo '
    '; + foreach ($projects_repeat_tags as $projects_repeat_tag) { + $projects_repeat_tag_p = $projects_repeat_tag['projects_repeat_tag_p']; + echo '

    ' . $projects_repeat_tag_p . '

    '; + } + echo '
    '; + } + if ($projects_repeat_title) { + echo '

    ' . $projects_repeat_title . '

    '; + } + if ($projects_repeat_description) { + echo '

    ' . $projects_repeat_description . '

    '; + } + echo '
    '; + echo '
    '; + $index++; + } + echo '
    '; + if ($total_projects >= 6) { + echo ''; + } + echo '
    '; + } + if($projects_repeats) { + echo '
    '; + foreach ($projects_repeats as $projects_repeat) { + $projects_repeat_img = $projects_repeat['projects_repeat_img']; + $projects_repeat_tags = $projects_repeat['projects_repeat_tag']; + $projects_repeat_title = $projects_repeat['projects_repeat_title']; + $projects_repeat_description = $projects_repeat['projects_repeat_description']; + echo '
    '; + echo '
    '; + if($projects_repeat_img) { + echo '' . esc_attr($projects_repeat_img['alt']) . ''; + } + echo '
    '; + if($projects_repeat_tags) { + echo '
    '; + foreach ($projects_repeat_tags as $projects_repeat_tag) { + $projects_repeat_tag_p = $projects_repeat_tag['projects_repeat_tag_p']; + echo '

    ' . $projects_repeat_tag_p . '

    '; + } + echo '
    '; + } + if($projects_repeat_title) { + echo '

    ' . $projects_repeat_title . '

    '; + } + if($projects_repeat_description) { + echo '

    ' . $projects_repeat_description . '

    '; + } + echo '
    '; + echo '
    '; + echo '
    '; + } + echo '
    '; + } + ?> +
    +
    + + + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-account.php b/wp-content/themes/orgsteklo/templates/template-account.php new file mode 100644 index 0000000..c321c87 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-account.php @@ -0,0 +1,8 @@ + + +
    + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-cart.php b/wp-content/themes/orgsteklo/templates/template-cart.php new file mode 100644 index 0000000..bb6e3ad --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-cart.php @@ -0,0 +1,126 @@ + + +
    + + + cart && ! WC()->cart->is_empty() ) { + foreach ( WC()->cart->get_cart() as $item ) { + $cart_product_ids[] = $item['product_id']; + $terms = wp_get_post_terms( $item['product_id'], 'product_cat', array( 'fields' => 'ids' ) ); + $cart_categories = array_merge( $cart_categories, $terms ); + } + $cart_categories = array_unique( $cart_categories ); + } + + $rec_args = array( + 'post_type' => 'product', + 'posts_per_page' => 8, + 'post__not_in' => $cart_product_ids, + 'ignore_sticky_posts' => 1, + 'post_status' => array( 'publish', 'draft' ), + 'orderby' => 'rand', + 'meta_query' => array( + array( + 'key' => '_is_recommended_product', + 'value' => 'yes', + ), + ), + ); + if ( ! empty( $cart_categories ) ) { + $rec_args['tax_query'] = array( + array( + 'taxonomy' => 'product_cat', + 'field' => 'term_id', + 'terms' => $cart_categories, + 'operator' => 'IN', + ), + ); + } + $rec_query = new WP_Query( $rec_args ); + $rec_ids = wp_list_pluck( $rec_query->posts, 'ID' ); + + $remaining = 8 - count( $rec_ids ); + $random_products = array(); + if ( $remaining > 0 ) { + $exclude = array_merge( $cart_product_ids, $rec_ids ); + $rand_args = array( + 'post_type' => 'product', + 'posts_per_page' => $remaining, + 'post__not_in' => $exclude, + 'ignore_sticky_posts' => 1, + 'post_status' => array( 'publish', 'draft' ), + 'orderby' => 'rand', + ); + if ( ! empty( $cart_categories ) ) { + $rand_args['tax_query'] = array( + array( + 'taxonomy' => 'product_cat', + 'field' => 'term_id', + 'terms' => $cart_categories, + 'operator' => 'IN', + ), + ); + } + $rand_query = new WP_Query( $rand_args ); + $random_products = $rand_query->posts; + } + + $all_products = array_merge( $rec_query->posts, $random_products ); + + if ( ! empty( $all_products ) ) : + global $post; + ?> +
    +
    +
    +

    Рекомендуемые товары

    + + Все товары + + +
    +
    +
    +
    + +
    + +
    + +
    +
    + + +
    + +
    +
    + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-checkout.php b/wp-content/themes/orgsteklo/templates/template-checkout.php new file mode 100644 index 0000000..7d45882 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-checkout.php @@ -0,0 +1,15 @@ + + +
    + + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-contacts.php b/wp-content/themes/orgsteklo/templates/template-contacts.php new file mode 100644 index 0000000..98be8af --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-contacts.php @@ -0,0 +1,112 @@ + + +
    + + +
    +
    +

    +
    +
    +
    + '; + echo '

    Телефон:

    '; + echo '
    '; + echo ''; + echo '
    '; + echo '' . $phone . ''; + echo '
    '; + echo '
    '; + echo '
    '; + } + if($email) { + echo '
    '; + echo '

    Почта:

    '; + echo '
    '; + echo ''; + echo '
    '; + echo '' . $email . ''; + echo '
    '; + echo '
    '; + echo '
    '; + } + if($contacts_time) { + echo '
    '; + echo '

    Часы работы:

    '; + echo '
    '; + echo ''; + echo '
    '; + if($contacts_time) { + echo '
    ' . $contacts_time . '
    '; + } + if($contacts_time2) { + echo '

    ' . $contacts_time2 . '

    '; + } + echo '
    '; + echo '
    '; + echo '
    '; + } + ?> +
    + '; + foreach ($contacts_repeats as $contacts_repeat) { + $contacts_repeat_title = $contacts_repeat['contacts_repeat_title']; + $contacts_repeat_address = $contacts_repeat['contacts_repeat_address']; + $contacts_repeat_description = $contacts_repeat['contacts_repeat_description']; + $contacts_repeat_link = $contacts_repeat['contacts_repeat_link']; + echo '
    '; + if($contacts_repeat_title) { + echo '

    ' . $contacts_repeat_title . '

    '; + } + echo '
    '; + echo ''; + echo '
    '; + if($contacts_repeat_address) { + echo '
    '; + echo '

    ' . $contacts_repeat_address . '

    '; + echo '
    '; + } + if($contacts_repeat_description) { + echo '

    ' . $contacts_repeat_description . '

    '; + } + if($contacts_repeat_link) { + echo 'Показать на карте'; + } + echo '
    '; + echo '
    '; + echo '
    '; + } + echo '
    '; + } + ?> +
    + ' . $contacts_map . '
    '; + } + ?> +
    +
    + + + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-delivery.php b/wp-content/themes/orgsteklo/templates/template-delivery.php new file mode 100644 index 0000000..e53b754 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-delivery.php @@ -0,0 +1,23 @@ + + +
    + +
    +
    +

    +
    + +
    +
    +
    + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-docs.php b/wp-content/themes/orgsteklo/templates/template-docs.php new file mode 100644 index 0000000..8c54008 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-docs.php @@ -0,0 +1,121 @@ + + +
    + + +
    +
    + ' . $documentation_title . ''; + } + ?> + +
    +
    + ' . $documentation_repeat_title . ''; + $first_tab = false; + } + ?> +
    +
    + + +
    +

    ' . $documentation_repeat_title . '

    '; + $first_tab2 = false; + } + ?> +
    +
    + '; + echo '

    ' . $documentation_repeat_title . '

    '; + echo '
    '; + echo '
    '; + $count = count($documentation_repeat_repeats); + foreach ($documentation_repeat_repeats as $index => $documentation_repeat_repeat) { + $documentation_repeat_repeat_title = $documentation_repeat_repeat['documentation_repeat_repeat_title']; + $documentation_repeat_repeat_format = $documentation_repeat_repeat['documentation_repeat_repeat_format']; + $documentation_repeat_repeat_razmer = $documentation_repeat_repeat['documentation_repeat_repeat_razmer']; + $documentation_repeat_repeat_file = $documentation_repeat_repeat['documentation_repeat_repeat_file']; + $documentation_repeat_repeat_file_url = $documentation_repeat_repeat_file ? esc_url($documentation_repeat_repeat_file['url']) : ''; + $item_class = ($index < 18) ? 'documentation-item' : 'documentation-item hidden'; + echo '
    '; + echo '' . $documentation_repeat_repeat_title . ''; + echo '
    '; + echo '
    '; + if($documentation_repeat_repeat_format) { + echo '

    ' . $documentation_repeat_repeat_format . '

    '; + } + if($documentation_repeat_repeat_razmer) { + echo '

    ' . $documentation_repeat_repeat_razmer . '

    '; + } + echo '
    '; + echo ''; // оставить SVG как есть + echo '
    '; + echo '
    '; + echo '' . $documentation_repeat_repeat_title . ''; + echo '
    '; + if($documentation_repeat_repeat_format) { + echo '

    ' . $documentation_repeat_repeat_format . '

    '; + } + if($documentation_repeat_repeat_razmer) { + echo '

    ' . $documentation_repeat_repeat_razmer . '

    '; + } + echo '
    '; + echo '
    '; + echo '
    '; + } + echo '
    '; + if ($count > 18) { + echo ''; + } + echo '
    '; + echo '
    '; + $first_tab3 = false; + } + ?> +
    + +
    + + + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-home.php b/wp-content/themes/orgsteklo/templates/template-home.php new file mode 100644 index 0000000..4d9f792 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-home.php @@ -0,0 +1,248 @@ + + +
    + + + + +
    +
    + ' . $home_production_title . ''; + } + ?> +
    +
    + 'product_cat', + 'parent' => 0, + 'hide_empty' => false, + ]); + if (!empty($categories) && !is_wp_error($categories)) { + $count = 0; + foreach ($categories as $category) { + if ($category->name === 'Misc') { + continue; + } + $count++; + $is_hidden = $count > 6 ? ' hidden' : ''; + $thumb_id = get_term_meta($category->term_id, 'thumbnail_id', true); + $thumb_url = $thumb_id ? wp_get_attachment_image_url($thumb_id, 'full') : '/wp-content/uploads/woocommerce-placeholder.png'; + $term_link = get_term_link($category); + ?> + + +
    + 6): ?> + + +
    +
    +
    + + +
    +
    + ' . $home_popular_title . ''; + } + ?> +
    +
    +
    + 'product', + 'posts_per_page' => 4, + 'orderby' => 'rand', + 'post_status' => array( 'publish', 'draft' ), + 'ignore_sticky_posts' => 1, + 'tax_query' => array( + array( + 'taxonomy' => 'product_tag', + 'field' => 'slug', + 'terms' => 'popular', + ), + ), + ); + $random_products = new WP_Query( $args ); + if ( $random_products->have_posts() ) : + while ( $random_products->have_posts() ) : $random_products->the_post(); + echo '
    '; + wc_get_template_part( 'content', 'product' ); + echo '
    '; + endwhile; + wp_reset_postdata(); + endif; + ?> +
    +
    + + +
    +
    + 'product', + 'posts_per_page' => 4, + 'orderby' => 'rand', + 'post_status' => array( 'publish', 'draft' ), + 'ignore_sticky_posts' => 1, + 'tax_query' => array( + array( + 'taxonomy' => 'product_tag', + 'field' => 'slug', + 'terms' => 'popular', + ), + ), + ); + $random_products = new WP_Query( $args ); + if ( $random_products->have_posts() ) : + while ( $random_products->have_posts() ) : $random_products->the_post(); + wc_get_template_part( 'content', 'product' ); + endwhile; + wp_reset_postdata(); + endif; + ?> +
    +
    +
    + + +
    +
    + '; + } + ?> +
    + ' . $home_about_title . ''; + } + if($home_about_subtitle) { + echo '

    ' . $home_about_subtitle . '

    '; + } + if($home_about_description) { + echo '

    ' . $home_about_description . '

    '; + } + if($home_about_link) { + echo 'Подробнее о нас'; + } + ?> +
    +
    +
    + + + + +
    + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-login.php b/wp-content/themes/orgsteklo/templates/template-login.php new file mode 100644 index 0000000..0d28367 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-login.php @@ -0,0 +1,57 @@ + + +
    + + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-payment.php b/wp-content/themes/orgsteklo/templates/template-payment.php new file mode 100644 index 0000000..becce74 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-payment.php @@ -0,0 +1,23 @@ + + +
    + +
    +
    +

    +
    + +
    +
    +
    + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-recovery-2.php b/wp-content/themes/orgsteklo/templates/template-recovery-2.php new file mode 100644 index 0000000..5b3331d --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-recovery-2.php @@ -0,0 +1,27 @@ + + +
    + + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-recovery.php b/wp-content/themes/orgsteklo/templates/template-recovery.php new file mode 100644 index 0000000..dcf4bdc --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-recovery.php @@ -0,0 +1,38 @@ + + +
    + + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-refund.php b/wp-content/themes/orgsteklo/templates/template-refund.php new file mode 100644 index 0000000..ae9bb61 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-refund.php @@ -0,0 +1,23 @@ + + +
    + +
    +
    +

    +
    + +
    +
    +
    + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-registration-success.php b/wp-content/themes/orgsteklo/templates/template-registration-success.php new file mode 100644 index 0000000..426fc46 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-registration-success.php @@ -0,0 +1,25 @@ + + +
    + + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/templates/template-registration.php b/wp-content/themes/orgsteklo/templates/template-registration.php new file mode 100644 index 0000000..aebd9d4 --- /dev/null +++ b/wp-content/themes/orgsteklo/templates/template-registration.php @@ -0,0 +1,133 @@ + + +
    + + +
    + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/archive-product.php b/wp-content/themes/orgsteklo/woocommerce/archive-product.php new file mode 100644 index 0000000..6b311fb --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/archive-product.php @@ -0,0 +1,97 @@ + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/auth/form-grant-access.php b/wp-content/themes/orgsteklo/woocommerce/auth/form-grant-access.php new file mode 100644 index 0000000..65ede67 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/auth/form-grant-access.php @@ -0,0 +1,68 @@ + + + + +

    + +

    + + + +

    + ' . esc_html( $app_name ) . '', '' . esc_html( $scope ) . '' ); + ?> +

    + +
      + +
    • + +
    + +

    + ' . esc_html( wp_parse_url( $callback_url, PHP_URL_HOST ) ) . '' ); + ?> +

    + +
    + ID, 70 ); ?> +

    + display_name ) ); + ?> + +

    +
    + +

    + + +

    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/auth/form-login.php b/wp-content/themes/orgsteklo/woocommerce/auth/form-login.php new file mode 100644 index 0000000..16e06f3 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/auth/form-login.php @@ -0,0 +1,54 @@ + + +

    + +

    + + + +

    + cancel and return to %1$s', 'woocommerce' ), esc_html( wc_clean( $app_name ) ), esc_url( $return_url ) ) ); + ?> +

    + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/auth/header.php b/wp-content/themes/orgsteklo/woocommerce/auth/header.php new file mode 100644 index 0000000..c7c4cfe --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/auth/header.php @@ -0,0 +1,41 @@ + +> + + + + + <?php esc_html_e( 'Application authentication request', 'woocommerce' ); ?> + + + + +

    + 
+						<?php
+							esc_attr_e(
+								'WooCommerce',
+								'woocommerce'
+							);
+							?>
+

    +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/block-notices/error.php b/wp-content/themes/orgsteklo/woocommerce/block-notices/error.php new file mode 100644 index 0000000..364bb6b --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/block-notices/error.php @@ -0,0 +1,51 @@ + 1; + +?> + + + + + +
    role="status"> + +
    + +
    +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/block-notices/success.php b/wp-content/themes/orgsteklo/woocommerce/block-notices/success.php new file mode 100644 index 0000000..fc33c0d --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/block-notices/success.php @@ -0,0 +1,37 @@ + + + +
    role="alert"> + +
    + +
    +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/brands/brand-description.php b/wp-content/themes/orgsteklo/woocommerce/brands/brand-description.php new file mode 100644 index 0000000..a72a251 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/brands/brand-description.php @@ -0,0 +1,35 @@ + +
    + + + + Thumbnail + + + +
    + + + +
    + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/brands/shortcodes/brands-a-z.php b/wp-content/themes/orgsteklo/woocommerce/brands/shortcodes/brands-a-z.php new file mode 100644 index 0000000..ef2d904 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/brands/shortcodes/brands-a-z.php @@ -0,0 +1,63 @@ + +
    + + + + + +

    + +
      + %s', + esc_url( get_term_link( $brand->slug, 'product_brand' ) ), + esc_html( $brand->name ) + ); + } + ?> +
    + + + + + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/brands/shortcodes/single-brand.php b/wp-content/themes/orgsteklo/woocommerce/brands/shortcodes/single-brand.php new file mode 100644 index 0000000..556ae20 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/brands/shortcodes/single-brand.php @@ -0,0 +1,38 @@ + + + <?php echo esc_attr( $term->name ); ?> + diff --git a/wp-content/themes/orgsteklo/woocommerce/brands/taxonomy-product_brand.php b/wp-content/themes/orgsteklo/woocommerce/brands/taxonomy-product_brand.php new file mode 100644 index 0000000..56898bf --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/brands/taxonomy-product_brand.php @@ -0,0 +1,12 @@ + +
      + + $brand ) : + + /** + * Filter the brand's thumbnail size. + * + * @since 9.4.0 + * @param string $size Defaults to 'shop_catalog' + */ + $thumbnail = wc_get_brand_thumbnail_url( $brand->term_id, apply_filters( 'woocommerce_brand_thumbnail_size', 'shop_catalog' ) ); + + if ( ! $thumbnail ) { + $thumbnail = wc_placeholder_img_src(); + } + + $class = ''; + + if ( 0 === $index || 0 === $index % $columns ) { + $class = 'first'; + } elseif ( 0 === ( $index + 1 ) % $columns ) { + $class = 'last'; + } + + $width = floor( ( ( 100 - ( ( $columns - 1 ) * 2 ) ) / $columns ) * 100 ) / 100; + ?> +
    • + + <?php echo esc_attr( $brand->name ); ?> + +
      + description ) ) ); ?> +
      +
    • + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/brands/widgets/brand-thumbnails.php b/wp-content/themes/orgsteklo/woocommerce/brands/widgets/brand-thumbnails.php new file mode 100644 index 0000000..bbfdf43 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/brands/widgets/brand-thumbnails.php @@ -0,0 +1,45 @@ + +
      + + $brand ) : + $class = ''; + if ( 0 === $index || 0 === $index % $columns ) { + $class = 'first'; + } elseif ( 0 === ( $index + 1 ) % $columns ) { + $class = 'last'; + } + ?> + +
    • + + + +
    • + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/cart/cart-empty.php b/wp-content/themes/orgsteklo/woocommerce/cart/cart-empty.php new file mode 100644 index 0000000..58f9b96 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/cart/cart-empty.php @@ -0,0 +1,17 @@ + 0 ) : ?> +
    +
    +

    Корзина

    +
    +

    Ваша корзина пока пуста

    +

    Воспользуйтесь каталогом или поиском, чтобы добавить товары в корзину и оформить заказ. Если у вас были товары в корзине – войдите в аккаунт.

    + + Перейти в каталог + + +
    +
    +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/cart/cart-item-data.php b/wp-content/themes/orgsteklo/woocommerce/cart/cart-item-data.php new file mode 100644 index 0000000..46ace56 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/cart/cart-item-data.php @@ -0,0 +1,26 @@ + +
    + +
    :
    +
    + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/cart/cart-shipping.php b/wp-content/themes/orgsteklo/woocommerce/cart/cart-shipping.php new file mode 100644 index 0000000..6488c37 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/cart/cart-shipping.php @@ -0,0 +1,117 @@ +countries->get_formatted_address( $package['destination'], ', ' ); + $has_calculated_shipping = ! empty( $has_calculated_shipping ); + $show_shipping_calculator = ! empty( $show_shipping_calculator ); + $calculator_text = ''; +?> +
    +
    + 2 +

    Способ доставки

    +
    +
    + +
      + +
    • +
      + id ); + $method_title = $method->get_label(); + $method_name = sanitize_title( $method_title ); + $is_checked = checked( $method_id, $chosen_method, false ); + $input_type = ( count( $available_methods ) > 1 ) ? 'radio' : 'hidden'; + $cost = floatval( $method->cost ); + + // Общий префикс + $input = sprintf( + '', + $input_type, + $index, + $method_name, + $method_id, + $is_checked, + esc_attr( $cost ) + ); + + // Маппинг названий к ключам настроек + $label_keys = array( + 'Самовывоз' => 'samovyvoz_label', + 'Доставка по Москве' => 'moscow_label', + 'Доставка по Московской области' => 'moscow_area_label', + 'В другой регион' => 'region_label', + 'В другой регион Почтой России' => 'pochta_label', + ); + + echo $input; + + if ( isset( $label_keys[ $method_title ] ) ) { + $desc = orgsteklo_get_checkout_setting( $label_keys[ $method_title ] ); + // Подставляем {cost} → реальную стоимость из WooCommerce + $desc = str_replace( '{cost}', wc_price( $cost ), $desc ); + // Подставляем {km_rate} → стоимость за км от МКАД + $km_rate = orgsteklo_get_checkout_setting( 'moscow_area_km_rate' ); + $desc = str_replace( '{km_rate}', esc_html( $km_rate ), $desc ); + printf( + '', + $index, + $method_name, + esc_html( $method_title ), + wp_kses_post( $desc ) + ); + } else { + printf( + '', + $index, + $method_name, + esc_html( $method_title ) + ); + } + + do_action( 'woocommerce_after_shipping_rate', $method, $index ); + ?> +
      +
    • + +
    + +

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

    + + ' . esc_html( $formatted_destination ) . '' ), + $formatted_destination + ) + ); + $calculator_text = esc_html__( 'Enter a different address', 'woocommerce' ); + endif; + ?> + + ' . esc_html( $package_details ) . '

    '; ?> + + + + +
    +
    \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/cart/cart-totals.php b/wp-content/themes/orgsteklo/woocommerce/cart/cart-totals.php new file mode 100644 index 0000000..9cfd1ef --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/cart/cart-totals.php @@ -0,0 +1,112 @@ + +
    + + + +

    + + + + + + + + + cart->get_coupons() as $code => $coupon ) : ?> + + + + + + + cart->needs_shipping() && WC()->cart->show_shipping() ) : ?> + + + + + + + + cart->needs_shipping() && 'yes' === get_option( 'woocommerce_enable_shipping_calc' ) ) : ?> + + + + + + + + + cart->get_fees() as $fee ) : ?> + + + + + + + cart->display_prices_including_tax() ) { + $taxable_address = WC()->customer->get_taxable_address(); + $estimated_text = ''; + + if ( WC()->customer->is_customer_outside_base() && ! WC()->customer->has_calculated_shipping() ) { + /* translators: %s location. */ + $estimated_text = sprintf( ' ' . esc_html__( '(estimated for %s)', 'woocommerce' ) . '', WC()->countries->estimated_for_prefix( $taxable_address[0] ) . WC()->countries->countries[ $taxable_address[0] ] ); + } + + if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) { + foreach ( WC()->cart->get_tax_totals() as $code => $tax ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + ?> + + + + + + + + + + + + + + + + + + + + +
    name ); ?>
    label ) . $estimated_text; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>formatted_amount ); ?>
    countries->tax_or_vat() ) . $estimated_text; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    + +
    + +
    + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/cart/cart.php b/wp-content/themes/orgsteklo/woocommerce/cart/cart.php new file mode 100644 index 0000000..5637663 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/cart/cart.php @@ -0,0 +1,588 @@ + +
    +
    +

    Корзина

    +
    +
    +
    +
    + + +
    + +
    +
    + + +
    + + cart->get_cart() as $cart_item_key => $cart_item ) { + $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); + $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); + + // Получаем название товара без вариаций + $product_name = $_product->get_name(); + if ( $_product->is_type('variation') ) { + $parent_product = wc_get_product( $cart_item['product_id'] ); + if ( $parent_product ) { + $product_name = $parent_product->get_name(); + } + } + $product_name = apply_filters( 'woocommerce_cart_item_name', $product_name, $cart_item, $cart_item_key ); + if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) { + $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); + ?> + get_sku(); + $weight = $_product->get_weight(); + $qty = $cart_item['quantity']; + $price = $_product->get_price(); + $regular_price = $_product->get_regular_price(); + $sale_price = $_product->get_sale_price(); + $total_price = $price * $qty; + $total_regular_price = $regular_price * $qty; + $total_weight = $weight * $qty; + ?> +
    +
    + +
    + get_image(), $cart_item, $cart_item_key ); + if ( ! $product_permalink ) { + echo $thumbnail; + } + else { + printf( '%s', esc_url( $product_permalink ), $thumbnail ); // PHPCS: XSS ok. + } + ?> +
    +
    +
    +

    Код товара:

    +

    +
    + + '; + echo '

    Толщина: ' . esc_html( $calc['thickness'] ) . ' мм

    '; + echo '

    Ширина: ' . esc_html( $calc['width'] ) . ' мм

    '; + echo '

    Длина: ' . esc_html( $calc['length'] ) . ' мм

    '; + // Итоговая цена за 1 лист после Длины + echo '

    Итоговая цена за 1 лист: ' . wc_price($price) . ''; + if ($regular_price > $price) { + echo ' ' . wc_price($regular_price) . ''; + } + echo '

    '; + echo '
    '; + } elseif ( $_product->is_type('variation') ) { + $variation = wc_get_product( $cart_item['variation_id'] ); + if ( $variation ) { + // Проверяем ширину и длину для определения листового материала + $width_meta = get_post_meta( $cart_item['variation_id'], '_variation_width', true ); + if ( empty( $width_meta ) ) { + $width_meta = $variation->get_width(); + } + $length_meta = get_post_meta( $cart_item['variation_id'], '_variation_length', true ); + if ( empty( $length_meta ) ) { + $length_meta = $variation->get_length(); + } + + if ( $width_meta && $length_meta ) { + // Листовые материалы — отображение как у оргстекла + $attributes = $variation->get_variation_attributes(); + $thickness_value = ''; + foreach ( $attributes as $attr_key => $attr_value ) { + $attr_slug = str_replace( 'attribute_pa_', '', $attr_key ); + $attr_slug = str_replace( 'attribute_', '', $attr_slug ); + if ( stripos( $attr_slug, 'ves' ) !== false ) { + continue; + } + $taxonomy_name = str_replace( 'attribute_', '', $attr_key ); + $term = get_term_by( 'slug', $attr_value, $taxonomy_name ); + $thickness_value = $term ? $term->name : $attr_value; + break; + } + echo '
    '; + if ( $thickness_value ) { + $thickness_clean = preg_replace( '/\s*мм\s*$/u', '', $thickness_value ); + $thickness_clean = preg_replace( '/\s*mm\s*$/i', '', $thickness_clean ); + echo '

    Толщина: ' . esc_html( trim( $thickness_clean ) ) . ' мм

    '; + } + echo '

    Ширина: ' . esc_html( $width_meta ) . ' мм

    '; + echo '

    Длина: ' . esc_html( $length_meta ) . ' мм

    '; + echo '
    '; + } else { + // Для остальных вариативных товаров (трубы/стержни/клей) + $attributes = $variation->get_variation_attributes(); + $has_params = false; + $params_html = ''; + foreach ( $attributes as $attr_key => $attr_value ) { + $attr_slug = str_replace( 'attribute_pa_', '', $attr_key ); + $attr_slug = str_replace( 'attribute_', '', $attr_slug ); + if ( $attr_slug === 'ves' || $attr_slug === 'pa_ves' || stripos( $attr_slug, 'ves' ) !== false ) { + continue; + } + $taxonomy_name = str_replace( 'attribute_', '', $attr_key ); + $attr_name = ''; + $attr_slug_clean = str_replace( 'pa_', '', $taxonomy_name ); + $all_attr_taxonomies = wc_get_attribute_taxonomies(); + foreach ( $all_attr_taxonomies as $tax ) { + if ( $tax->attribute_name === $attr_slug_clean ) { + $attr_name = $tax->attribute_label; + break; + } + } + if ( empty( $attr_name ) ) { + $best_label = ''; + $best_dist = PHP_INT_MAX; + foreach ( $all_attr_taxonomies as $tax ) { + $dist = levenshtein( $attr_slug_clean, $tax->attribute_name ); + if ( $dist < $best_dist && $dist <= 3 ) { + $best_dist = $dist; + $best_label = $tax->attribute_label; + } + } + if ( ! empty( $best_label ) ) { + $attr_name = $best_label; + } + } + if ( empty( $attr_name ) ) { + $attr_name = wc_attribute_label( $taxonomy_name ); + } + $term = get_term_by( 'slug', $attr_value, $taxonomy_name ); + $attr_value_display = $term ? $term->name : $attr_value; + $attr_value_display = str_replace( array( ' mm', 'mm' ), ' мм', $attr_value_display ); + $params_html .= '

    ' . esc_html( $attr_name ) . ': ' . esc_html( $attr_value_display ) . '

    '; + $has_params = true; + } + $length_only = get_post_meta( $cart_item['variation_id'], '_variation_length', true ); + if ( empty( $length_only ) ) { + $length_only = $variation->get_length(); + } + if ( $length_only ) { + $params_html .= '

    Длина: ' . esc_html( $length_only ) . ' мм

    '; + $has_params = true; + } + if ( $has_params ) { + echo '
    ' . $params_html . '
    '; + } + } + } + } + // Для простых товаров (клей) - НЕ показываем вес здесь, он уже есть в cart-product__chars + ?> +
    + + + 0 ? $price / $weight : 0 ); + ?> +
    +

    Итоговая цена за 1 кг:

    +

    +
    +
    +

    Вес:

    +

    кг

    +
    + +
    +

    Вес 1 :

    +

    кг

    +
    +
    +

    Итоговая цена за 1 :

    +

    + $price): ?> +

    + +
    + +
    +
    +

    Количество

    + is_sold_individually() ) { + $min_quantity = 1; + $max_quantity = 1; + } + else { + $min_quantity = 0; + $max_quantity = $_product->get_max_purchase_quantity(); + } + $product_quantity = woocommerce_quantity_input( + array( + 'input_name' => "cart[{$cart_item_key}][qty]", + 'input_value' => $cart_item['quantity'], + 'max_value' => $max_quantity, + 'min_value' => $min_quantity, + 'product_name' => $product_name, + ), + $_product, + false + ); + echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); + ?> +
    + Удалить +
    +
    + is_type('variation') ? $_product->get_parent_id() : $_product->get_id(); + + // Показываем статусные теги (не скидки) + if ( function_exists('get_sorted_product_tags') && function_exists('is_discount_tag') ) { + $sorted_tags = get_sorted_product_tags( $product_id_for_tags ); + foreach ( $sorted_tags as $tag ) { + if ( ! is_discount_tag( $tag->name ) ) { + echo ''; + } + } + } + + // Получаем процент скидки из тегов товара + $discount_percent = 0; + if ( function_exists('get_sorted_product_tags') && function_exists('is_discount_tag') && function_exists('get_discount_from_tag_name') ) { + $tags = get_sorted_product_tags( $product_id_for_tags ); + foreach ( $tags as $tag ) { + if ( is_discount_tag( $tag->name ) ) { + $discount_percent = get_discount_from_tag_name( $tag->name ); + break; + } + } + } + if ( $discount_percent > 0 ) : + ?> +

    -%

    + +
    +

    Итоговая стоимость:

    +
    +
    +

    + $total_price): ?> +

    + +
    +
    +
    +

    Итоговый вес:

    +

    кг

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

    Ваш заказ

    +
    +
    + cart->get_cart_contents_count(); + function plural_form($number, $forms) { + $n = abs($number) % 100; + $n1 = $n % 10; + if ($n > 10 && $n < 20) return $forms[2]; + if ($n1 > 1 && $n1 < 5) return $forms[1]; + if ($n1 == 1) return $forms[0]; + return $forms[2]; + } + $word = plural_form($count, ['товар', 'товара', 'товаров']); + ?> +
    +

    Количество товаров:

    +

    +
    + cart; + $total_weight = 0; + foreach ( $cart->get_cart() as $item ) { + $product = $item['data']; + $qty = $item['quantity']; + $weight = (float) $product->get_weight(); + $total_weight += $weight * $qty; + } + ?> +
    +

    Вес заказа:

    +

    кг

    +
    + cart; + $items = $cart->get_cart(); + $regular_total = 0; + $sale_total = 0; + foreach ( $items as $item ) { + $product = $item['data']; + $quantity = $item['quantity']; + $regular_price = $product->get_regular_price(); + $sale_price = $product->get_sale_price(); + if ( $sale_price === '' ) { + $sale_price = $regular_price; + } + $regular_total += $regular_price * $quantity; + $sale_total += $sale_price * $quantity; + } + + // Округляем суммы + $regular_total = round($regular_total); + $sale_total = round($sale_total); + + // Скидка на товары + $product_discount = $regular_total - $sale_total; + + // Скидка от суммы заказа (порог проверяется по сумме СО скидками на товары) + $cart_discount = function_exists('orgsteklo_calculate_cart_discount') + ? orgsteklo_calculate_cart_discount( $sale_total ) + : array( 'percent' => 0, 'amount' => 0 ); + $discount_from_total = $cart_discount['amount']; + + // Итоговая сумма + $final_total = $sale_total - $discount_from_total; + ?> +
    +

    Стоимость товара без скидки:

    +

    +
    +
    +

    Скидка на товар:

    +

    +
    + 0 ) : ?> +
    +

    Скидка от суммы заказа (%):

    +

    +
    + +
    +
    + +
    +

    Стоимость заказа:

    +
    +

    + $final_total ) : ?> +

    + +
    +
    + + Перейти к оформлению заказа + + +

    Доступные способы доставки и оплаты можно выбрать при оформлении заказа.

    +

    Войти, чтобы отслеживать статус заказа.

    +
    +
    +
    +
    + +
    +
    + + + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/cart/cross-sells.php b/wp-content/themes/orgsteklo/woocommerce/cart/cross-sells.php new file mode 100644 index 0000000..d626dc4 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/cart/cross-sells.php @@ -0,0 +1,51 @@ + + +
    + +

    + + + + + + + get_id() ); + + setup_postdata( $GLOBALS['post'] = $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found + + wc_get_template_part( 'content', 'product' ); + ?> + + + + + +
    + + +cart && ! WC()->cart->is_empty() ) : ?> + +
    +
      + cart->get_cart() as $cart_item_key => $cart_item ) { + $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); + $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); + + if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) { + /** + * This filter is documented in woocommerce/templates/cart/cart.php. + * + * @since 2.1.0 + */ + $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ); + $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); + $product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); + $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); + ?> +
    • + ×', + esc_url( wc_get_cart_remove_url( $cart_item_key ) ), + /* translators: %s is the product name */ + esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ), + esc_attr( $product_id ), + esc_attr( $cart_item_key ), + esc_attr( $_product->get_sku() ), + /* translators: %s is the product name */ + esc_attr( sprintf( __( '“%s” has been removed from your cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ) + ), + $cart_item_key + ); + ?> + + + + + + + + + is_type('variation') ? $_product->get_parent_id() : $_product->get_id(); + if ( function_exists('get_sorted_product_tags') && function_exists('is_discount_tag') && function_exists('get_discount_from_tag_name') ) { + $tags = get_sorted_product_tags( $parent_id ); + foreach ( $tags as $tag ) { + if ( is_discount_tag( $tag->name ) ) { + $discount_percent = get_discount_from_tag_name( $tag->name ); + break; + } + } + } + + // Build price HTML with strikethrough original price if discount exists + $price_html = $product_price; + if ( $discount_percent > 0 ) { + // Calculate original price (before discount) + $current_price = floatval( $_product->get_price() ); + $original_price = $current_price / (1 - $discount_percent / 100); + $original_price_formatted = wc_price( $original_price ); + $price_html = $product_price . ' ' . $original_price_formatted . ''; + } + + echo apply_filters( 'woocommerce_widget_cart_item_quantity', '' . sprintf( '%s × %s', $cart_item['quantity'], $price_html ) . '', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + ?> +
    • + +
    +
    + +

    + +

    + + + +

    + + + + + +

    + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/cart/proceed-to-checkout-button.php b/wp-content/themes/orgsteklo/woocommerce/cart/proceed-to-checkout-button.php new file mode 100644 index 0000000..1c25d42 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/cart/proceed-to-checkout-button.php @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/cart/shipping-calculator.php b/wp-content/themes/orgsteklo/woocommerce/cart/shipping-calculator.php new file mode 100644 index 0000000..f87631f --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/cart/shipping-calculator.php @@ -0,0 +1,96 @@ + + +
    + + %s', esc_html( ! empty( $button_text ) ? $button_text : __( 'Calculate shipping', 'woocommerce' ) ) ); ?> + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/cart-errors.php b/wp-content/themes/orgsteklo/woocommerce/checkout/cart-errors.php new file mode 100644 index 0000000..56c989d --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/cart-errors.php @@ -0,0 +1,25 @@ + + +

    + + + +

    diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/form-billing.php b/wp-content/themes/orgsteklo/woocommerce/checkout/form-billing.php new file mode 100644 index 0000000..56faa29 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/form-billing.php @@ -0,0 +1,89 @@ + +
    + +
    + 1 +

    ваши данные

    +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + +
    + + get_checkout_fields( 'billing' ); +// $required_fields = ['billing_first_name', 'billing_phone', 'billing_email']; +// $counter = 1; +// foreach ( $fields as $key => $field ) { +// if (in_array($key, $required_fields)) { + ?> + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/form-checkout.php b/wp-content/themes/orgsteklo/woocommerce/checkout/form-checkout.php new file mode 100644 index 0000000..72bf1ed --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/form-checkout.php @@ -0,0 +1,474 @@ +is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in() ) { + echo esc_html( apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) ) ); + return; + } +?> +
    +
    +

    Оформление заказа

    +
    +
    + get_checkout_fields() ) : ?> + + + cart->needs_shipping() && WC()->cart->show_shipping() ) : ?> + + + + + + + + +
    +
    + 4 +

    Комментарий к заказу

    +
    +
    +
    +
    + +

    +
    +
    +
    + + +
    +

    +
    +
    +
    +
    +
    +
    + 5 +

    Способ оплаты

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

    + +
    +
    +
    +
    + +
    +
    +

    Ваша корзина

    +
    + cart->get_cart_contents_count(); + function plural_form($number, $forms) { + $n = abs($number) % 100; + $n1 = $n % 10; + if ($n > 10 && $n < 20) return $forms[2]; + if ($n1 > 1 && $n1 < 5) return $forms[1]; + if ($n1 == 1) return $forms[0]; + return $forms[2]; + } + $word = plural_form($count, ['товар', 'товара', 'товаров']); + ?> +
    +

    Количество товаров:

    +

    +
    + cart; + $total_weight = 0; + foreach ( $cart->get_cart() as $item ) { + $product = $item['data']; + $qty = $item['quantity']; + $weight = (float) $product->get_weight(); + $total_weight += $weight * $qty; + } + ?> +
    +

    Вес заказа:

    +

    кг

    +
    + cart; + $items = $cart->get_cart(); + $regular_total = 0; + $sale_total = 0; + foreach ( $items as $item ) { + $product = $item['data']; + $quantity = $item['quantity']; + $regular_price = $product->get_regular_price(); + $sale_price = $product->get_sale_price(); + if ( $sale_price === '' ) { + $sale_price = $regular_price; + } + $regular_total += $regular_price * $quantity; + $sale_total += $sale_price * $quantity; + } + $discount_total = $regular_total - $sale_total; + ?> +
    +

    Стоимость товара без скидки:

    +

    +
    +
    +

    Скидка на товар:

    +

    +
    + cart; + $regular_total = 0; + $sale_total = 0; + foreach ( $cart->get_cart() as $item ) { + $product = $item['data']; + $qty = $item['quantity']; + $regular_price = $product->get_regular_price(); + $sale_price = $product->get_sale_price(); + if ( $sale_price === '' ) { + $sale_price = $regular_price; + } + $regular_total += $regular_price * $qty; + $sale_total += $sale_price * $qty; + } + $cart_discount = orgsteklo_calculate_cart_discount( $sale_total ); + $final_total = $sale_total - $cart_discount['amount']; + ?> + 0 ) : ?> +
    +

    Скидка от суммы заказа (%):

    +

    +
    + + +
    +
    +

    Итоговая стоимость заказа:

    +
    +

    + $final_total ) : ?> +

    + +
    +
    + +
    +
    + +
    +
    +
    + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/form-coupon.php b/wp-content/themes/orgsteklo/woocommerce/checkout/form-coupon.php new file mode 100644 index 0000000..38abf97 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/form-coupon.php @@ -0,0 +1,51 @@ + +
    + ' . esc_html__( 'Click here to enter your code', 'woocommerce' ) . '' ), 'notice' ); + ?> +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/form-login.php b/wp-content/themes/orgsteklo/woocommerce/checkout/form-login.php new file mode 100644 index 0000000..f9b9c40 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/form-login.php @@ -0,0 +1,36 @@ + + + esc_html__( 'If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing section.', 'woocommerce' ), + 'redirect' => wc_get_checkout_url(), + 'hidden' => true, + ) +); diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/form-pay.php b/wp-content/themes/orgsteklo/woocommerce/checkout/form-pay.php new file mode 100644 index 0000000..59d9b34 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/form-pay.php @@ -0,0 +1,109 @@ +get_order_item_totals(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited +?> +
    + + + + + + + + + + + get_items() ) > 0 ) : ?> + get_items() as $item_id => $item ) : ?> + + + + + + + + + + + + + + + + + + + +
    + get_name(), $item, false ) ); + + do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, false ); + + wc_display_item_meta( $item ); + + do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, false ); + ?> + ' . sprintf( '× %s', esc_html( $item->get_quantity() ) ) . '', $item ); ?>get_formatted_line_subtotal( $item ); ?>
    + + + +
    + needs_payment() ) : ?> +
      + $gateway ) ); + } + } else { + echo '
    • '; + wc_print_notice( apply_filters( 'woocommerce_no_available_payment_methods_message', esc_html__( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) ), 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment + echo '
    • '; + } + ?> +
    + +
    + + + + + + + ' . esc_html( $order_button_text ) . '' ); // @codingStandardsIgnoreLine ?> + + + + +
    +
    +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/form-shipping.php b/wp-content/themes/orgsteklo/woocommerce/checkout/form-shipping.php new file mode 100644 index 0000000..1e94fc7 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/form-shipping.php @@ -0,0 +1,90 @@ + +
    + +
    + 3 +

    Адрес доставки

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

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

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

    +
    +
    + +
    \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/form-verify-email.php b/wp-content/themes/orgsteklo/woocommerce/checkout/form-verify-email.php new file mode 100644 index 0000000..80ee815 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/form-verify-email.php @@ -0,0 +1,53 @@ + +
    + + +

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

    + +

    + + +

    + +

    + +

    +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/order-receipt.php b/wp-content/themes/orgsteklo/woocommerce/checkout/order-receipt.php new file mode 100644 index 0000000..9a93632 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/order-receipt.php @@ -0,0 +1,46 @@ + + +
      +
    • + + get_order_number() ); ?> +
    • +
    • + + get_date_created() ) ); ?> +
    • +
    • + + get_formatted_order_total() ); ?> +
    • + get_payment_method_title() ) : ?> +
    • + + get_payment_method_title() ); ?> +
    • + +
    + +get_payment_method(), $order->get_id() ); ?> + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/order-received.php b/wp-content/themes/orgsteklo/woocommerce/checkout/order-received.php new file mode 100644 index 0000000..37a7fa4 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/order-received.php @@ -0,0 +1,42 @@ + + +

    + +

    diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/payment-method.php b/wp-content/themes/orgsteklo/woocommerce/checkout/payment-method.php new file mode 100644 index 0000000..05308d8 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/payment-method.php @@ -0,0 +1,33 @@ + +
  • + chosen, true ); ?> data-order_button_text="order_button_text ); ?>" /> + + + has_fields() || $gateway->get_description() ) : ?> +
    chosen ) : /* phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace */ ?>style="display:none;"> + payment_fields(); ?> +
    + +
  • diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/payment.php b/wp-content/themes/orgsteklo/woocommerce/checkout/payment.php new file mode 100644 index 0000000..5608758 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/payment.php @@ -0,0 +1,50 @@ + +
    + cart && WC()->cart->needs_payment() ) : ?> +
      + $gateway ) ); + } + } else { + echo '
    • '; + wc_print_notice( apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_billing_country() ? esc_html__( 'Sorry, it seems that there are no available payment methods. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) : esc_html__( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ), 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment + echo '
    • '; + } + ?> +
    + +
    + + + + + + Оплатить заказ' ); ?> + + + + +
    + + +
    +

    Чтобы оформить заказ, требуется перейти в профиль

    +
    +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/checkout/terms.php b/wp-content/themes/orgsteklo/woocommerce/checkout/terms.php new file mode 100644 index 0000000..e2c385c --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/checkout/terms.php @@ -0,0 +1,40 @@ + +
    + + + +

    + + +

    + +
    + + +
    + + get_id() ); + ?> + + has_status( 'failed' ) ) : ?> + +

    + +

    + + + + +

    + + + + $order ) ); ?> + +
      + +
    • + + get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> +
    • + +
    • + + get_date_created() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> +
    • + + get_user_id() === get_current_user_id() && $order->get_billing_email() ) : ?> + + + +
    • + + get_formatted_order_total(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> +
    • + + get_payment_method_title() ) : ?> +
    • + + get_payment_method_title() ); ?> +
    • + + +
    + + + + get_payment_method(), $order->get_id() ); ?> + get_id() ); ?> + + + + false ) ); ?> + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/content-product-cat.php b/wp-content/themes/orgsteklo/woocommerce/content-product-cat.php new file mode 100644 index 0000000..d3c2850 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/content-product-cat.php @@ -0,0 +1,57 @@ + +
  • > + +
  • diff --git a/wp-content/themes/orgsteklo/woocommerce/content-product.php b/wp-content/themes/orgsteklo/woocommerce/content-product.php new file mode 100644 index 0000000..a6c11bc --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/content-product.php @@ -0,0 +1,152 @@ +is_visible() ) { + return; + } + $current_product_id = get_the_ID(); +?> +
    +
    + get_id(); + $product_link = get_permalink( $product_id ); + echo ''; + $product_image_id = $product->get_image_id(); + if ( $product_image_id ) { + $image_url = wp_get_attachment_image_url( $product_image_id, 'full' ); + echo '' . esc_attr( $product->get_name() ) . ''; + } + else { + $placeholder_url = wc_placeholder_img_src( 'woocommerce_single' ); + echo '' . esc_attr( $product->get_name() ) . ''; + } + echo ''; + ?> + '; + + // Выводим все метки (статусные и скидки) + // Теперь метки со скидками автоматически применяют скидку к цене через хуки + foreach ( $sorted_tags as $tag ) { + $is_discount = is_discount_tag( $tag->name ); + $class = $is_discount ? 'product_item-discount' : 'product_item-popular'; + echo '

    ' . esc_html( $tag->name ) . '

    '; + } + + echo '
    '; + } + ?> +
    +
    + get_name() ); ?> + get_id(), '_preview_char_1', true ); + $char_2 = get_post_meta( $product->get_id(), '_preview_char_2', true ); + if ( $char_1 || $char_2 ) { + echo '
      '; + if ( $char_1 ) { + echo '
    • ' . esc_html( $char_1 ) . '
    • '; + } + if ( $char_2 ) { + echo '
    • ' . esc_html( $char_2 ) . '
    • '; + } + echo '
    '; + } + ?> +
    + is_type( 'variable' ) ) { + $available_variations = $product->get_available_variations(); + $variation_id = $available_variations[0]['variation_id'] ?? null; + + if ( $variation_id ) { + $display_product = wc_get_product( $variation_id ); + } + } + + // Получаем цены (с учётом автоматических скидок по меткам) + $price = wc_get_price_to_display( $display_product ); + $regular_price = wc_get_price_to_display( $display_product, [ 'price' => $display_product->get_regular_price() ] ); + + // Проверяем, является ли товар оргстеклом + $is_orgsteklo_product = ! empty( get_post_meta( $product->get_id(), '_orgsteklo_price_table', true ) ); + + if ( $is_orgsteklo_product && function_exists( 'orgsteklo_get_product_table_data' ) && function_exists( 'orgsteklo_calculate_standard_size' ) ) { + // ОРГСТЕКЛО — цены из таблицы калькулятора + $table_data = orgsteklo_get_product_table_data( $product->get_id() ); + if ( $table_data && ! empty( $table_data['rows'] ) ) { + $first_row = $table_data['rows'][0]; + $calc_result = orgsteklo_calculate_standard_size( $product->get_id(), $first_row['thickness'], 1 ); + if ( ! is_wp_error( $calc_result ) ) { + $sheet_price = $calc_result['price_standard_sheet']; + $kg_price = $calc_result['price_per_kg_standard']; + + // Проверяем скидку из тегов + $discount_percent = 0; + if ( function_exists('get_sorted_product_tags') && function_exists('is_discount_tag') && function_exists('get_discount_from_tag_name') ) { + $tags = get_sorted_product_tags( $product->get_id() ); + foreach ( $tags as $tag ) { + if ( is_discount_tag( $tag->name ) ) { + $discount_percent = get_discount_from_tag_name( $tag->name ); + break; + } + } + } + + $regular_sheet_price = $sheet_price; + $regular_kg_price = $kg_price; + if ( $discount_percent > 0 ) { + $sheet_price = round( $regular_sheet_price * ( 1 - $discount_percent / 100 ) ); + $kg_price = round( $regular_kg_price * ( 1 - $discount_percent / 100 ) ); + } + + // Цена за лист + echo '
    '; + echo '

    ' . wc_price( $sheet_price ) . '/лист

    '; + if ( $discount_percent > 0 ) { + echo '

    ' . wc_price( $regular_sheet_price ) . '

    '; + } + echo '
    '; + + // Цена за кг + echo '
    '; + echo '

    ' . wc_price( $kg_price ) . '/кг

    '; + if ( $discount_percent > 0 ) { + echo '

    ' . wc_price( $regular_kg_price ) . '

    '; + } + echo '
    '; + } + } + } else { + // Остальные товары — цена за штуку + echo '
    '; + echo '

    ' . wc_price( $price ) . '/штука

    '; + if ( $regular_price > $price ) { + echo '

    ' . wc_price( $regular_price ) . '

    '; + } + echo '
    '; + } + } + ?> + +
    + Подробнее +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/content-single-product.php b/wp-content/themes/orgsteklo/woocommerce/content-single-product.php new file mode 100644 index 0000000..c6808dc --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/content-single-product.php @@ -0,0 +1,431 @@ + + +
    +
    +
    +
    +
    + get_id(), '_custom_stock_status', true); + if ($custom_status) { + $status_text = ''; + switch ($custom_status) { + case 'in_stock': + $status_text = 'В наличии'; + break; + case 'low_stock': + $status_text = 'Осталось мало'; + break; + case 'on_order': + $status_text = 'Под заказ'; + break; + } + if ($status_text) : ?> +
    +

    +
    + + name ); + $class = $is_discount ? 'product_page-discount' : 'product_page-popular'; + echo '

    ' . esc_html( $tag->name ) . '

    '; + } + ?> +
    + +
    +
    + +
    +

    +
    + +

    + get_sku(); + if ($sku) : ?> +
    +

    Код товара:

    +

    +
    + +is_type( 'simple' ); + +if ( $show_specs ) { + + /** ===== Длина */ + $len_mm_meta = get_post_meta( $product->get_id(), '_variation_length', true ); + if ( $len_mm_meta !== '' ) { + $len_mm_num = floatval( str_replace( ',', '.', preg_replace( '/\x{00A0}|\s/u', '', (string) $len_mm_meta ) ) ); + $length_label = $len_mm_num > 0 ? number_format_i18n( $len_mm_num, 0 ) . ' мм' : ''; + } else { + $len_sys = $product->get_length(); + if ( $len_sys !== '' ) { + $unit = get_option( 'woocommerce_dimension_unit', 'cm' ); // 'mm','cm','m','in','yd' + $length_label = wc_format_localized_decimal( $len_sys ) . ' ' . $unit; + } else { + $length_label = ''; + } + } + + /** ===== Вес (3 знака, точка, всегда "кг") */ + $weight_raw = $product->get_weight(); + if ( $weight_raw !== '' ) { + $weight_num = (float) wc_format_decimal( $weight_raw ); + $weight = number_format( $weight_num, 3, '.', '' ) . ' кг'; + } else { + $weight = ''; + } + + /** ===== Атрибуты */ + $attrs = $product->get_attributes(); + + // Собираем приоритетный диаметр и остаток + $diam_vn_html = ''; // diametr-vnesnij-vnutrennij + $diam_fallback = ''; // diametr (если нет основного) + $remaining_rows = []; + + if ( ! empty( $attrs ) ) { + foreach ( $attrs as $attr ) { + + if ( method_exists( $attr, 'get_visible' ) && ! $attr->get_visible() ) { + continue; + } + + $raw_name = $attr->get_name(); + $slug = $attr->is_taxonomy() + ? wc_sanitize_taxonomy_name( str_replace( 'pa_', '', $raw_name ) ) + : wc_sanitize_taxonomy_name( $raw_name ); + + // Пропускаем вес (ves) полностью — он выводится отдельно + if ( $slug === 'ves' ) { + continue; + } + + // Получаем значение и метку + if ( $attr->is_taxonomy() ) { + $values = wc_get_product_terms( + $product->get_id(), + $attr->get_name(), + [ 'fields' => 'names' ] + ); + $value = $values ? implode( ', ', $values ) : ''; + $label = wc_attribute_label( $attr->get_name() ); + } else { + $options = (array) $attr->get_options(); + $options = array_map( static function( $v ) { return wp_kses_post( $v ); }, $options ); + $value = $options ? implode( ', ', $options ) : ''; + $label = wc_attribute_label( $attr->get_name() ); + } + + if ( $value === '' ) { + continue; + } + + $row_html = '
    + ' . esc_html( $label ) . ': + ' . esc_html( $value ) . ' +
    '; + + // Приоритет: diametr-vnesnij-vnutrennij → затем diametr + if ( $slug === 'diametr-vnesnij-vnutrennij' ) { + $diam_vn_html = $row_html; + continue; // не добавляем в остаток + } + if ( $slug === 'diametr' ) { + $diam_fallback = $row_html; + continue; // не добавляем в остаток + } + + // Остальные атрибуты — в конец + $remaining_rows[] = $row_html; + } + } + + // Печатаем блок, если есть что выводить + if ( $diam_vn_html || $diam_fallback || $length_label !== '' || $weight !== '' || ! empty( $remaining_rows ) ) : + ?> +
    +
    + + +
    + Длина: + +
    + + + + is_type('variable') ) : + ?> +
    + Вес 1 шт: + +
    + + + +
    + Цена 1 шт: + + get_price(); + $regular_price = (float) $product->get_regular_price(); + + // Сначала текущая цена + echo number_format_i18n( $price, 0 ) . ' ₽'; + + // Потом зачёркнутая цена (если есть скидка) + if ( $product->is_on_sale() && $regular_price > $price ) { + echo ''; + echo number_format_i18n( $regular_price, 0 ) . ' ₽'; + echo ''; + } + ?> + +
    + + + +
    +
    + + + + + + +
    +
    +
    +
    + + Область применения'; + } + if($documentation_repeat_repeats) { + echo ''; + } + ?> +
    +
    + +
    + +

    Область применения

    '; + } + if($documentation_repeat_repeats) { + echo ''; + } + ?> +
    +
    +
    +
    +

    Характеристики и свойства

    +
    + +
    +
    +
    +

    Область применения

    ' . $product_description . '
    '; + } + if($documentation_repeat_repeats) { + echo '

    Документация для скачивания

    '; + foreach ($documentation_repeat_repeats as $index => $documentation_repeat_repeat) { + $documentation_repeat_repeat_title = $documentation_repeat_repeat['documentation_repeat_repeat_title']; + $documentation_repeat_repeat_format = $documentation_repeat_repeat['documentation_repeat_repeat_format']; + $documentation_repeat_repeat_razmer = $documentation_repeat_repeat['documentation_repeat_repeat_razmer']; + $documentation_repeat_repeat_file = $documentation_repeat_repeat['documentation_repeat_repeat_file']; + $documentation_repeat_repeat_file_url = $documentation_repeat_repeat_file ? esc_url($documentation_repeat_repeat_file['url']) : ''; + echo '
    '; + echo '' . $documentation_repeat_repeat_title . ''; + echo '
    '; + echo '
    '; + if($documentation_repeat_repeat_format) { + echo '

    ' . $documentation_repeat_repeat_format . '

    '; + } + if($documentation_repeat_repeat_razmer) { + echo '

    ' . $documentation_repeat_repeat_razmer . '

    '; + } + echo '
    '; + echo ''; // оставить SVG как есть + echo '
    '; + echo '
    '; + echo '' . $documentation_repeat_repeat_title . ''; + echo '
    '; + if($documentation_repeat_repeat_format) { + echo '

    ' . $documentation_repeat_repeat_format . '

    '; + } + if($documentation_repeat_repeat_razmer) { + echo '

    ' . $documentation_repeat_repeat_razmer . '

    '; + } + echo '
    '; + echo '
    '; + echo '
    '; + } + echo '
    '; + } + ?> +
    + +
    +get_id(), 'product_cat', array( 'fields' => 'ids' ) ); + + // Расширяем до родительской категории и всех её дочерних + $all_categories = $categories; + foreach ( $categories as $cat_id ) { + $ancestors = get_ancestors( $cat_id, 'product_cat' ); + $all_categories = array_merge( $all_categories, $ancestors ); + foreach ( $ancestors as $ancestor_id ) { + $children = get_term_children( $ancestor_id, 'product_cat' ); + $all_categories = array_merge( $all_categories, $children ); + } + } + $categories = array_unique( $all_categories ); + + // Рекомендуемые товары: только с _is_recommended_product = 'yes' из той же категории + $recommended_args = array( + 'post_type' => 'product', + 'posts_per_page' => 8, + 'post__not_in' => array( $product->get_id() ), + 'ignore_sticky_posts' => 1, + 'post_status' => array( 'publish', 'draft' ), + 'orderby' => 'rand', + 'meta_query' => array( + array( + 'key' => '_is_recommended_product', + 'value' => 'yes', + ), + ), + 'tax_query' => array( + array( + 'taxonomy' => 'product_cat', + 'field' => 'term_id', + 'terms' => $categories, + 'operator' => 'IN', + ), + ), + ); + $recommended_query = new WP_Query( $recommended_args ); + $all_products = $recommended_query->posts; + + if ( ! empty( $all_products ) ) : + global $post; + echo '

    Рекомендуемые товары

    Все товары
    '; + foreach ( $all_products as $related_product ) : + $post = $related_product; + setup_postdata( $post ); + echo '
    '; + wc_get_template_part( 'content', 'product' ); + echo '
    '; + endforeach; + wp_reset_postdata(); + echo '
    '; + foreach ( $all_products as $related_product ) : + $post = $related_product; + setup_postdata( $post ); + wc_get_template_part( 'content', 'product' ); + endforeach; + wp_reset_postdata(); + echo '
    Все товары
    '; + endif; +?> diff --git a/wp-content/themes/orgsteklo/woocommerce/content-widget-price-filter.php b/wp-content/themes/orgsteklo/woocommerce/content-widget-price-filter.php new file mode 100644 index 0000000..e8a89c1 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/content-widget-price-filter.php @@ -0,0 +1,42 @@ + + + +
    +
    + +
    + + + + + + + + +
    +
    +
    +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/content-widget-product.php b/wp-content/themes/orgsteklo/woocommerce/content-widget-product.php new file mode 100644 index 0000000..86db680 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/content-widget-product.php @@ -0,0 +1,43 @@ + +
  • + + + + get_image(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> + get_name() ); ?> + + + + get_average_rating() ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> + + + get_price_html(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> + + +
  • diff --git a/wp-content/themes/orgsteklo/woocommerce/content-widget-reviews.php b/wp-content/themes/orgsteklo/woocommerce/content-widget-reviews.php new file mode 100644 index 0000000..095fdeb --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/content-widget-reviews.php @@ -0,0 +1,47 @@ + +
  • + + + + + + get_image(); ?> + get_name() ); ?> + + + comment_ID, 'rating', true ) ) ); ?> + + + comment_ID ) ); + ?> + + + + + +
  • diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/admin-cancelled-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/admin-cancelled-order.php new file mode 100644 index 0000000..463f29a --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/admin-cancelled-order.php @@ -0,0 +1,75 @@ + + +' : ''; +/* translators: %1$s: Order number. %2$s: Customer full name */ +$text = __( 'Notification to let you know — order #%1$s belonging to %2$s has been cancelled:', 'woocommerce' ); +if ( $email_improvements_enabled ) { + /* translators: %1$s: Order number. %2$s: Customer full name */ + $text = __( 'We’re getting in touch to let you know that order #%1$s from %2$s has been cancelled.', 'woocommerce' ); +} +?> +

    get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?>

    +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/* + * @hooked WC_Emails::email_footer() Output the email footer + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/admin-failed-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/admin-failed-order.php new file mode 100644 index 0000000..a67eaa2 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/admin-failed-order.php @@ -0,0 +1,76 @@ + + +' : ''; +/* translators: %1$s: Order number. %2$s: Customer full name. */ +$text = __( 'Payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' ); +if ( $email_improvements_enabled ) { + /* translators: %1$s: Order number. %2$s: Customer full name. */ + $text = __( 'Unfortunately, the payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' ); +} +?> +

    get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?>

    +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/* + * @hooked WC_Emails::email_footer() Output the email footer +*/ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/admin-new-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/admin-new-order.php new file mode 100644 index 0000000..75c21a1 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/admin-new-order.php @@ -0,0 +1,74 @@ + + +' : ''; +/* translators: %s: Customer billing full name */ +$text = __( 'You’ve received the following order from %s:', 'woocommerce' ); +if ( $email_improvements_enabled ) { + /* translators: %s: Customer billing full name */ + $text = __( 'Woo! You’ve received a new order from %s:', 'woocommerce' ); +} +?> +

    get_formatted_billing_full_name() ) ); ?>

    +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/* + * @hooked WC_Emails::email_footer() Output the email footer + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-completed-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-completed-order.php new file mode 100644 index 0000000..2979f18 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-completed-order.php @@ -0,0 +1,83 @@ + + +' : ''; ?> +

    +get_billing_first_name() ) ) { + /* translators: %s: Customer first name */ + printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); +} else { + printf( esc_html__( 'Hi,', 'woocommerce' ) ); +} +?> +

    + +

    +

    + +

    + +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/* + * @hooked WC_Emails::email_footer() Output the email footer + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-failed-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-failed-order.php new file mode 100644 index 0000000..c7b47e1 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-failed-order.php @@ -0,0 +1,94 @@ + + +' : ''; ?> +

    +get_billing_first_name() ) ) { + /* translators: %s: Customer first name */ + printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); +} else { + printf( esc_html__( 'Hi,', 'woocommerce' ) ); +} +?> +

    +

    + +

    +

    +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/** + * Hook for the woocommerce_email_footer. + * + * @hooked WC_Emails::email_footer() Output the email footer + * @since 3.7.0 + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-invoice.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-invoice.php new file mode 100644 index 0000000..4e200b6 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-invoice.php @@ -0,0 +1,133 @@ + + +' : ''; ?> +

    +get_billing_first_name() ) ) { + /* translators: %s: Customer first name */ + printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); +} else { + printf( esc_html__( 'Hi,', 'woocommerce' ) ); +} +?> +

    +needs_payment() ) { ?> +

    + has_status( OrderStatus::FAILED ) ) { + printf( + wp_kses( + /* translators: %1$s Site title, %2$s Order pay link */ + __( 'Sorry, your order on %1$s was unsuccessful. Your order details are below, with a link to try your payment again: %2$s', 'woocommerce' ), + array( + 'a' => array( + 'href' => array(), + ), + ) + ), + esc_html( get_bloginfo( 'name', 'display' ) ), + '' . esc_html__( 'Pay for this order', 'woocommerce' ) . '' + ); + } else { + printf( + wp_kses( + /* translators: %1$s Site title, %2$s Order pay link */ + __( 'An order has been created for you on %1$s. Your order details are below, with a link to make payment when you’re ready: %2$s', 'woocommerce' ), + array( + 'a' => array( + 'href' => array(), + ), + ) + ), + esc_html( get_bloginfo( 'name', 'display' ) ), + '' . esc_html__( 'Pay for this order', 'woocommerce' ) . '' + ); + } + ?> +

    + + +

    + get_date_created() ) ) ); + ?> +

    + +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/** + * Executes the email footer. + * + * @hooked WC_Emails::email_footer() Output the email footer + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-new-account-blocks.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-new-account-blocks.php new file mode 100644 index 0000000..4299e7c --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-new-account-blocks.php @@ -0,0 +1,68 @@ + + +' : ''; ?> + +

    + + +

    +
    + +

    %s', 'woocommerce' ), esc_html( $user_login ) ), array( 'b' => array() ) ); ?>

    + +

    + +
    +

    +

    + + +

    ' . esc_html( $user_login ) . '', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>

    + +

    + + +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} +/** + * Fires to output the email footer. + * + * @hooked WC_Emails::email_footer() + * + * @since 3.7.0 + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-new-account.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-new-account.php new file mode 100644 index 0000000..b0c6c2a --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-new-account.php @@ -0,0 +1,62 @@ + + +' : ''; ?> + +

    + + +

    +
    + +

    %s', 'woocommerce' ), esc_html( $user_login ) ), array( 'b' => array() ) ); ?>

    + + +

    + +
    +

    +

    + + +

    ' . esc_html( $user_login ) . '', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>

    + + +

    + + +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-note.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-note.php new file mode 100644 index 0000000..eeeeaef --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-note.php @@ -0,0 +1,82 @@ + + +' : ''; ?> +

    +get_billing_first_name() ) ) { + /* translators: %s: Customer first name */ + printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); +} else { + printf( esc_html__( 'Hi,', 'woocommerce' ) ); +} +?> +

    +

    + +
    + +

    +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/* + * @hooked WC_Emails::email_footer() Output the email footer + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-on-hold-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-on-hold-order.php new file mode 100644 index 0000000..d4ea0a5 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-on-hold-order.php @@ -0,0 +1,81 @@ + + +' : ''; ?> +

    +get_billing_first_name() ) ) { + /* translators: %s: Customer first name */ + printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); +} else { + printf( esc_html__( 'Hi,', 'woocommerce' ) ); +} +?> +

    + +

    +

    + +

    + +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/* + * @hooked WC_Emails::email_footer() Output the email footer + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-processing-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-processing-order.php new file mode 100644 index 0000000..544d8a4 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-processing-order.php @@ -0,0 +1,84 @@ + + +' : ''; ?> +

    +get_billing_first_name() ) ) { + /* translators: %s: Customer first name */ + printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); +} else { + printf( esc_html__( 'Hi,', 'woocommerce' ) ); +} +?> +

    + +

    +

    + + +

    get_order_number() ) ); ?>

    + +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/* + * @hooked WC_Emails::email_footer() Output the email footer + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-refunded-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-refunded-order.php new file mode 100644 index 0000000..d0b3043 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-refunded-order.php @@ -0,0 +1,98 @@ + + +' : ''; ?> +

    +get_billing_first_name() ) ) { + /* translators: %s: Customer first name */ + printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); +} else { + printf( esc_html__( 'Hi,', 'woocommerce' ) ); +} +?> +

    + +

    +

    '; + echo esc_html__( 'Here’s a reminder of what you’ve ordered:', 'woocommerce' ) . "\n\n"; + +} elseif ( $partial_refund ) { + /* translators: %s: Site title */ + printf( esc_html__( 'Your order on %s has been partially refunded. There are more details below for your reference:', 'woocommerce' ), esc_html( $blogname ) ); +} else { + /* translators: %s: Site title */ + printf( esc_html__( 'Your order on %s has been refunded. There are more details below for your reference:', 'woocommerce' ), esc_html( $blogname ) ); +} +?> +

    +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +/* + * @hooked WC_Emails::email_footer() Output the email footer + */ +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/customer-reset-password.php b/wp-content/themes/orgsteklo/woocommerce/emails/customer-reset-password.php new file mode 100644 index 0000000..37ee7bf --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/customer-reset-password.php @@ -0,0 +1,69 @@ + + + + +' : ''; ?> + +

    + +

    + +
    + +

    %s', 'woocommerce' ), esc_html( $user_login ) ), array( 'b' => array() ) ); ?>

    +
    +

    + + +

    +

    + +

    + + + +

    +' : ''; ?> + +' : ''; + echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); + echo $email_improvements_enabled ? '' : ''; +} + +do_action( 'woocommerce_email_footer', $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/email-addresses.php b/wp-content/themes/orgsteklo/woocommerce/emails/email-addresses.php new file mode 100644 index 0000000..0cbf248 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/email-addresses.php @@ -0,0 +1,92 @@ +get_formatted_billing_address(); +$shipping = $order->get_formatted_shipping_address(); + +$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' ); + +?> + + + needs_shipping_address() && $shipping ) : ?> + + + +
    + + + +

    + + +
    + + get_billing_phone() ) : ?> +
    get_billing_phone() ); ?> + + get_billing_email() ) : ?> +
    get_billing_email() ); ?> + + +
    +
    + + + +

    + + +
    + + get_shipping_phone() ) : ?> +
    get_shipping_phone() ); ?> + + +
    +
    +' : ''; ?> \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/email-customer-details.php b/wp-content/themes/orgsteklo/woocommerce/emails/email-customer-details.php new file mode 100644 index 0000000..8679e62 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/email-customer-details.php @@ -0,0 +1,31 @@ + + +
    +

    +
      + +
    • :
    • + +
    +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/email-downloads.php b/wp-content/themes/orgsteklo/woocommerce/emails/email-downloads.php new file mode 100644 index 0000000..9080dfb --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/email-downloads.php @@ -0,0 +1,66 @@ +

    + + + + + $column_name ) : ?> + + + + + + + + $column_name ) : ?> + + + + +
    + + + + + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/email-footer.php b/wp-content/themes/orgsteklo/woocommerce/emails/email-footer.php new file mode 100644 index 0000000..84bfebf --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/email-footer.php @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/email-header.php b/wp-content/themes/orgsteklo/woocommerce/emails/email-header.php new file mode 100644 index 0000000..62a386c --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/email-header.php @@ -0,0 +1,103 @@ + + +> + + + + <?php echo get_bloginfo( 'name', 'display' ); ?> + + ="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> + + + +
    +
    + + +
    + + + + + +
    + ' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '

    '; + } else { + echo ''; + } + ?> +
    + +
    + ' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '

    '; + } + ?> +
    + + + + + + +
    + + + + + +
    +

    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/order/order-details.php b/wp-content/themes/orgsteklo/woocommerce/order/order-details.php new file mode 100644 index 0000000..6862901 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/order/order-details.php @@ -0,0 +1,151 @@ +get_items( apply_filters( 'woocommerce_purchase_order_item_types', 'line_item' ) ); +$show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) ); +$downloads = $order->get_downloadable_items(); +$actions = array_filter( + wc_get_account_orders_actions( $order ), + function ( $key ) { + return 'view' !== $key; + }, + ARRAY_FILTER_USE_KEY +); + +// We make sure the order belongs to the user. This will also be true if the user is a guest, and the order belongs to a guest (userID === 0). +$show_customer_details = $order->get_user_id() === get_current_user_id(); + +if ( $show_downloads ) { + wc_get_template( + 'order/order-downloads.php', + array( + 'downloads' => $downloads, + 'show_title' => true, + ) + ); +} +?> +
    + + +

    + +
    + + + + + + + + + + + + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/email-styles.php b/wp-content/themes/orgsteklo/woocommerce/emails/email-styles.php new file mode 100644 index 0000000..e996d12 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/email-styles.php @@ -0,0 +1,531 @@ + Settings > Emails). + * + * @since 9.6.0 + * @param bool $is_email_preview Whether the email is being previewed. + */ +$is_email_preview = apply_filters( 'woocommerce_is_email_preview', false ); + +if ( $is_email_preview ) { + $bg_transient = get_transient( 'woocommerce_email_background_color' ); + $body_transient = get_transient( 'woocommerce_email_body_background_color' ); + $base_transient = get_transient( 'woocommerce_email_base_color' ); + $text_transient = get_transient( 'woocommerce_email_text_color' ); + $footer_text_transient = get_transient( 'woocommerce_email_footer_text_color' ); + $header_alignment_transient = get_transient( 'woocommerce_email_header_alignment' ); + $logo_image_width_transient = get_transient( 'woocommerce_email_header_image_width' ); + $font_family_transient = get_transient( 'woocommerce_email_font_family' ); + + $bg = $bg_transient ? $bg_transient : $bg; + $body = $body_transient ? $body_transient : $body; + $base = $base_transient ? $base_transient : $base; + $text = $text_transient ? $text_transient : $text; + $footer_text = $footer_text_transient ? $footer_text_transient : $footer_text; + $header_alignment = $header_alignment_transient ? $header_alignment_transient : $header_alignment; + $logo_image_width = $logo_image_width_transient ? $logo_image_width_transient : $logo_image_width; + $font_family = $font_family_transient ? $font_family_transient : $font_family; +} + +// Only use safe fonts. They won't be escaped to preserve single quotes. +$safe_font_family = EmailFont::$font[ $font_family ] ?? EmailFont::$font[ $default_font ]; + +$base_text = wc_light_or_dark( $base, '#202020', '#ffffff' ); + +// Pick a contrasting color for links. +$link_color = wc_hex_is_light( $base ) ? $base : $base_text; + +if ( wc_hex_is_light( $body ) ) { + $link_color = wc_hex_is_light( $base ) ? $base_text : $base; +} + +// If email improvements are enabled, always use the base color for links. +if ( $email_improvements_enabled ) { + $link_color = $base; +} + +$border_color = wc_light_or_dark( $body, 'rgba(0, 0, 0, .2)', 'rgba(255, 255, 255, .2)' ); +$bg_darker_10 = wc_hex_darker( $bg, 10 ); +$body_darker_10 = wc_hex_darker( $body, 10 ); +$base_lighter_20 = wc_hex_lighter( $base, 20 ); +$base_lighter_40 = wc_hex_lighter( $base, 40 ); +$text_lighter_20 = wc_hex_lighter( $text, 20 ); +$text_lighter_40 = wc_hex_lighter( $text, 40 ); + +// !important; is a gmail hack to prevent styles being stripped if it doesn't like something. +// body{padding: 0;} ensures proper scale/positioning of the email in the iOS native email app. +?> +body { + background-color: ; + padding: 0; + text-align: center; +} + +#outer_wrapper { + background-color: ; +} + + +#inner_wrapper { + background-color: ; + border-radius: 8px; +} + + +#wrapper { + margin: 0 auto; + padding: ; + -webkit-text-size-adjust: none !important; + width: 100%; + max-width: 600px; +} + +#template_container { + box-shadow: ; + background-color: ; + border: ; + border-radius: 3px !important; +} + +#template_header { + background-color: ; + border-radius: 3px 3px 0 0 !important; + color: ; + border-bottom: 0; + font-weight: bold; + line-height: 100%; + vertical-align: middle; + font-family: ; +} + +#template_header h1, +#template_header h1 a { + color: ; + background-color: inherit; +} + + +.hr { + border-bottom: 1px solid #1e1e1e; + opacity: 0.2; + margin: 16px 0; +} + +.hr-top { + margin-top: 32px; +} + +.hr-bottom { + margin-bottom: 32px; +} + +#template_header_image { + padding: 32px 32px 0; +} + +#template_header_image p { + margin-bottom: 0; + text-align: ; +} + +#template_header_image img { + width: px; +} + +.email-logo-text { + color: ; + font-family: ; + font-size: 18px; +} + +.email-introduction { + padding-bottom: 24px; +} + +.email-order-item-meta { + color: ; + font-size: 14px; + line-height: 140%; +} + +#body_content table td td.email-additional-content { + color: ; + font-family: ; + padding: 32px 0 0; +} + +.email-additional-content p { + text-align: center; +} + +.email-additional-content-aligned p { + text-align: ; +} + + + +#template_header_image img { + margin-left: 0; + margin-right: 0; +} + + +#template_footer td { + padding: 0; + border-radius: ; +} + +#template_footer #credit { + border: 0; + + border-top: 1px solid ; + + color: ; + font-family: ; + font-size: 12px; + line-height: ; + text-align: center; + padding: ; +} + +#template_footer #credit p { + margin: ; +} + +#body_content { + background-color: ; +} + +#body_content table td { + padding: ; +} + +#body_content table td td { + padding: 12px; +} + +#body_content table td th { + padding: 12px; +} + +#body_content table .email-order-details td, +#body_content table .email-order-details th { + padding: 8px 12px; +} + +#body_content table .email-order-details td:first-child, +#body_content table .email-order-details th:first-child { + padding-: 0; +} + +#body_content table .email-order-details td:last-child, +#body_content table .email-order-details th:last-child { + padding-: 0; +} + +#body_content .email-order-details tbody tr:last-child td { + border-bottom: 1px solid ; + padding-bottom: 24px; +} + +#body_content .email-order-details tfoot tr:first-child td, +#body_content .email-order-details tfoot tr:first-child th { + padding-top: 24px; +} + +#body_content .order-item-data td { + border: 0 !important; + padding: 0 !important; + vertical-align: middle; +} + +#body_content .email-order-details .order-totals td, +#body_content .email-order-details .order-totals th { + font-weight: normal; + padding-bottom: 5px; + padding-top: 5px; +} + +#body_content .email-order-details .order-totals-total th { + font-weight: bold; +} + +#body_content .email-order-details .order-totals-total td { + font-weight: bold; + font-size: 20px; +} + +#body_content .email-order-details .order-totals-last td, +#body_content .email-order-details .order-totals-last th { + border-bottom: 1px solid ; + padding-bottom: 24px; +} + +#body_content .email-order-details .order-customer-note td { + border-bottom: 1px solid ; + padding-bottom: 24px; + padding-top: 24px; +} + +#body_content td ul.wc-item-meta { + font-size: small; + margin: 1em 0 0>; + padding: 0; + list-style: none; +} + +#body_content td ul.wc-item-meta li { + margin: 0.5em 0 0; + padding: 0; +} + +#body_content td ul.wc-item-meta li p { + margin: 0; +} + +#body_content .email-order-details .wc-item-meta-label { + clear: both; + float: ; + font-weight: normal; + margin-: .25em; +} + +#body_content p { + margin: 0 0 16px; +} + +#body_content_inner { + color: ; + font-family: ; + font-size: ; + line-height: 150%; + text-align: ; +} + +.td { + color: ; + border: ; + vertical-align: middle; +} + +.address { + + color: ; + font-style: normal; + padding: 8px 0; + + padding: 12px; + color: ; + border: 1px solid ; + +} + +.additional-fields { + padding: 12px 12px 0; + color: ; + border: 1px solid ; + list-style: none outside; +} + +.additional-fields li { + margin: 0 0 12px 0; +} + +.text, +.address-title, +.order-item-data { + color: ; + font-family: ; +} + +.link { + color: ; +} + +#header_wrapper { + padding: ; + display: block; +} + + +#header_wrapper h1 { + text-align: ; +} + + +#template_footer #credit, +#template_footer #credit a { + color: ; +} + +h1 { + color: ; + font-family: ; + font-size: ; + font-weight: ; + + letter-spacing: -1px; + + line-height: ; + margin: 0; + text-align: ; + + text-shadow: 0 1px 0 ; + +} + +h2 { + color: ; + display: block; + font-family: ; + font-size: ; + font-weight: bold; + line-height: ; + margin: 0 0 18px; + text-align: ; +} + +h3 { + color: ; + display: block; + font-family: ; + font-size: 16px; + font-weight: bold; + line-height: ; + margin: 16px 0 8px; + text-align: ; +} + +a { + color: ; + font-weight: normal; + text-decoration: underline; +} + +img { + border: none; + display: inline-block; + font-size: 14px; + font-weight: bold; + height: auto; + outline: none; + text-decoration: none; + text-transform: capitalize; + vertical-align: middle; + margin-: ; + max-width: 100%; +} + +h2.email-order-detail-heading span { + color: ; + display: block; + font-size: 14px; + font-weight: normal; +} + +.font-family { + font-family: ; +} + +.text-align-left { + text-align: ; +} + +.text-align-right { + text-align: ; +} + +/** + * Media queries are not supported by all email clients, however they do work on modern mobile + * Gmail clients and can help us achieve better consistency there. + */ +@media screen and (max-width: 600px) { + + #template_header_image { + padding: 16px 10px 0 !important; + } + + #header_wrapper { + padding: 16px 10px 0 !important; + } + + #header_wrapper h1 { + font-size: 24px !important; + } + + #body_content_inner_cell { + padding: 10px !important; + } + + #body_content_inner { + font-size: 12px !important; + } + + .email-order-item-meta { + font-size: 12px !important; + } + + #body_content .email-order-details .order-totals-total td { + font-size: 14px !important; + } + + .email-order-detail-heading { + font-size: 16px !important; + line-height: 130% !important; + } + + .email-additional-content { + padding-top: 16px !important; + } + + #header_wrapper { + padding: 27px 36px !important; + font-size: 24px; + } + + #body_content table > tbody > tr > td { + padding: 10px !important; + } + + #body_content_inner { + font-size: 10px !important; + } + +} +get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n"; + +/* + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/* + * @hooked WC_Emails::order_meta() Shows order meta data. + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/* + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/admin-failed-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/admin-failed-order.php new file mode 100644 index 0000000..f40c8c8 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/admin-failed-order.php @@ -0,0 +1,67 @@ +get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n"; + +/* + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/* + * @hooked WC_Emails::order_meta() Shows order meta data. + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/* + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/admin-new-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/admin-new-order.php new file mode 100644 index 0000000..bda03f0 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/admin-new-order.php @@ -0,0 +1,67 @@ +get_formatted_billing_full_name() ) ) . "\n\n"; + +/* + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/* + * @hooked WC_Emails::order_meta() Shows order meta data. + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/* + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-completed-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-completed-order.php new file mode 100644 index 0000000..b9d9cf2 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-completed-order.php @@ -0,0 +1,68 @@ +get_billing_first_name() ) ) . "\n\n"; +if ( $email_improvements_enabled ) { + echo esc_html__( 'We’ve successfully processed your order, and it’s on its way to you.', 'woocommerce' ) . "\n\n"; + echo esc_html__( 'Here’s a reminder of what you’ve ordered:', 'woocommerce' ) . "\n\n"; +} else { + echo esc_html__( 'We have finished processing your order.', 'woocommerce' ) . "\n\n"; +} + +/* + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/* + * @hooked WC_Emails::order_meta() Shows order meta data. + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/* + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-failed-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-failed-order.php new file mode 100644 index 0000000..859fd63 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-failed-order.php @@ -0,0 +1,75 @@ +get_billing_first_name() ) ) . "\n\n"; +echo esc_html__( "Unfortunately, we couldn't complete your order due to an issue with your payment method.", 'woocommerce' ) . "\n\n"; +/* translators: %s: Site title */ +echo sprintf( esc_html__( "If you'd like to continue with your purchase, please return to %s and try a different method of payment.", 'woocommerce' ), esc_html( $blogname ) ) . "\n\n"; +echo esc_html__( 'Your order details are as follows:', 'woocommerce' ) . "\n\n"; + +/** + * Hook for the woocommerce_email_order_details. + * + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/** + * Hook for the woocommerce_email_order_meta. + * + * @hooked WC_Emails::order_meta() Shows order meta data. + * @since 1.0.0 + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/** + * Hook for woocommerce_email_customer_details. + * + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + * @since 1.0.0 + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +/** + * Filters the email footer text. + * + * @since 3.7.0 + */ +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-invoice.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-invoice.php new file mode 100644 index 0000000..6127431 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-invoice.php @@ -0,0 +1,95 @@ +get_billing_first_name() ) ) . "\n\n"; + +if ( $order->needs_payment() ) { + if ( $order->has_status( OrderStatus::FAILED ) ) { + echo wp_kses_post( + sprintf( + /* translators: %1$s: Site title, %2$s: Order pay link */ + __( 'Sorry, your order on %1$s was unsuccessful. Your order details are below, with a link to try your payment again: %2$s', 'woocommerce' ), + esc_html( get_bloginfo( 'name', 'display' ) ), + esc_url( $order->get_checkout_payment_url() ) + ) + ) . "\n\n"; + } else { + echo wp_kses_post( + sprintf( + /* translators: %1$s: Site title, %2$s: Order pay link */ + __( 'An order has been created for you on %1$s. Your order details are below, with a link to make payment when you’re ready: %2$s', 'woocommerce' ), + esc_html( get_bloginfo( 'name', 'display' ) ), + esc_url( $order->get_checkout_payment_url() ) + ) + ) . "\n\n"; + } +} else { + /* translators: %s: Order date */ + echo sprintf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) ) . "\n\n"; +} + +/** + * Hook for the woocommerce_email_order_details. + * + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/** + * Hook for the woocommerce_email_order_meta. + * + * @hooked WC_Emails::order_meta() Shows order meta data. + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/** + * Hook for woocommerce_email_customer_details + * + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); + +// phpcs:enable Universal.WhiteSpace.PrecisionAlignment.Found, Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-new-account-blocks.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-new-account-blocks.php new file mode 100644 index 0000000..b31ba21 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-new-account-blocks.php @@ -0,0 +1,61 @@ +get_billing_first_name() ) ) . "\n\n"; +echo esc_html__( 'The following note has been added to your order:', 'woocommerce' ) . "\n\n"; + +echo "----------\n\n"; + +echo wptexturize( $customer_note ) . "\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped + +echo "----------\n\n"; + +echo esc_html__( 'As a reminder, here are your order details:', 'woocommerce' ) . "\n\n"; + +/* + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/* + * @hooked WC_Emails::order_meta() Shows order meta data. + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/* + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-on-hold-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-on-hold-order.php new file mode 100644 index 0000000..417ae6c --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-on-hold-order.php @@ -0,0 +1,68 @@ +get_billing_first_name() ) ) . "\n\n"; +if ( $email_improvements_enabled ) { + echo esc_html__( 'We’ve received your order and it’s currently on hold until we can confirm your payment has been processed.', 'woocommerce' ) . "\n\n"; + echo esc_html__( 'Here’s a reminder of what you’ve ordered:', 'woocommerce' ) . "\n\n"; +} else { + echo esc_html__( 'Thanks for your order. It’s on-hold until we confirm that payment has been received.', 'woocommerce' ) . "\n\n"; +} + +/* + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/* + * @hooked WC_Emails::order_meta() Shows order meta data. + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/* + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-processing-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-processing-order.php new file mode 100644 index 0000000..a5d6dfe --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-processing-order.php @@ -0,0 +1,69 @@ +get_billing_first_name() ) ) . "\n\n"; +if ( $email_improvements_enabled ) { + echo esc_html__( 'We’ve received your order and will let you know when it’s on its way to you!', 'woocommerce' ) . "\n\n"; + echo esc_html__( 'Here’s a reminder of what you’ve ordered:', 'woocommerce' ) . "\n\n"; +} else { + /* translators: %s: Order number */ + echo sprintf( esc_html__( 'Just to let you know — we\'ve received your order #%s, and it is now being processed:', 'woocommerce' ), esc_html( $order->get_order_number() ) ) . "\n\n"; +} + +/* + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/* + * @hooked WC_Emails::order_meta() Shows order meta data. + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/* + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-refunded-order.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-refunded-order.php new file mode 100644 index 0000000..dc27ed6 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-refunded-order.php @@ -0,0 +1,78 @@ +get_billing_first_name() ) ) . "\n\n"; +if ( $email_improvements_enabled ) { + if ( $partial_refund ) { + /* translators: %s: Site title */ + echo sprintf( esc_html__( 'Your order from %s has been partially refunded.', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n"; + } else { + /* translators: %s: Site title */ + echo sprintf( esc_html__( 'Your order from %s has been refunded.', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n"; + } + echo esc_html__( 'Here’s a reminder of what you’ve ordered:', 'woocommerce' ) . "\n\n"; +} elseif ( $partial_refund ) { + /* translators: %s: Site title */ + echo sprintf( esc_html__( 'Your order on %s has been partially refunded. There are more details below for your reference:', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n"; +} else { + /* translators: %s: Site title */ + echo sprintf( esc_html__( 'Your order on %s has been refunded. There are more details below for your reference:', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n"; +} + +/* + * @hooked WC_Emails::order_details() Shows the order details table. + * @hooked WC_Structured_Data::generate_order_data() Generates structured data. + * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. + * @since 2.5.0 + */ +do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n----------------------------------------\n\n"; + +/* + * @hooked WC_Emails::order_meta() Shows order meta data. + */ +do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); + +/* + * @hooked WC_Emails::customer_details() Shows customer details + * @hooked WC_Emails::email_address() Shows email address + */ +do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-reset-password.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-reset-password.php new file mode 100644 index 0000000..c28627c --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/customer-reset-password.php @@ -0,0 +1,55 @@ + $reset_key, 'id' => $user_id, 'login' => rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ) . "\n\n"; // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound + +echo "\n\n----------------------------------------\n\n"; + +/** + * Show user-defined additional content - this is set in each email's settings. + */ +if ( $additional_content ) { + echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); + echo "\n\n----------------------------------------\n\n"; +} + +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-addresses.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-addresses.php new file mode 100644 index 0000000..72c74f0 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-addresses.php @@ -0,0 +1,66 @@ +#i', "\n", $order->get_formatted_billing_address() ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + +if ( $order->get_billing_phone() ) { + echo $order->get_billing_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped +} + +if ( $order->get_billing_email() ) { + echo $order->get_billing_email() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped +} + +/** + * Fires after the core address fields in emails. + * + * @since 8.6.0 + * + * @param string $type Address type. Either 'billing' or 'shipping'. + * @param WC_Order $order Order instance. + * @param bool $sent_to_admin If this email is being sent to the admin or not. + * @param bool $plain_text If this email is plain text or not. + */ +do_action( 'woocommerce_email_customer_address_section', 'billing', $order, $sent_to_admin, true ); + +if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() ) { + $shipping = $order->get_formatted_shipping_address(); + + if ( $shipping ) { + echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Shipping address', 'woocommerce' ) ) ) . "\n\n"; + echo preg_replace( '##i', "\n", $shipping ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + + if ( $order->get_shipping_phone() ) { + echo $order->get_shipping_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + /** + * Fires after the core address fields in emails. + * + * @since 8.6.0 + * + * @param string $type Address type. Either 'billing' or 'shipping'. + * @param WC_Order $order Order instance. + * @param bool $sent_to_admin If this email is being sent to the admin or not. + * @param bool $plain_text If this email is plain text or not. + */ + do_action( 'woocommerce_email_customer_address_section', 'shipping', $order, $sent_to_admin, true ); + } +} diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-customer-details.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-customer-details.php new file mode 100644 index 0000000..c0dbc45 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-customer-details.php @@ -0,0 +1,26 @@ + $column_name ) { + echo wp_kses_post( $column_name ) . ': '; + + if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) { + do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text ); + } else { + switch ( $column_id ) { + case 'download-product': + echo esc_html( $download['product_name'] ); + break; + case 'download-file': + echo esc_html( $download['download_name'] ) . ' - ' . esc_url( $download['download_url'] ); + break; + case 'download-expires': + if ( ! empty( $download['access_expires'] ) ) { + echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ); + } else { + esc_html_e( 'Never', 'woocommerce' ); + } + break; + } + } + echo "\n"; + } + echo "\n"; +} +echo '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='; +echo "\n\n"; diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-order-details.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-order-details.php new file mode 100644 index 0000000..64341b0 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-order-details.php @@ -0,0 +1,82 @@ +get_order_number(), wc_format_datetime( $order->get_date_created() ) ) ) . "\n"; + echo "\n==========\n"; +} else { + /* translators: %1$s: Order ID. %2$s: Order date */ + echo wp_kses_post( wc_strtoupper( sprintf( esc_html__( '[Order #%1$s] (%2$s)', 'woocommerce' ), $order->get_order_number(), wc_format_datetime( $order->get_date_created() ) ) ) ) . "\n"; +} +echo "\n" . wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + $order, + array( + 'show_sku' => $sent_to_admin, + 'show_image' => false, + 'image_size' => array( 32, 32 ), + 'plain_text' => true, + 'sent_to_admin' => $sent_to_admin, + ) +); + +echo "==========\n\n"; + +$item_totals = $order->get_order_item_totals(); + +if ( $item_totals ) { + foreach ( $item_totals as $total ) { + if ( $email_improvements_enabled ) { + $label = $total['label']; + if ( isset( $total['meta'] ) ) { + $label .= ' ' . $total['meta']; + } + echo wp_kses_post( str_pad( wp_kses_post( $label ), 40 ) ); + echo ' '; + echo esc_html( str_pad( wp_kses( $total['value'], array() ), 20, ' ', STR_PAD_LEFT ) ) . "\n"; + } else { + echo wp_kses_post( $total['label'] . "\t " . $total['value'] ) . "\n"; + } + } +} + +if ( $order->get_customer_note() ) { + if ( $email_improvements_enabled ) { + echo "\n" . esc_html__( 'Note:', 'woocommerce' ) . "\n" . wp_kses( wptexturize( $order->get_customer_note() ), array() ) . "\n"; + } else { + echo esc_html__( 'Note:', 'woocommerce' ) . "\t " . wp_kses( wptexturize( $order->get_customer_note() ), array() ) . "\n"; + } +} + +if ( $sent_to_admin ) { + /* translators: %s: Order link. */ + echo "\n" . sprintf( esc_html__( 'View order: %s', 'woocommerce' ), esc_url( $order->get_edit_order_url() ) ) . "\n"; +} + +do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-order-items.php b/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-order-items.php new file mode 100644 index 0000000..e723543 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/plain/email-order-items.php @@ -0,0 +1,113 @@ + $item ) : + if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) { + $product = $item->get_product(); + $sku = ''; + $purchase_note = ''; + + if ( is_object( $product ) ) { + $sku = $product->get_sku(); + $purchase_note = $product->get_purchase_note(); + } + + if ( $email_improvements_enabled ) { + /** + * Email Order Item Name hook. + * + * @since 2.1.0 + * @since 2.4.0 Added $is_visible parameter. + * @param string $product_name Product name. + * @param WC_Order_Item $item Order item object. + * @param bool $is_visible Is item visible. + */ + $product_name = apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ); + /** + * Email Order Item Quantity hook. + * + * @since 2.4.0 + * @param int $quantity Item quantity. + * @param WC_Order_Item $item Item object. + */ + $product_name .= ' × ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item ); + echo wp_kses_post( str_pad( wp_kses_post( $product_name ), 40 ) ); + echo ' '; + echo esc_html( str_pad( wp_kses( $order->get_formatted_line_subtotal( $item ), array() ), 20, ' ', STR_PAD_LEFT ) ) . "\n"; + if ( $show_sku && $sku ) { + echo esc_html( '(#' . $sku . ")\n" ); + } + } else { + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + /** + * Email Order Item Name hook. + * + * @since 2.1.0 + * @since 2.4.0 Added $is_visible parameter. + * @param string $product_name Product name. + * @param WC_Order_Item $item Order item object. + * @param bool $is_visible Is item visible. + */ + echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) ); + if ( $show_sku && $sku ) { + echo ' (#' . $sku . ')'; + } + /** + * Email Order Item Quantity hook. + * + * @since 2.4.0 + * @param int $quantity Item quantity. + * @param WC_Order_Item $item Item object. + */ + echo ' X ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item ); + echo ' = ' . $order->get_formatted_line_subtotal( $item ) . "\n"; + // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped + } + + // allow other plugins to add additional product information here. + do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text ); + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo strip_tags( + wc_display_item_meta( + $item, + array( + 'before' => "\n- ", + 'separator' => "\n- ", + 'after' => '', + 'echo' => false, + 'autop' => false, + ) + ) + ); + + // allow other plugins to add additional product information here. + do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text ); + } + // Note. + if ( $show_purchase_note && $purchase_note ) { + echo "\n" . do_shortcode( wp_kses_post( $purchase_note ) ); + } + echo "\n\n"; +endforeach; diff --git a/wp-content/themes/orgsteklo/woocommerce/global/breadcrumb.php b/wp-content/themes/orgsteklo/woocommerce/global/breadcrumb.php new file mode 100644 index 0000000..fdf1328 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/global/breadcrumb.php @@ -0,0 +1,4 @@ + +> + + + + + +

    + + +

    +

    + + +

    +
    + + + +

    + + + + +

    +

    + +

    + +
    + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/global/quantity-input.php b/wp-content/themes/orgsteklo/woocommerce/global/quantity-input.php new file mode 100644 index 0000000..690f228 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/global/quantity-input.php @@ -0,0 +1,32 @@ + +
    + + + + + id="" + class="" + name="" + value="" + aria-label="" + + size="4" + + min="" + max="" + + step="" + placeholder="" + inputmode="" + autocomplete="" + + /> + + +
    +get_id() ) ) : ''; + +echo apply_filters( + 'woocommerce_loop_add_to_cart_link', // WPCS: XSS ok. + sprintf( + '%s', + esc_url( $product->add_to_cart_url() ), + $aria_describedby, + esc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ), + esc_attr( isset( $args['class'] ) ? $args['class'] : 'button' ), + isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '', + esc_html( $product->add_to_cart_text() ) + ), + $product, + $args +); +?> + + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/header.php b/wp-content/themes/orgsteklo/woocommerce/loop/header.php new file mode 100644 index 0000000..f145ad7 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/header.php @@ -0,0 +1,47 @@ + +
    + +

    + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/loop-end.php b/wp-content/themes/orgsteklo/woocommerce/loop/loop-end.php new file mode 100644 index 0000000..a756c42 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/loop-end.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/loop-start.php b/wp-content/themes/orgsteklo/woocommerce/loop/loop-start.php new file mode 100644 index 0000000..a756c42 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/loop-start.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/no-products-found.php b/wp-content/themes/orgsteklo/woocommerce/loop/no-products-found.php new file mode 100644 index 0000000..f4434d9 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/no-products-found.php @@ -0,0 +1,23 @@ + +
    + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/orderby.php b/wp-content/themes/orgsteklo/woocommerce/loop/orderby.php new file mode 100644 index 0000000..234349e --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/orderby.php @@ -0,0 +1,44 @@ + +
    + + + + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/pagination.php b/wp-content/themes/orgsteklo/woocommerce/loop/pagination.php new file mode 100644 index 0000000..ab90977 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/pagination.php @@ -0,0 +1,51 @@ + + diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/price.php b/wp-content/themes/orgsteklo/woocommerce/loop/price.php new file mode 100644 index 0000000..0ab8598 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/price.php @@ -0,0 +1,27 @@ + + +get_price_html() ) : ?> + + diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/rating.php b/wp-content/themes/orgsteklo/woocommerce/loop/rating.php new file mode 100644 index 0000000..8d9aeb6 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/rating.php @@ -0,0 +1,28 @@ +get_average_rating() ); // WordPress.XSS.EscapeOutput.OutputNotEscaped. diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/result-count.php b/wp-content/themes/orgsteklo/woocommerce/loop/result-count.php new file mode 100644 index 0000000..4a22073 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/result-count.php @@ -0,0 +1,42 @@ + +

    > + %2$s'; + /* translators: 1: total results 2: sorted by */ + printf( _n( 'Showing all %1$d result', 'Showing all %1$d results', $total, 'woocommerce' ) . $orderedby_placeholder, $total, esc_html( $orderedby ) ); + } else { + $first = ( $per_page * $current ) - $per_page + 1; + $last = min( $total, $per_page * $current ); + $orderedby_placeholder = empty( $orderedby ) ? '%4$s' : '%4$s'; + /* translators: 1: first result 2: last result 3: total results 4: sorted by */ + printf( _nx( 'Showing %1$d–%2$d of %3$d result', 'Showing %1$d–%2$d of %3$d results', $total, 'with first and last result', 'woocommerce' ) . $orderedby_placeholder, $first, $last, $total, esc_html( $orderedby ) ); + } + // phpcs:enable WordPress.Security + ?> +

    diff --git a/wp-content/themes/orgsteklo/woocommerce/loop/sale-flash.php b/wp-content/themes/orgsteklo/woocommerce/loop/sale-flash.php new file mode 100644 index 0000000..b1186ad --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/loop/sale-flash.php @@ -0,0 +1,32 @@ + +is_on_sale() ) : ?> + + ' . esc_html__( 'Sale!', 'woocommerce' ) . '', $post, $product ); ?> + + +
    + +
    +
    + +
    +

    Пользователь

    + + +
    +
    + + display_name); + $email = esc_attr($current_user->user_email); + $phone = esc_attr(get_user_meta($current_user->ID, 'billing_phone', true)); + ?> +
    +

    Профиль

    +
    +
    +

    Контактные данные

    +
    +
    + +
    +
    + +
    +
    + +

    Подтверждено

    '; + } + else { + echo ''; + } + ?> +

    Подтверждение почты обязательно, без этого вы не сможете оформить заказ

    +
    +
    +
    +
    +

    Смена пароля

    +
    +
    +
    + + +

    Длина пароля не менее 6 символов.

    +
    +
    + + +
    +
    +
    + + +
    +
    + + + display_name); + $email = esc_attr($current_user->user_email); + $phone = esc_attr(get_user_meta($current_user->ID, 'billing_phone', true)); + $company_name = esc_attr(get_user_meta($current_user->ID, 'company_name', true)); + $inn = esc_attr(get_user_meta($current_user->ID, 'inn', true)); + $kpp = esc_attr(get_user_meta($current_user->ID, 'kpp', true)); + $legal_address = esc_attr(get_user_meta($current_user->ID, 'legal_address', true)); + $actual_address = esc_attr(get_user_meta($current_user->ID, 'actual_address', true)); + ?> + + + +

    Профиль

    +
    +
    +

    Данные организации или ИП

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

    Контактные данные

    +
    +
    + +
    +
    + +
    +
    + +

    Подтверждено

    '; + } + else { + echo ''; + } + ?> +

    Подтверждение почты обязательно, без этого вы не сможете оформить заказ

    +
    +
    +
    +
    +

    Смена пароля

    +
    +
    +
    + + +

    Длина пароля не менее 6 символов.

    +
    +
    + + +
    +
    +
    + + +
    +
    + + + + + + + Выйти + + +
    +
    + + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/downloads.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/downloads.php new file mode 100644 index 0000000..95c6b47 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/downloads.php @@ -0,0 +1,47 @@ +customer->get_downloadable_products(); +$has_downloads = (bool) $downloads; + +do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?> + + + + + + + + + + + + ' . esc_html__( 'Browse products', 'woocommerce' ) . '', 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment + ?> + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/form-add-payment-method.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-add-payment-method.php new file mode 100644 index 0000000..35d1da9 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-add-payment-method.php @@ -0,0 +1,61 @@ +payment_gateways->get_available_payment_gateways(); + +if ( $available_gateways ) : ?> +
    +
    +
      + set_current(); + } + + foreach ( $available_gateways as $gateway ) { + ?> +
    • + chosen, true ); ?> /> + + has_fields() || $gateway->get_description() ) { + echo ''; + } + ?> +
    • + +
    + + + +
    + + + +
    +
    + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/form-edit-account.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-edit-account.php new file mode 100644 index 0000000..cf43538 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-edit-account.php @@ -0,0 +1,99 @@ + + + + > + + + +

    + + +

    +

    + + +

    +
    + +

    + + +

    +
    + +

    + + +

    + + + +
    + + +

    + + +

    +

    + + +

    +

    + + +

    +
    +
    + + + +

    + + + +

    + + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/form-edit-address.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-edit-address.php new file mode 100644 index 0000000..f097d3f --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-edit-address.php @@ -0,0 +1,56 @@ + + + + + + +
    + +

    + +
    + + +
    + $field ) { + woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) ); + } + ?> +
    + + + +

    + + + +

    +
    + + + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/form-login.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-login.php new file mode 100644 index 0000000..c31c856 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-login.php @@ -0,0 +1,119 @@ + + + + +
    + +
    + + + +

    + + + + + +

    + + +

    +

    + + +

    + + + +

    + + + +

    +

    + +

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

    + +
    > + + + + + +

    + + +

    + + + +

    + + +

    + + + +

    + + +

    + + + +

    + + + + + +

    + + +

    + + + + + +
    + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/form-lost-password.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-lost-password.php new file mode 100644 index 0000000..8568028 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/form-lost-password.php @@ -0,0 +1,45 @@ + + +
    + +

    + +

    + + +

    + +
    + + + +

    + + +

    + + + + + + +
    + +

    + +

    + + +

    +

    + + +

    + + + + +
    + + + +

    + + +

    + + + + + + + + +

    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/my-account.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/my-account.php new file mode 100644 index 0000000..f5f41af --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/my-account.php @@ -0,0 +1,36 @@ + + +
    + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/my-address.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/my-address.php new file mode 100644 index 0000000..5bd5a97 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/my-address.php @@ -0,0 +1,93 @@ + __( 'Billing address', 'woocommerce' ), + 'shipping' => __( 'Shipping address', 'woocommerce' ), + ), + $customer_id + ); +} else { + $get_addresses = apply_filters( + 'woocommerce_my_account_get_addresses', + array( + 'billing' => __( 'Billing address', 'woocommerce' ), + ), + $customer_id + ); +} + +$oldcol = 1; +$col = 1; +?> + +

    + +

    + + +
    + + + $address_title ) : ?> + + +
    +
    +

    + + + +
    +
    + +
    +
    + + + + +
    + customer->get_downloadable_products(); + +if ( $downloads ) : ?> + + + +

    + +
      + +
    • + ' . sprintf( _n( '%s download remaining', '%s downloads remaining', $download['downloads_remaining'], 'woocommerce' ), $download['downloads_remaining'] ) . ' ', $download ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + echo apply_filters( 'woocommerce_available_download_link', '' . $download['download_name'] . '', $download ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + + do_action( 'woocommerce_available_download_end', $download ); + ?> +
    • + +
    + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/my-orders.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/my-orders.php new file mode 100644 index 0000000..7b632f3 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/my-orders.php @@ -0,0 +1,85 @@ + esc_html__( 'Order', 'woocommerce' ), + 'order-date' => esc_html__( 'Date', 'woocommerce' ), + 'order-status' => esc_html__( 'Status', 'woocommerce' ), + 'order-total' => esc_html__( 'Total', 'woocommerce' ), + 'order-actions' => ' ', + ) +); +$customer_orders = get_posts( + apply_filters( + 'woocommerce_my_account_my_orders_query', + array( + 'numberposts' => $order_count, + 'meta_key' => '_customer_user', + 'meta_value' => get_current_user_id(), + 'post_type' => wc_get_order_types( 'view-orders' ), + 'post_status' => array_keys( wc_get_order_statuses() ), + ) + ) +); +if ( $customer_orders ) : ?> + +

    + +
    +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/email-mobile-messaging.php b/wp-content/themes/orgsteklo/woocommerce/emails/email-mobile-messaging.php new file mode 100644 index 0000000..ad7a45d --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/email-mobile-messaging.php @@ -0,0 +1,20 @@ + + +

    + get_edit_order_url() ) . '">'; + $after = ''; + } else { + $before = ''; + $after = ''; + } + if ( $email_improvements_enabled ) { + echo '
    '; + } + /* translators: %s: Order ID. */ + $order_number_string = __( '[Order #%s]', 'woocommerce' ); + if ( $email_improvements_enabled ) { + /* translators: %s: Order ID. */ + $order_number_string = __( 'Order #%s', 'woocommerce' ); + } + echo wp_kses_post( $before . sprintf( $order_number_string . $after . ' ()', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) ); + if ( $email_improvements_enabled ) { + echo ''; + } + ?> +

    + +
    + + + + + + + + + + + + $sent_to_admin, + 'show_image' => $email_improvements_enabled, + 'image_size' => array( $image_size, $image_size ), + 'plain_text' => $plain_text, + 'sent_to_admin' => $sent_to_admin, + ) + ); + ?> + + + get_order_item_totals(); + $item_totals_count = count( $item_totals ); + + if ( $item_totals ) { + $i = 0; + foreach ( $item_totals as $total ) { + $i++; + $last_class = ( $i === $item_totals_count ) ? ' order-totals-last' : ''; + ?> + + + + + get_customer_note() && ! $email_improvements_enabled ) { + ?> + + + + + get_customer_note() && $email_improvements_enabled ) { + ?> + + + + + +
    + +
    get_customer_note() ) ), array() ); ?>
    +
    + get_customer_note() ) ), array( 'br' => array() ) ); ?> +
    +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/emails/email-order-items.php b/wp-content/themes/orgsteklo/woocommerce/emails/email-order-items.php new file mode 100644 index 0000000..c904056 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/emails/email-order-items.php @@ -0,0 +1,218 @@ + $item ) : + $product = $item->get_product(); + $sku = ''; + $purchase_note = ''; + $image = ''; + + if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) { + continue; + } + + if ( is_object( $product ) ) { + $sku = $product->get_sku(); + $purchase_note = $product->get_purchase_note(); + $image = $product->get_image( $image_size ); + } + + ?> +
    + + + + ' . wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) ) . ''; + } + ?> + + +
    + get_name(), $item, false ) ); + + // SKU. + if ( $show_sku && $sku ) { + echo wp_kses_post( ' (#' . $sku . ')' ); + } + + /** + * Allow other plugins to add additional product information. + * + * @param int $item_id The item ID. + * @param WC_Order_Item_Product $item The item object. + * @param WC_Order $order The order object. + * @param bool $plain_text Whether the email is plain text or not. + * @since 2.3.0 + */ + do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text ); + + $item_meta = wc_display_item_meta( + $item, + array( + 'before' => '', + 'after' => '', + 'separator' => '
    ', + 'echo' => false, + 'label_before' => '', + 'label_after' => ': ', + ) + ); + echo ''; + + /** + * Allow other plugins to add additional product information. + * + * @param int $item_id The item ID. + * @param WC_Order_Item_Product $item The item object. + * @param WC_Order $order The order object. + * @param bool $plain_text Whether the email is plain text or not. + * @since 2.3.0 + */ + do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text ); + + ?> +
    + get_name(), $item, false ) ); + + // SKU. + if ( $show_sku && $sku ) { + echo wp_kses_post( ' (#' . $sku . ')' ); + } + + /** + * Allow other plugins to add additional product information. + * + * @param int $item_id The item ID. + * @param WC_Order_Item_Product $item The item object. + * @param WC_Order $order The order object. + * @param bool $plain_text Whether the email is plain text or not. + * @since 2.3.0 + */ + do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text ); + + wc_display_item_meta( + $item, + array( + 'label_before' => '', + ) + ); + + /** + * Allow other plugins to add additional product information. + * + * @param int $item_id The item ID. + * @param WC_Order_Item_Product $item The item object. + * @param WC_Order $order The order object. + * @param bool $plain_text Whether the email is plain text or not. + * @since 2.3.0 + */ + do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text ); + } + ?> +
    + get_quantity(); + $refunded_qty = $order->get_qty_refunded_for_item( $item_id ); + + if ( $refunded_qty ) { + $qty_display = '' . esc_html( $qty ) . ' ' . esc_html( $qty - ( $refunded_qty * -1 ) ) . ''; + } else { + $qty_display = esc_html( $qty ); + } + echo wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item ) ); + ?> + + get_formatted_line_subtotal( $item ) ); ?> +
    + +
    + + + + $column_name ) : ?> + + + + + + + get_item_count(); + ?> + + $column_name ) : ?> + + + + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/navigation.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/navigation.php new file mode 100644 index 0000000..d453627 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/navigation.php @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/orders.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/orders.php new file mode 100644 index 0000000..1b85154 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/orders.php @@ -0,0 +1,165 @@ + +
    + +
    +
    + +
    +

    Пользователь

    + + +
    + + + + + + $column_name ) : ?> + + + + + + + orders as $customer_order ) { + $order = wc_get_order( $customer_order ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + $item_count = $order->get_item_count() - $order->get_item_count_refunded(); + ?> + + $column_name ) : + $is_order_number = 'order-number' === $column_id; + ?> + + + + + + + + + + + + max_num_pages ) : ?> +
    + + + + + max_num_pages ) !== $current_page ) : ?> + + +
    + + +
    +
    +

    История заказов

    +
    +

    Заказов пока нет

    +

    На этой странице будут отображаться ваши заказы.

    + + Перейти в каталог + + +
    +
    +
    + + + + + Выйти + +
    +
    +
    \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/payment-methods.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/payment-methods.php new file mode 100644 index 0000000..46b629e --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/payment-methods.php @@ -0,0 +1,78 @@ + + + + + + + + $column_name ) : ?> + + + + + $methods ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited ?> + + + $column_name ) : ?> + + + + + + + + + + + + + + + +payment_gateways->get_available_payment_gateways() ) : ?> + + diff --git a/wp-content/themes/orgsteklo/woocommerce/myaccount/view-order.php b/wp-content/themes/orgsteklo/woocommerce/myaccount/view-order.php new file mode 100644 index 0000000..7be11e2 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/myaccount/view-order.php @@ -0,0 +1,56 @@ +get_customer_order_notes(); +?> +

    +' . $order->get_order_number() . '', // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + '' . wc_format_datetime( $order->get_date_created() ) . '', // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + '' . wc_get_order_status_name( $order->get_status() ) . '' // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped +); +?> +

    + + +

    +
      + +
    1. +
      +
      +

      comment_date ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>

      +
      + comment_content ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> +
      +
      +
      +
      +
      +
    2. + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/notices/error.php b/wp-content/themes/orgsteklo/woocommerce/notices/error.php new file mode 100644 index 0000000..c72179d --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/notices/error.php @@ -0,0 +1,34 @@ + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/notices/notice.php b/wp-content/themes/orgsteklo/woocommerce/notices/notice.php new file mode 100644 index 0000000..39cc00a --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/notices/notice.php @@ -0,0 +1,32 @@ + + + +
    > + +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/notices/success.php b/wp-content/themes/orgsteklo/woocommerce/notices/success.php new file mode 100644 index 0000000..5a06a13 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/notices/success.php @@ -0,0 +1,32 @@ + + + +
    role="alert"> + +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/order/attribution-details.php b/wp-content/themes/orgsteklo/woocommerce/order/attribution-details.php new file mode 100644 index 0000000..7b5231f --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/order/attribution-details.php @@ -0,0 +1,140 @@ + + +
    + + +

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

    + + + + + + +

    + +

    + + + + + + +

    + +

    + + + + + + +

    + +

    + + + + + + +

    + +

    + + + + + + +

    + +

    + + + + + + +

    + +

    + + + + + +
    + + +

    + + + + + + +

    + +

    + + + + + +
    +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/order/customer-history.php b/wp-content/themes/orgsteklo/woocommerce/order/customer-history.php new file mode 100644 index 0000000..62a3c5a --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/order/customer-history.php @@ -0,0 +1,59 @@ + + +
    +

    + +

    + + + + + +

    + +

    + + + + +

    + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/order/form-tracking.php b/wp-content/themes/orgsteklo/woocommerce/order/form-tracking.php new file mode 100644 index 0000000..7a83573 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/order/form-tracking.php @@ -0,0 +1,61 @@ + + +
    + + + +

    + +

    +

    +
    + + + +

    + + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/order/order-again.php b/wp-content/themes/orgsteklo/woocommerce/order/order-again.php new file mode 100644 index 0000000..2dd19fc --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/order/order-again.php @@ -0,0 +1,23 @@ + + +

    + +

    diff --git a/wp-content/themes/orgsteklo/woocommerce/order/order-details-customer.php b/wp-content/themes/orgsteklo/woocommerce/order/order-details-customer.php new file mode 100644 index 0000000..bc2b0eb --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/order/order-details-customer.php @@ -0,0 +1,88 @@ +needs_shipping_address(); +?> +
    + + + +
    +
    + + + +

    + +
    + get_formatted_billing_address( esc_html__( 'N/A', 'woocommerce' ) ) ); ?> + + get_billing_phone() ) : ?> +

    get_billing_phone() ); ?>

    + + + get_billing_email() ) : ?> + + + + +
    + + + +
    + +
    +

    +
    + get_formatted_shipping_address( esc_html__( 'N/A', 'woocommerce' ) ) ); ?> + + get_shipping_phone() ) : ?> +

    get_shipping_phone() ); ?>

    + + + +
    +
    + +
    + + + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/order/order-details-item.php b/wp-content/themes/orgsteklo/woocommerce/order/order-details-item.php new file mode 100644 index 0000000..7ee07d6 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/order/order-details-item.php @@ -0,0 +1,68 @@ + +
    + is_visible(); + $product_permalink = apply_filters( 'woocommerce_order_item_permalink', $is_visible ? $product->get_permalink( $item ) : '', $item, $order ); + + echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $product_permalink ? sprintf( '%s', $product_permalink, $item->get_name() ) : $item->get_name(), $item, $is_visible ) ); + + $qty = $item->get_quantity(); + $refunded_qty = $order->get_qty_refunded_for_item( $item_id ); + + if ( $refunded_qty ) { + $qty_display = '' . esc_html( $qty ) . ' ' . esc_html( $qty - ( $refunded_qty * -1 ) ) . ''; + } else { + $qty_display = esc_html( $qty ); + } + + echo apply_filters( 'woocommerce_order_item_quantity_html', ' ' . sprintf( '× %s', $qty_display ) . '', $item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + + do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, false ); + + wc_display_item_meta( $item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + + do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, false ); + ?> + + get_formatted_line_subtotal( $item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> +
    + + + + + + + + + + $item ) { + $product = $item->get_product(); + + wc_get_template( + 'order/order-details-item.php', + array( + 'order' => $order, + 'item_id' => $item_id, + 'item' => $item, + 'show_purchase_note' => $show_purchase_note, + 'purchase_note' => $product ? $product->get_purchase_note() : '', + 'product' => $product, + ) + ); + } + + do_action( 'woocommerce_order_details_after_order_table_items', $order ); + ?> + + + + + + + + + + + + get_order_item_totals() as $key => $total ) { + ?> + + + + + + get_customer_note() ) : ?> + + + + + + +
    : + $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + if ( empty( $action['aria-label'] ) ) { + // Generate the aria-label based on the action name. + /* translators: %1$s Action name, %2$s Order number. */ + $action_aria_label = sprintf( __( '%1$s order number %2$s', 'woocommerce' ), $action['name'], $order->get_order_number() ); + } else { + $action_aria_label = $action['aria-label']; + } + echo '' . esc_html( $action['name'] ) . ''; + unset( $action_aria_label ); + } + ?> +
    get_customer_note() ) ), array( 'br' => array() ) ); ?>
    + + + + + $order ) ); +} diff --git a/wp-content/themes/orgsteklo/woocommerce/order/order-downloads.php b/wp-content/themes/orgsteklo/woocommerce/order/order-downloads.php new file mode 100644 index 0000000..9530724 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/order/order-downloads.php @@ -0,0 +1,73 @@ + +
    + +

    + + + + + + $column_name ) : ?> + + + + + + + + $column_name ) : ?> + + + + +
    + ' . esc_html( $download['product_name'] ) . ''; + } else { + echo esc_html( $download['product_name'] ); + } + break; + case 'download-file': + echo '' . esc_html( $download['download_name'] ) . ''; + break; + case 'download-remaining': + echo is_numeric( $download['downloads_remaining'] ) ? esc_html( $download['downloads_remaining'] ) : esc_html__( '∞', 'woocommerce' ); + break; + case 'download-expires': + if ( ! empty( $download['access_expires'] ) ) { + echo ''; + } else { + esc_html_e( 'Never', 'woocommerce' ); + } + break; + } + } + ?> +
    +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/order/tracking.php b/wp-content/themes/orgsteklo/woocommerce/order/tracking.php new file mode 100644 index 0000000..f8d00e2 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/order/tracking.php @@ -0,0 +1,60 @@ +get_customer_order_notes(); +?> + +

    + ' . $order->get_order_number() . '', + '' . wc_format_datetime( $order->get_date_created() ) . '', + '' . wc_get_order_status_name( $order->get_status() ) . '' + ) + ) + ); + ?> +

    + + +

    +
      + +
    1. +
      +
      +

      comment_date ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>

      +
      + comment_content ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> +
      +
      +
      +
      +
      +
    2. + +
    + + +get_id() ); ?> diff --git a/wp-content/themes/orgsteklo/woocommerce/parts/checkout-header.html b/wp-content/themes/orgsteklo/woocommerce/parts/checkout-header.html new file mode 100644 index 0000000..41c3bf5 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/parts/checkout-header.html @@ -0,0 +1,9 @@ + +
    + +
    + +
    + +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/parts/coming-soon-social-links.html b/wp-content/themes/orgsteklo/woocommerce/parts/coming-soon-social-links.html new file mode 100644 index 0000000..2f2f4b2 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/parts/coming-soon-social-links.html @@ -0,0 +1,7 @@ + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/parts/external-product-add-to-cart-with-options.html b/wp-content/themes/orgsteklo/woocommerce/parts/external-product-add-to-cart-with-options.html new file mode 100644 index 0000000..c04434b --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/parts/external-product-add-to-cart-with-options.html @@ -0,0 +1,3 @@ + +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/parts/grouped-product-add-to-cart-with-options.html b/wp-content/themes/orgsteklo/woocommerce/parts/grouped-product-add-to-cart-with-options.html new file mode 100644 index 0000000..6998ff8 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/parts/grouped-product-add-to-cart-with-options.html @@ -0,0 +1,29 @@ + +
    + +
    + +
    + + + + + +
    + +
    + +
    + + +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/parts/mini-cart.html b/wp-content/themes/orgsteklo/woocommerce/parts/mini-cart.html new file mode 100644 index 0000000..a6690b6 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/parts/mini-cart.html @@ -0,0 +1,49 @@ + +
    + +
    + +
    + +
    +
    + + + +
    +
    + +
    + + +
    + +
    +
    + +
    + + + + +
    + + + +
    + + + +
    + +
    + +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/parts/simple-product-add-to-cart-with-options.html b/wp-content/themes/orgsteklo/woocommerce/parts/simple-product-add-to-cart-with-options.html new file mode 100644 index 0000000..3f7b4ab --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/parts/simple-product-add-to-cart-with-options.html @@ -0,0 +1,4 @@ + +
    +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/parts/variable-product-add-to-cart-with-options.html b/wp-content/themes/orgsteklo/woocommerce/parts/variable-product-add-to-cart-with-options.html new file mode 100644 index 0000000..d8f353b --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/parts/variable-product-add-to-cart-with-options.html @@ -0,0 +1,5 @@ + + +
    +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/product-form/simple.php b/wp-content/themes/orgsteklo/woocommerce/product-form/simple.php new file mode 100644 index 0000000..ea4966b --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/product-form/simple.php @@ -0,0 +1,31 @@ + + +
    +
    + +
    + + + +
    + +
    +
    + diff --git a/wp-content/themes/orgsteklo/woocommerce/product-searchform.php b/wp-content/themes/orgsteklo/woocommerce/product-searchform.php new file mode 100644 index 0000000..3a2fdb6 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/product-searchform.php @@ -0,0 +1,28 @@ + + diff --git a/wp-content/themes/orgsteklo/woocommerce/shop.php b/wp-content/themes/orgsteklo/woocommerce/shop.php new file mode 100644 index 0000000..0f43e55 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/shop.php @@ -0,0 +1,289 @@ + + +
    + + +
    +
    +
    +

    Каталог

    +
    + term_id; + } + $exclude_term = get_term_by('name', 'Misc', 'product_cat'); + $exclude_id = $exclude_term ? $exclude_term->term_id : 0; + $args = array( + 'taxonomy' => 'product_cat', + 'hide_empty' => false, + 'parent' => $parent_id, + 'exclude' => array($exclude_id), + 'orderby' => 'menu_order', + 'order' => 'ASC', + ); + $categories = get_terms($args); + foreach ($categories as $category) { + $children = get_terms(array( + 'taxonomy' => 'product_cat', + 'hide_empty' => false, + 'parent' => $category->term_id, + )); + $has_children = !empty($children); + $is_active = ($category->term_id == $current_cat_id) || term_is_ancestor_of($category->term_id, $current_cat_id, 'product_cat'); + echo '
    '; + echo ''; + if ($has_children) { + echo '
    '; + foreach ($children as $child) { + $grandchildren = get_terms(array( + 'taxonomy' => 'product_cat', + 'hide_empty' => false, + 'parent' => $child->term_id, + )); + $has_grandchildren = !empty($grandchildren); + $is_child_active = ($child->term_id == $current_cat_id) || term_is_ancestor_of($child->term_id, $current_cat_id, 'product_cat'); + echo '
    '; + echo '
    '; + echo '' . esc_html($child->name) . ''; + if ($has_grandchildren) { + echo ''; + } + echo '
    '; + if ($has_grandchildren) { + echo '
    '; + foreach ($grandchildren as $grandchild) { + $is_grand_active = $grandchild->term_id == $current_cat_id; + echo ''; + echo esc_html($grandchild->name) . ''; + } + echo '
    '; + } + echo '
    '; + } + echo '
    '; + } + echo '
    '; + } + } + ?> + +
    +
    + term_id ) ) { + $child_categories = get_terms(array( + 'taxonomy' => 'product_cat', + 'parent' => $current_category->term_id, + 'hide_empty' => false, + )); + } + + if ( !empty($child_categories) ) { + // Только подкатегории, без товаров в этой категории + ?> +
    +

    +
    + term_id, 'thumbnail_id', true); + $image_url = wp_get_attachment_url($thumbnail_id); + $description = term_description($child_category->term_id, 'product_cat'); + echo '
    '; + if($image_url) { + echo ''; + echo '' . esc_attr($child_category->name) . ''; + echo ''; + } + echo '
    '; + echo '' . esc_html($child_category->name) . ''; + if($description) { + echo '

    ' . $description . '

    '; + } + echo 'Перейти в раздел'; + echo '
    '; + echo '
    '; + } + ?> +
    +
    + +
    +
    +

    +
    + + +
    +
    +
    + '; + woocommerce_product_loop_start(); + if (wc_get_loop_prop('total')) { + while (have_posts()) { + the_post(); + wc_get_template_part('content', 'product'); + } + } + woocommerce_product_loop_end(); + echo '
    '; + + echo '
    '; + $current_per_page = isset($_GET['per_page']) ? sanitize_text_field($_GET['per_page']) : '12'; + $current_label = ($current_per_page === 'all') ? 'Все' : intval($current_per_page); + $check_svg = ''; + $per_page_options = array('12', '24', '48', 'all'); + $per_page_labels = array('12' => '12', '24' => '24', '48' => '48', 'all' => 'Все'); + echo '

    Количество товаров на странице:

    '; + echo ''; + echo '
    '; + foreach ($per_page_options as $opt) { + $is_active = ($opt === $current_per_page) ? ' active' : ''; + echo ''; + } + echo '
    '; + echo '
    '; + echo '
    '; + the_posts_pagination(array( + 'prev_text' => '', // SVG для стрелки назад + 'next_text' => '', // SVG для стрелки вперед + 'before_page_number' => '', + 'after_page_number' => '', + )); + echo '
    '; + global $wp_query; + $total_products = $wp_query->found_posts; + echo '

    ' . $wp_query->post_count . ' товаров из ' . $total_products . '

    '; + echo '
    '; + + // Счетчик товаров + + + echo '
    '; + + do_action('woocommerce_after_shop_loop'); +} else { + do_action('woocommerce_no_products_found'); +} +?> +
    +
    + + +
    + +
    + + +
    + +
    +
    +

    Продукция

    +
    +
    + 'product_cat', + 'parent' => 0, + 'hide_empty' => false, + ]); + if (!empty($categories) && !is_wp_error($categories)) { + foreach ($categories as $category) { + if ($category->name === 'Misc') { + continue; + } + $thumb_id = get_term_meta($category->term_id, 'thumbnail_id', true); + $thumb_url = $thumb_id ? wp_get_attachment_image_url($thumb_id, 'full') : '/wp-content/uploads/woocommerce-placeholder.png'; + $term_link = get_term_link($category); + ?> + + +
    +
    +
    +
    + +
    + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product-reviews.php b/wp-content/themes/orgsteklo/woocommerce/single-product-reviews.php new file mode 100644 index 0000000..55e9c88 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product-reviews.php @@ -0,0 +1,147 @@ + +
    +
    +

    + get_review_count(); + if ( $count && wc_review_ratings_enabled() ) { + /* translators: 1: reviews count 2: product name */ + $reviews_title = sprintf( esc_html( _n( '%1$s review for %2$s', '%1$s reviews for %2$s', $count, 'woocommerce' ) ), esc_html( $count ), '' . get_the_title() . '' ); + echo apply_filters( 'woocommerce_reviews_title', $reviews_title, $count, $product ); // WPCS: XSS ok. + } else { + esc_html_e( 'Reviews', 'woocommerce' ); + } + ?> +

    + + +
      + 'woocommerce_comments' ) ) ); ?> +
    + + 1 && get_option( 'page_comments' ) ) : + echo ''; + endif; + ?> + +

    + +
    + + get_id() ) ) : ?> +
    +
    + have_comments() ? esc_html__( 'Add a review', 'woocommerce' ) : sprintf( esc_html__( 'Be the first to review “%s”', 'woocommerce' ), get_the_title() ), + /* translators: %s is product title */ + 'title_reply_to' => esc_html__( 'Leave a Reply to %s', 'woocommerce' ), + 'title_reply_before' => '', + 'title_reply_after' => '', + 'comment_notes_after' => '', + 'label_submit' => esc_html__( 'Submit', 'woocommerce' ), + 'logged_in_as' => '', + 'comment_field' => '', + ); + + $name_email_required = (bool) get_option( 'require_name_email', 1 ); + $fields = array( + 'author' => array( + 'label' => __( 'Name', 'woocommerce' ), + 'type' => 'text', + 'value' => $commenter['comment_author'], + 'required' => $name_email_required, + 'autocomplete' => 'name', + ), + 'email' => array( + 'label' => __( 'Email', 'woocommerce' ), + 'type' => 'email', + 'value' => $commenter['comment_author_email'], + 'required' => $name_email_required, + 'autocomplete' => 'email', + ), + ); + + $comment_form['fields'] = array(); + + foreach ( $fields as $key => $field ) { + $field_html = '

    '; + $field_html .= '

    '; + + $comment_form['fields'][ $key ] = $field_html; + } + + $account_page_url = wc_get_page_permalink( 'myaccount' ); + if ( $account_page_url ) { + /* translators: %s opening and closing link tags respectively */ + $comment_form['must_log_in'] = ''; + } + + if ( wc_review_ratings_enabled() ) { + $comment_form['comment_field'] = '
    '; + } + + $comment_form['comment_field'] .= '

    '; + + comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) ); + ?> +
    +
    + +

    + + +
    +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product.php b/wp-content/themes/orgsteklo/woocommerce/single-product.php new file mode 100644 index 0000000..08e6d93 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product.php @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + +
    + + + + + + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/grouped.php b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/grouped.php new file mode 100644 index 0000000..7c9103a --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/grouped.php @@ -0,0 +1,145 @@ + + +
    + + + get_id() ); + $quantites_required = $quantites_required || ( $grouped_product_child->is_purchasable() && ! $grouped_product_child->has_options() ); + $post = $post_object; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + setup_postdata( $post ); + + if ( $grouped_product_child->is_in_stock() ) { + $show_add_to_cart_button = true; + } + + echo ''; + + // Output columns for each product. + foreach ( $grouped_product_columns as $column_id ) { + do_action( 'woocommerce_grouped_product_list_before_' . $column_id, $grouped_product_child ); + + switch ( $column_id ) { + case 'quantity': + ob_start(); + + if ( ! $grouped_product_child->is_purchasable() || $grouped_product_child->has_options() || ! $grouped_product_child->is_in_stock() ) { + woocommerce_template_loop_add_to_cart(); + } elseif ( $grouped_product_child->is_sold_individually() ) { + echo ''; + echo ''; + + } else { + do_action( 'woocommerce_before_add_to_cart_quantity' ); + + woocommerce_quantity_input( + array( + 'input_name' => 'quantity[' . $grouped_product_child->get_id() . ']', + 'input_value' => isset( $_POST['quantity'][ $grouped_product_child->get_id() ] ) ? wc_stock_amount( wc_clean( wp_unslash( $_POST['quantity'][ $grouped_product_child->get_id() ] ) ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification.Missing + 'min_value' => apply_filters( 'woocommerce_quantity_input_min', 0, $grouped_product_child ), + 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $grouped_product_child->get_max_purchase_quantity(), $grouped_product_child ), + 'placeholder' => '0', + ) + ); + + do_action( 'woocommerce_after_add_to_cart_quantity' ); + } + + $value = ob_get_clean(); + break; + case 'label': + $value = ''; + break; + case 'price': + $value = $grouped_product_child->get_price_html() . wc_get_stock_html( $grouped_product_child ); + break; + default: + $value = ''; + break; + } + + echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + + do_action( 'woocommerce_grouped_product_list_after_' . $column_id, $grouped_product_child ); + } + + echo ''; + } + $post = $previous_post; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + setup_postdata( $post ); + + do_action( 'woocommerce_grouped_product_list_after', $grouped_product_columns, $quantites_required, $product ); + ?> + +
    ' . apply_filters( 'woocommerce_grouped_product_list_column_' . $column_id, $value, $grouped_product_child ) . '
    + + + + + + + + + + + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/orgsteklo-calculator.php b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/orgsteklo-calculator.php new file mode 100644 index 0000000..604042d --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/orgsteklo-calculator.php @@ -0,0 +1,380 @@ +get_id(); +$table_number = get_post_meta( $product_id, '_orgsteklo_price_table', true ); + +if ( empty( $table_number ) ) { + return; +} + +// Получаем доступные толщины +$thicknesses = orgsteklo_get_available_thicknesses( $product_id ); + +if ( empty( $thicknesses ) ) { + echo '

    Ошибка: не настроены параметры для расчета цен.

    '; + return; +} + +do_action( 'woocommerce_before_add_to_cart_form' ); +?> + + + +
    + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +

    Стандартные размеры листа:

    +
    +
    + Ширина**: + мм +
    +
    + Длина**: + мм +
    +
    +
    + +
    + Стоимость 1 листа**: + + ₽ + + +
    + +
    + Вес 1 листа**: + + кг + +
    + +
    + Стоимость 1 кг: + + ₽ + + +
    + +
    + Вес 1 м²: + + кг + +
    + +
    + Стоимость 1 м²: + + ₽ + + +
    + +
    + +
    +

    + *Выберите толщину листа и задайте нужные размеры – ширину и длину +

    +
    +

    + **Указаны значения для листа стандартного размера +

    + +
    + +
    + + +
    +

    Стоимость 1 листа заданных размеров:

    +

    + + +

    +
    + + +
    +

    Количество

    +
    + + + +
    +
    + + +
    +
    +

    Вес заказа:

    +

    кг

    +
    +
    +

    Стоимость заказа:

    +
    +

    + +
    +
    +
    + + + + + + + + +
    + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/simple.php b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/simple.php new file mode 100644 index 0000000..e1d50d7 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/simple.php @@ -0,0 +1,94 @@ +get_id(), '_orgsteklo_important_text', true ); +if ( ! empty( $important_text ) ) : +?> + +
    + +
    +is_purchasable() ) { + return; +} +echo wc_get_stock_html( $product ); + +if ( $product->is_in_stock() ) : ?> +get_weight(); + +if ( $weight ) { + echo '
    ' . esc_html( $weight ) . '
    '; +} + +// Скрытый элемент с чистыми ценами для JavaScript калькулятора +// Округляем до целых чтобы совпадало с расчётом корзины WooCommerce +$price = round( (float) $product->get_price() ); +$regular_price = round( (float) $product->get_regular_price() ); +?> + + + + +
    +
    +

    Количество

    + apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ), + 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ), + 'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(), // WPCS: CSRF ok, input var ok. + ) + ); + + do_action( 'woocommerce_after_add_to_cart_quantity' ); + ?> +
    +
    +
    +

    Вес заказа:

    +

    0.000 кг

    +
    +
    +

    Стоимость заказа:

    +
    +

    0

    + +
    +
    + +
    + + + + +
    + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/variable.php b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/variable.php new file mode 100644 index 0000000..27fc2bf --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/variable.php @@ -0,0 +1,83 @@ +get_id(), '_orgsteklo_price_table', true ); +if ( ! empty( $table_number ) ) { + // Используем шаблон калькулятора вместо стандартного variable + wc_get_template( 'single-product/add-to-cart/orgsteklo-calculator.php' ); + return; +} + +$attribute_keys = array_keys( $attributes ); +$variations_json = wp_json_encode( $available_variations ); +$variations_attr = function_exists( 'wc_esc_json' ) ? wc_esc_json( $variations_json ) : _wp_specialchars( $variations_json, ENT_QUOTES, 'UTF-8', true ); +do_action( 'woocommerce_before_add_to_cart_form' ); +?> + +
    + + + + + + + + + +

    + + + + $options ) : ?> + + + + + + + + + + + + +
    +get_id(), '_orgsteklo_important_text', true ); + if ( ! empty( $important_text ) ) : +?> +
    + +
    + +
    +

    Количество

    + apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ), + 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ), + 'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(), // WPCS: CSRF ok, input var ok. + ) + ); + do_action( 'woocommerce_after_add_to_cart_quantity' ); + ?> +
    +
    +
    +

    Вес заказа:

    +

    0.000 кг

    +
    +
    +

    Стоимость заказа:

    +
    +

    0

    + +
    +
    + + + + + +
    + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/variation.php b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/variation.php new file mode 100644 index 0000000..ed449ec --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/add-to-cart/variation.php @@ -0,0 +1,41 @@ + + +get_id()); + +// Скрываем "Вес 1 шт" если: +// 1. Шаблон товара = "Клей" (вес как атрибут вариации) +// 2. Или товар имеет атрибут pa_ves (вес как атрибут вариации) +$has_weight_attribute = false; +if ( $product && $product->is_type('variable') ) { + $attrs = $product->get_attributes(); + foreach ( $attrs as $attr ) { + $attr_name = $attr->get_name(); + if ( $attr_name === 'pa_ves' || stripos( $attr_name, 'ves' ) !== false ) { + $has_weight_attribute = true; + break; + } + } +} +$show_weight = !$has_weight_attribute && ($product_template !== 'Клей'); +?> + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/meta.php b/wp-content/themes/orgsteklo/woocommerce/single-product/meta.php new file mode 100644 index 0000000..845ac3a --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/meta.php @@ -0,0 +1,42 @@ + +
    + + + + get_sku() || $product->is_type( ProductType::VARIABLE ) ) ) : ?> + + get_sku() ) ? $sku : esc_html__( 'N/A', 'woocommerce' ); ?> + + + + get_id(), ', ', '' . _n( 'Category:', 'Categories:', count( $product->get_category_ids() ), 'woocommerce' ) . ' ', '' ); ?> + + get_id(), ', ', '' . _n( 'Tag:', 'Tags:', count( $product->get_tag_ids() ), 'woocommerce' ) . ' ', '' ); ?> + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/photoswipe.php b/wp-content/themes/orgsteklo/woocommerce/single-product/photoswipe.php new file mode 100644 index 0000000..7201292 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/photoswipe.php @@ -0,0 +1,56 @@ + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/price.php b/wp-content/themes/orgsteklo/woocommerce/single-product/price.php new file mode 100644 index 0000000..6a55fce --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/price.php @@ -0,0 +1,25 @@ + +

    get_price_html(); ?>

    diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/product-attributes.php b/wp-content/themes/orgsteklo/woocommerce/single-product/product-attributes.php new file mode 100644 index 0000000..ad1752b --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/product-attributes.php @@ -0,0 +1,33 @@ + + + $product_attribute ) : ?> + + + + + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/product-image.php b/wp-content/themes/orgsteklo/woocommerce/single-product/product-image.php new file mode 100644 index 0000000..4699044 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/product-image.php @@ -0,0 +1,53 @@ +get_image_id(); + $wrapper_classes = apply_filters( + 'woocommerce_single_product_image_gallery_classes', + array( + 'woocommerce-product-gallery', + 'woocommerce-product-gallery--' . ( $post_thumbnail_id ? 'with-images' : 'without-images' ), + 'woocommerce-product-gallery--columns-' . absint( $columns ), + 'images', + ) + ); +?> +get_image_id(); + echo '
    '; + $attachment_ids = $product->get_gallery_image_ids(); + if ( $product->get_image_id() ) { + $post_thumbnail_id = $product->get_image_id(); + if ($post_thumbnail_id) { + // Для fancybox используем полный размер + $image_url_full = wp_get_attachment_image_url($post_thumbnail_id, 'full'); + // Для отображения используем средний размер (оптимизация) + $image_url = wp_get_attachment_image_url($post_thumbnail_id, 'medium_large'); + echo '
    '; + echo ''; + echo ''; + echo ''; + echo '
    '; + } + if($attachment_ids) { + foreach ( $attachment_ids as $attachment_id ) { + // Для fancybox используем полный размер + $image_url_full = wp_get_attachment_image_src( $attachment_id, 'full' )[0]; + // Для отображения используем средний размер (оптимизация) + $image_url = wp_get_attachment_image_src( $attachment_id, 'medium_large' )[0]; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo '
    '; + } + } + } + echo '
    '; +?> + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/product-thumbnails.php b/wp-content/themes/orgsteklo/woocommerce/single-product/product-thumbnails.php new file mode 100644 index 0000000..47f70fc --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/product-thumbnails.php @@ -0,0 +1,25 @@ +get_gallery_image_ids(); + if ( $product->get_image_id() ) { + $post_thumbnail_id = $product->get_image_id(); + echo '
    '; + if ($post_thumbnail_id) { + $image_url = wp_get_attachment_image_url($post_thumbnail_id, 'full'); + echo '
    '; + echo ''; + echo '
    '; + } + foreach ( $attachment_ids as $attachment_id ) { + $image_url = wp_get_attachment_image_src( $attachment_id, 'full' )[0]; + echo '
    '; + echo ''; + echo '
    '; + } + echo '
    '; + } +?> \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/rating.php b/wp-content/themes/orgsteklo/woocommerce/single-product/rating.php new file mode 100644 index 0000000..a7fa241 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/rating.php @@ -0,0 +1,43 @@ +get_rating_count(); +$review_count = $product->get_review_count(); +$average = $product->get_average_rating(); + +if ( $rating_count > 0 ) : ?> + + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/related.php b/wp-content/themes/orgsteklo/woocommerce/single-product/related.php new file mode 100644 index 0000000..1076eb0 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/related.php @@ -0,0 +1,53 @@ + + + + comment_ID ); + +if ( '0' === $comment->comment_approved ) { ?> + +

    + + + +

    + + + +

    + + (' . esc_attr__( 'verified owner', 'woocommerce' ) . ') '; + } + + ?> + +

    + + comment_ID, 'rating', true ) ); + +if ( $rating && wc_review_ratings_enabled() ) { + echo wc_get_rating_html( $rating ); // WPCS: XSS ok. +} diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/review.php b/wp-content/themes/orgsteklo/woocommerce/single-product/review.php new file mode 100644 index 0000000..be7c3fc --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/review.php @@ -0,0 +1,67 @@ + +
  • id="li-comment-"> + +
    + + + +
    + + + +
    +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/sale-flash.php b/wp-content/themes/orgsteklo/woocommerce/single-product/sale-flash.php new file mode 100644 index 0000000..e0ade34 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/sale-flash.php @@ -0,0 +1,32 @@ + +is_on_sale() ) : ?> + + ' . esc_html__( 'Sale!', 'woocommerce' ) . '', $post, $product ); ?> + + post_excerpt ); + +if ( ! $short_description ) { + return; +} + +?> +
    + +
    diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/stock.php b/wp-content/themes/orgsteklo/woocommerce/single-product/stock.php new file mode 100644 index 0000000..d370289 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/stock.php @@ -0,0 +1,23 @@ + +

    diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/tabs/additional-information.php b/wp-content/themes/orgsteklo/woocommerce/single-product/tabs/additional-information.php new file mode 100644 index 0000000..8617c6d --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/tabs/additional-information.php @@ -0,0 +1,30 @@ + + + +

    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/tabs/description.php b/wp-content/themes/orgsteklo/woocommerce/single-product/tabs/description.php new file mode 100644 index 0000000..ad34d82 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/tabs/description.php @@ -0,0 +1,30 @@ + + + +

    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/tabs/tabs.php b/wp-content/themes/orgsteklo/woocommerce/single-product/tabs/tabs.php new file mode 100644 index 0000000..da8fafb --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/tabs/tabs.php @@ -0,0 +1,56 @@ + + +
    +
      + $product_tab ) : ?> +
    • + + + +
    • + +
    + $product_tab ) : ?> +
    + +
    + + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/title.php b/wp-content/themes/orgsteklo/woocommerce/single-product/title.php new file mode 100644 index 0000000..5c0f4d1 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/title.php @@ -0,0 +1,22 @@ +', '' ); diff --git a/wp-content/themes/orgsteklo/woocommerce/single-product/up-sells.php b/wp-content/themes/orgsteklo/woocommerce/single-product/up-sells.php new file mode 100644 index 0000000..cad56e5 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/single-product/up-sells.php @@ -0,0 +1,54 @@ + + +
    + +

    + + + + + + + get_id() ); + + setup_postdata( $GLOBALS['post'] = $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found + + wc_get_template_part( 'content', 'product' ); + ?> + + + + + +
    + + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/archive-product.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/archive-product.html new file mode 100644 index 0000000..5f51b60 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/archive-product.html @@ -0,0 +1,46 @@ + + + +
    + + + + + + + + + +
    + + +
    + + +
    + + + + + + + + + + + + + + + +
    + +
    + + +
    + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/coming-soon.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/coming-soon.html new file mode 100644 index 0000000..7f96aa6 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/coming-soon.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/order-confirmation.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/order-confirmation.html new file mode 100644 index 0000000..3e7fd3a --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/order-confirmation.html @@ -0,0 +1,53 @@ + + + +
    + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
    + + + +
    + + + + + +
    + +
    + + + + + + + + +
    + + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/page-cart.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/page-cart.html new file mode 100644 index 0000000..4b15803 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/page-cart.html @@ -0,0 +1,11 @@ + + + +
    + + + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/page-checkout.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/page-checkout.html new file mode 100644 index 0000000..4273037 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/page-checkout.html @@ -0,0 +1,9 @@ + + + +
    + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/product-search-results.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/product-search-results.html new file mode 100644 index 0000000..7fa2619 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/product-search-results.html @@ -0,0 +1,41 @@ + + + +
    + + + + + + + +
    + + +
    + + +
    + + + + + + + + + + + + + + + + + +
    + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/single-product.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/single-product.html new file mode 100644 index 0000000..2eb97d0 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/single-product.html @@ -0,0 +1,53 @@ + + + +
    + + + + +
    + +
    + +
    + + + +
    + + + + + + + + + + + +
    + +
    + + + + + + +
    + +
    + +
    + +
    + + + + + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_attribute.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_attribute.html new file mode 100644 index 0000000..3ce96d4 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_attribute.html @@ -0,0 +1,48 @@ + + + +
    + + + + + + + + + +
    + + + +
    + + + +
    + + + + + + + + + + + + + + + +
    + +
    + + +
    + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_brand.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_brand.html new file mode 100644 index 0000000..aa23a7d --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_brand.html @@ -0,0 +1,42 @@ + + + +
    + + + + + + + + + +
    + + +
    + + +
    + + + + + + + + + + + + + + + + +
    + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_cat.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_cat.html new file mode 100644 index 0000000..3ce96d4 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_cat.html @@ -0,0 +1,48 @@ + + + +
    + + + + + + + + + +
    + + + +
    + + + +
    + + + + + + + + + + + + + + + +
    + +
    + + +
    + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_tag.html b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_tag.html new file mode 100644 index 0000000..48bf1c8 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/blockified/taxonomy-product_tag.html @@ -0,0 +1,47 @@ + + + +
    + + + + + + + + + +
    + + + +
    + + + +
    + + + + + + + + + + + + + + + +
    + +
    + + +
    + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/coming-soon.html b/wp-content/themes/orgsteklo/woocommerce/templates/coming-soon.html new file mode 100644 index 0000000..7f96aa6 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/coming-soon.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/order-confirmation.html b/wp-content/themes/orgsteklo/woocommerce/templates/order-confirmation.html new file mode 100644 index 0000000..3e7fd3a --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/order-confirmation.html @@ -0,0 +1,53 @@ + + + +
    + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
    + + + +
    + + + + + +
    + +
    + + + + + + + + +
    + + + \ No newline at end of file diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/page-cart.html b/wp-content/themes/orgsteklo/woocommerce/templates/page-cart.html new file mode 100644 index 0000000..4b15803 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/page-cart.html @@ -0,0 +1,11 @@ + + + +
    + + + +
    + + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/page-checkout.html b/wp-content/themes/orgsteklo/woocommerce/templates/page-checkout.html new file mode 100644 index 0000000..4273037 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/page-checkout.html @@ -0,0 +1,9 @@ + + + +
    + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/product-search-results.html b/wp-content/themes/orgsteklo/woocommerce/templates/product-search-results.html new file mode 100644 index 0000000..db4d5cd --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/product-search-results.html @@ -0,0 +1,7 @@ + + +
    + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/single-product.html b/wp-content/themes/orgsteklo/woocommerce/templates/single-product.html new file mode 100644 index 0000000..ed2dafb --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/single-product.html @@ -0,0 +1,5 @@ + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_attribute.html b/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_attribute.html new file mode 100644 index 0000000..b05b1d5 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_attribute.html @@ -0,0 +1,5 @@ + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_brand.html b/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_brand.html new file mode 100644 index 0000000..4cf0107 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_brand.html @@ -0,0 +1,5 @@ + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_cat.html b/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_cat.html new file mode 100644 index 0000000..1773a59 --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_cat.html @@ -0,0 +1,5 @@ + + +
    + + diff --git a/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_tag.html b/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_tag.html new file mode 100644 index 0000000..f3c5c3d --- /dev/null +++ b/wp-content/themes/orgsteklo/woocommerce/templates/taxonomy-product_tag.html @@ -0,0 +1,5 @@ + + +
    + +