Anton | настройка checkout

This commit is contained in:
ab.an.ev@yandex.ru
2026-04-02 15:18:11 +03:00
parent 92a7170037
commit 153a66143b
6 changed files with 293 additions and 160 deletions

View File

@@ -0,0 +1,76 @@
<?php
/**
* Shared header for test1-related WooCommerce pages.
*
* @package Twenty_Twenty_Four
*/
$test1_header_action_url = isset( $test1_header_action_url ) ? $test1_header_action_url : '';
$test1_header_action_label = isset( $test1_header_action_label ) ? $test1_header_action_label : '';
$test1_header_mode = isset( $test1_header_mode ) ? $test1_header_mode : 'link';
?>
<header class="site-header">
<div class="container">
<div class="header-row">
<a class="brand" href="<?php echo esc_url( home_url( '/test1/' ) ); ?>" aria-label="Перейти на страницу test1">
<span class="brand-mark" aria-hidden="true">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C9 6.1 6 9.4 6 13.2C6 16.9 8.69 20 12 20C15.31 20 18 16.9 18 13.2C18 9.4 15 6.1 12 2Z" fill="currentColor"/>
</svg>
</span>
<span class="brand-text">
<strong>АкваЛиния</strong>
<span>доставка воды в Севастополе</span>
</span>
</a>
<nav class="nav" aria-label="Основная навигация">
<a href="<?php echo esc_url( home_url( '/test1/#catalog' ) ); ?>">Каталог</a>
<a href="<?php echo esc_url( home_url( '/test1/#delivery' ) ); ?>">Доставка</a>
<a href="<?php echo esc_url( home_url( '/test1/#business' ) ); ?>">Для дома и офиса</a>
<a href="<?php echo esc_url( home_url( '/test1/#faq' ) ); ?>">FAQ</a>
<a href="<?php echo esc_url( home_url( '/test1/#contacts' ) ); ?>">Контакты</a>
</nav>
<div class="header-actions">
<a class="header-phone" href="tel:+79781234567">
<span aria-hidden="true">+7 (978) 123-45-67</span>
</a>
<?php if ( 'cart' === $test1_header_mode ) : ?>
<button class="cart-button" id="cartOpenButton" aria-label="Открыть корзину">
<span aria-hidden="true">Корзина</span>
<span class="cart-count" id="cartCount">0</span>
</button>
<button class="mobile-toggle" id="mobileToggle" aria-label="Открыть меню" aria-expanded="false" aria-controls="mobilePanel">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M4 7H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M4 12H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M4 17H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
<?php elseif ( $test1_header_action_url && $test1_header_action_label ) : ?>
<a class="cart-button checkout-back-link" href="<?php echo esc_url( $test1_header_action_url ); ?>"><span><?php echo esc_html( $test1_header_action_label ); ?></span></a>
<?php endif; ?>
</div>
</div>
<?php if ( 'cart' === $test1_header_mode ) : ?>
<div class="mobile-panel" id="mobilePanel">
<div class="mobile-card">
<nav class="mobile-nav" aria-label="Мобильная навигация">
<a href="#catalog">Каталог</a>
<a href="#delivery">Условия доставки</a>
<a href="#business">Для дома и офиса</a>
<a href="#faq">FAQ</a>
<a href="#contacts">Контакты</a>
</nav>
<a class="header-phone" href="tel:+79781234567">+7 (978) 123-45-67</a>
<button class="cart-button" id="mobileCartOpenButton" aria-label="Открыть корзину с мобильного меню">
<span>Корзина</span>
<span class="cart-count" id="mobileCartCount">0</span>
</button>
</div>
</div>
<?php endif; ?>
</div>
</header>