отображение ненужных цен за кг

This commit is contained in:
Alisa
2026-06-05 22:50:13 +03:00
parent 8f9bc92271
commit 4776769782
10 changed files with 969 additions and 89 deletions
+7 -1
View File
@@ -4,6 +4,8 @@ declare(strict_types=1);
/** @var array<int, array<string, mixed>> $megaCategories */
require_once __DIR__ . '/category-icons.php';
if (!function_exists('render_mega_category_children')) {
/**
* @param array<int, array<string, mixed>> $children
@@ -30,8 +32,12 @@ if (!function_exists('render_mega_category_children')) {
<nav class="category-mega-bar" aria-label="Категории товаров">
<div class="category-mega-inner">
<?php foreach ($megaCategories as $category): ?>
<?php $iconName = category_tree_icon((string) $category['name']); ?>
<div class="mega-item">
<a class="mega-root" href="/catalog/<?= e((string) $category['slug']) ?>"><?= e((string) $category['name']) ?></a>
<a class="mega-root" href="/catalog/<?= e((string) $category['slug']) ?>">
<span class="mega-category-icon category-icon is-<?= e($iconName) ?>" aria-hidden="true"><?= category_tree_icon_svg($iconName) ?></span>
<span><?= e((string) $category['name']) ?></span>
</a>
<?php render_mega_category_children($category['children'] ?? []); ?>
</div>
<?php endforeach; ?>