Jamil-Abdullayev b8246597d4 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
2026-03-05 00:48:06 +04:00

156 lines
7.9 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<footer>
<div class="footer-container container">
<div class="footer-main">
<div class="footer-col">
<?php
$logo_footer = get_field('logo_footer', 'option');
if ($logo_footer) {
echo '<a href="/" class="footer-logo">';
echo '<img src="' . esc_url($logo_footer['url']) . '" alt="' . esc_attr($logo_footer['alt']) . '">';
echo '</a>';
}
?>
<?php
$address = get_field('address', 'option');
if($address) {
echo '<div class="footer-address"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.6663 4.66666L8.68634 8.46666C8.48052 8.59561 8.24255 8.664 7.99967 8.664C7.7568 8.664 7.51883 8.59561 7.31301 8.46666L1.33301 4.66666M2.66634 2.66666H13.333C14.0694 2.66666 14.6663 3.26362 14.6663 4V12C14.6663 12.7364 14.0694 13.3333 13.333 13.3333H2.66634C1.92996 13.3333 1.33301 12.7364 1.33301 12V4C1.33301 3.26362 1.92996 2.66666 2.66634 2.66666Z" stroke="#868D96" stroke-linecap="round" stroke-linejoin="round"/></svg><p>' . $address . '</p></div>';
}
?>
</div>
<?php
$menu_list = wp_get_nav_menu_items('Подвал Каталог');
if ($menu_list) {
echo '<div class="footer-menu"><h4 class="footer-menu__title">Каталог</h4><nav><ul>';
foreach ($menu_list as $menu_item) {
$class = '';
if (is_page($menu_item->object_id)) {
$class = ' class="active"';
}
echo '<li><a href="' . esc_url($menu_item->url) . '"' . $class . '>' . esc_html($menu_item->title) . '</a></li>';
}
echo '</ul></nav></div>';
}
?>
<?php
$menu_list = wp_get_nav_menu_items('Подвал Покупателям');
if ($menu_list) {
echo '<div class="footer-menu"><h4 class="footer-menu__title">Покупателям</h4><nav><ul>';
foreach ($menu_list as $menu_item) {
$class = '';
if (is_page($menu_item->object_id)) {
$class = ' class="active"';
}
echo '<li><a href="' . esc_url($menu_item->url) . '"' . $class . '>' . esc_html($menu_item->title) . '</a></li>';
}
echo '</ul></nav></div>';
}
?>
<div class="footer-contacts">
<div class="footer-contacts__col">
<?php
$phone = get_field('phone', 'option');
$email = get_field('email', 'option');
$main_site = get_field('main_site', 'option');
if($phone) {
echo '<div class="footer-contacts__item"><a href="tel:' . $phone . '">' . $phone . '</a></div>';
}
if($email) {
echo '<div class="footer-contacts__item"><a href="mailto:' . $email . '">' . $email . '</a></div>';
}
if($main_site) {
echo '<div class="footer-contacts__item"><a href="https://' . $main_site . '" target="_blank">' . $main_site . '</a><p>Основной сайт компании</p></div>';
}
?>
</div>
<?php
$footer_payment_title = get_field('footer_payment_title', 'option');
$footer_payment_repeats = get_field('footer_payment_repeat', 'option');
if($footer_payment_repeats) {
echo '<div class="footer-contacts__payment">';
if($footer_payment_title) {
echo '<p>' . $footer_payment_title . '</p>';
}
if($footer_payment_repeats) {
echo '<div class="footer-contacts__payment-row">';
foreach ($footer_payment_repeats as $footer_payment_repeat) {
$footer_payment_repeat_logo = $footer_payment_repeat['footer_payment_repeat_logo'];
echo '<img src="' . esc_url($footer_payment_repeat_logo['url']) . '" alt="' . esc_attr($footer_payment_repeat_logo['alt']) . '">';
}
echo '</div>';
}
echo '</div>';
}
?>
</div>
<div class="footer-button">
<button class="footer-callback popup-callback__open">Заказать звонок</button>
</div>
</div>
<div class="footer-copyright">
<?php
$footer_copyright = get_field('footer_copyright', 'option');
if($footer_copyright) {
echo '<p>' . $footer_copyright . '</p>';
}
?>
<div class="footer-copyright__row">
<a href="/privacy-policy">Политика конфиденциальности</a>
<a href="/agreement">Публичная оферта</a>
</div>
<?php
$footer_dev_link = get_field('footer_dev_link', 'option');
$footer_dev_logo = get_field('footer_dev_logo', 'option');
if($footer_dev_link) {
echo '<a href="' . $footer_dev_link . '" target="_blank">Сайт разработан:';
if($footer_dev_logo) {
echo '<img src="' . esc_url($footer_dev_logo['url']) . '" alt="' . esc_attr($footer_dev_logo['alt']) . '">';
}
echo '</a>';
}
?>
</div>
</div>
</footer>
<div class="popup popup-callback">
<div class="popup-fon popup-callback__fon"></div>
<div class="popup-main">
<button class="popup-close popup-callback__close"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1269_41481)"><path d="M23.7068 0.293275C23.5193 0.105804 23.2649 0.000488281 22.9998 0.000488281C22.7346 0.000488281 22.4803 0.105804 22.2928 0.293275L11.9998 10.5863L1.70679 0.293275C1.51926 0.105804 1.26495 0.000488281 0.999786 0.000488281C0.734622 0.000488281 0.480314 0.105804 0.292786 0.293275C0.105315 0.480802 0 0.735111 0 1.00027C0 1.26544 0.105315 1.51975 0.292786 1.70727L10.5858 12.0003L0.292786 22.2933C0.105315 22.4808 0 22.7351 0 23.0003C0 23.2654 0.105315 23.5197 0.292786 23.7073C0.480314 23.8947 0.734622 24.0001 0.999786 24.0001C1.26495 24.0001 1.51926 23.8947 1.70679 23.7073L11.9998 13.4143L22.2928 23.7073C22.4803 23.8947 22.7346 24.0001 22.9998 24.0001C23.2649 24.0001 23.5193 23.8947 23.7068 23.7073C23.8943 23.5197 23.9996 23.2654 23.9996 23.0003C23.9996 22.7351 23.8943 22.4808 23.7068 22.2933L13.4138 12.0003L23.7068 1.70727C23.8943 1.51975 23.9996 1.26544 23.9996 1.00027C23.9996 0.735111 23.8943 0.480802 23.7068 0.293275Z" fill="#808080"></path></g><defs><clipPath id="clip0_1269_41481"><rect width="24" height="24" fill="white"></rect></clipPath></defs></svg></button>
<div class="popup-registration__col">
<div class="popup-registration__name">
<h4>Заказать обратный звонок</h4>
</div>
<form class="consult-form" method="post" id="callback-form">
<input name="callback-url" type="hidden" value="<?php echo esc_url( home_url( add_query_arg( null, null ) ) ); ?>">
<div class="consult-form__row">
<input type="text" name="callback-name" placeholder="ФИО*" autocomplete="name" required>
<input type="tel" name="callback-phone" class="phone" placeholder="+7 (999) 999-99-99*" autocomplete="tel" required>
</div>
<input type="email" name="callback-email" placeholder="E-mail*" autocomplete="email" required>
<input type="text" name="callback-comment" placeholder="Комментарий...">
<div class="consult-checkbox">
<input type="checkbox" id="callback-checkbox">
<label for="callback-checkbox">Нажимая на кнопку, вы соглашаетесь с <a href="/privacy-policy">политикой конфиденциальности</a></label>
</div>
<button class="consult-submit" name="callback-form-submit" type="submit">Отправить заявку</button>
</form>
</div>
</div>
</div>
<?php
$email_form = get_field('email_form', 'option');
$to = $email_form;
$subject = 'аказать обратный звонок';
$headers = array('Content-Type: text/html; charset=UTF-8');
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['callback-form-submit'])) {
$name = sanitize_text_field($_POST['callback-name']);
$phone = sanitize_text_field($_POST['callback-phone']);
$email = sanitize_text_field($_POST['callback-email']);
$comment = sanitize_text_field($_POST['callback-comment']);
$url = esc_url_raw($_POST['callback-url']);
$message = "Имя: $name<br>Телефон: $phone<br>Email: $email<br>Комментарий: $comment<br>Страница: $url";
if(wp_mail($to, $subject, $message, $headers)) {}
}
?>
<?php wp_footer() ?>
</body>
</html>