шаг 4 завершен

This commit is contained in:
Alisa
2026-06-04 01:30:45 +03:00
parent 62ce8c4d01
commit 238831ad3a
26 changed files with 1703 additions and 70 deletions
+6
View File
@@ -0,0 +1,6 @@
<section class="start-screen">
<p class="eyebrow">404</p>
<h1>Страница не найдена</h1>
<p>Возможно, ссылка изменилась. Вернитесь в каталог или на главную страницу.</p>
<p><a class="primary-link" href="/catalog">Перейти в каталог</a></p>
</section>
+3 -38
View File
@@ -34,6 +34,7 @@ declare(strict_types=1);
<?php
$items = $categories;
$depth = 0;
$currentSlug = '';
require base_path('views/partials/category-tree.php');
?>
<?php endif; ?>
@@ -76,27 +77,7 @@ declare(strict_types=1);
<?php else: ?>
<div class="product-grid">
<?php foreach ($catalogProducts as $product): ?>
<article class="product-card">
<p class="product-category"><?= e($product['category_name'] ?? 'Каталог') ?></p>
<h3><?= e($product['name']) ?></h3>
<p><?= e($product['variant_name'] ?? 'Выберите доступную фасовку') ?></p>
<?php if ($product['price_per_unit'] !== null): ?>
<span class="price-line">за <?= e($product['unit'] ?? 'ед.') ?>: <?= e((string) $product['price_per_unit']) ?> руб.</span>
<?php endif; ?>
<?php if ($product['package_price'] !== null): ?>
<strong><?= e((string) $product['package_price']) ?> руб. за фасовку</strong>
<?php endif; ?>
<?php if (!empty($product['price_tiers'])): ?>
<ul class="price-tiers">
<?php foreach ($product['price_tiers'] as $tier): ?>
<li>
<span><?= e($tier['label']) ?></span>
<strong><?= e((string) $tier['price']) ?> руб.</strong>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</article>
<?php require base_path('views/partials/product-card.php'); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
@@ -109,23 +90,7 @@ declare(strict_types=1);
<?php else: ?>
<div class="product-grid">
<?php foreach ($popularProducts as $product): ?>
<article class="product-card">
<h3><?= e($product['name']) ?></h3>
<p><?= e($product['variant_name'] ?? 'Фасовка не выбрана') ?></p>
<?php if ($product['package_price'] !== null): ?>
<strong><?= e((string) $product['package_price']) ?> руб.</strong>
<?php endif; ?>
<?php if (!empty($product['price_tiers'])): ?>
<ul class="price-tiers">
<?php foreach ($product['price_tiers'] as $tier): ?>
<li>
<span><?= e($tier['label']) ?></span>
<strong><?= e((string) $tier['price']) ?> руб.</strong>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</article>
<?php require base_path('views/partials/product-card.php'); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>