This commit is contained in:
Alisa
2026-06-07 21:14:30 +03:00
parent 76bf5d8191
commit 66e931e0d6
14 changed files with 1079 additions and 12 deletions
+11
View File
@@ -33,6 +33,17 @@ if (!function_exists('category_tree_has_current')) {
}
?>
<ul class="category-list depth-<?= e((string) $depth) ?>">
<?php if ($depth === 0): ?>
<li class="category-special-link is-all">
<a href="/catalog"><span>Весь каталог</span></a>
</li>
<li class="category-special-link">
<a href="/#home-promos"><span>Акции</span></a>
</li>
<li class="category-special-link">
<a href="/#home-new"><span>Новинки</span></a>
</li>
<?php endif; ?>
<?php foreach ($items as $category): ?>
<?php $isCurrent = ($currentSlug ?? '') === $category['slug']; ?>
<?php $hasChildren = !empty($category['children']); ?>
+11 -1
View File
@@ -31,8 +31,18 @@ if (!function_exists('render_mega_category_children')) {
<?php if ($megaCategories !== []): ?>
<nav class="category-mega-bar" aria-label="Категории товаров">
<div class="category-mega-inner">
<a class="mega-root mega-all-link" href="/catalog">Весь каталог</a>
<a class="mega-root mega-virtual-link is-promo" href="/#home-promos">Акции</a>
<a class="mega-root mega-virtual-link is-new" href="/#home-new">Новинки</a>
<?php foreach ($megaCategories as $category): ?>
<?php if (($category['slug'] ?? '') === 'myasnaya-gastronomiya' || ($category['name'] ?? '') === 'Мясная гастрономия') {
<?php
$hiddenTopCategorySlugs = ['myasnaya-gastronomiya', 'molochnaya-produkciya'];
$hiddenTopCategoryNames = ['Мясная гастрономия', 'Молочная продукция'];
if (
in_array((string) ($category['slug'] ?? ''), $hiddenTopCategorySlugs, true)
|| in_array((string) ($category['name'] ?? ''), $hiddenTopCategoryNames, true)
) {
continue;
} ?>
<?php $iconName = category_tree_icon((string) $category['name']); ?>
+3
View File
@@ -73,6 +73,9 @@ $isPurchasable = $isPublished && $isAvailable && $activePackagePrice > 0;
<?php if (!$isPurchasable): ?>
<span class="product-unavailable-badge"><?= !$isPublished ? 'Ожидается поступление' : 'Нет в наличии' ?></span>
<?php endif; ?>
<?php if (!empty($product['badge_label']) && $isPurchasable): ?>
<span class="product-card-badge is-<?= e((string) ($product['badge_kind'] ?? 'default')) ?>"><?= e((string) $product['badge_label']) ?></span>
<?php endif; ?>
<?php if (!empty($product['main_image_path']) && $isPurchasable): ?>
<a class="product-card-image" href="/product/<?= e($product['slug']) ?>" aria-label="<?= e($product['name']) ?>">
+42
View File
@@ -0,0 +1,42 @@
<section class="wishlist-request-panel" id="wishlist-request">
<div class="wishlist-request-copy">
<p class="eyebrow">Запрос позиции</p>
<h2>Одна голова хорошо, две лучше</h2>
<p>Нужна позиция, но нигде не можете ее найти? Отправьте нам наименование и объем. Наши менеджеры постараются помочь Вам в поиске.</p>
<span>Для частных покупателей и бизнеса</span>
</div>
<div class="wishlist-request-card">
<?php if (($_GET['wishlist_request'] ?? '') === 'sent'): ?>
<div class="status-box success">Ваш запрос принят. Если найдем подходящий вариант, обязательно свяжемся с вами.</div>
<?php elseif (($_GET['wishlist_request'] ?? '') === 'error'): ?>
<div class="status-box danger">Не удалось отправить запрос. Укажите имя, что нужно найти, и телефон или email.</div>
<?php endif; ?>
<form class="wishlist-request-form" action="/wishlist-request" method="post" enctype="multipart/form-data">
<label>
<span>Имя</span>
<input type="text" name="customer_name" placeholder="Как к Вам обращаться" required>
</label>
<label>
<span>Телефон</span>
<input type="tel" name="phone" placeholder="+7 ___ ___-__-__">
</label>
<label>
<span>Email</span>
<input type="email" name="email" placeholder="mail@example.ru">
</label>
<label class="wide">
<span>Что нужно найти</span>
<textarea name="request_text" rows="5" placeholder="Например: филе судака 10 кг, икра в стеклянной банке, креветки под нужный размер" required></textarea>
</label>
<label class="file-field wide">
<span>Прикрепить файлы</span>
<input type="file" name="wishlist_files[]" multiple>
<small>Можно приложить фото, список или пример товара.</small>
</label>
<p class="form-hint wide">Телефон или email - достаточно одного контакта. Если сможем помочь с поиском, менеджер свяжется с Вами.</p>
<button class="primary-button wide" type="submit">Отправить запрос</button>
</form>
</div>
</section>