переключатель цены убран где не нужно

This commit is contained in:
Alisa
2026-06-07 14:59:33 +03:00
parent ee753429e2
commit 170bea76d5
2 changed files with 25 additions and 8 deletions
+8 -1
View File
@@ -11,6 +11,13 @@ declare(strict_types=1);
$megaCategories = [];
$currentPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/';
$isCartPage = $currentPath === '/cart';
$isCatalogLikePage = $currentPath === '/'
|| $currentPath === '/catalog'
|| str_starts_with($currentPath, '/catalog/')
|| $currentPath === '/search'
|| str_starts_with($currentPath, '/search/');
$isProductPage = str_starts_with($currentPath, '/product/');
$showPriceModeBar = !$isCartPage && ($isCatalogLikePage || $isProductPage);
$yandexMapsApiKey = (string) app_env('YANDEX_MAPS_API_KEY', '9ab8ad56-c350-4a2c-8f23-35acb102ee7a');
$queryParameters = [];
parse_str((string) (parse_url($_SERVER['REQUEST_URI'] ?? '', PHP_URL_QUERY) ?? ''), $queryParameters);
@@ -149,7 +156,7 @@ try {
<?php require base_path('views/partials/mega-category-menu.php'); ?>
<?php if (!$isCartPage): ?>
<?php if ($showPriceModeBar): ?>
<section class="price-mode-bar" aria-label="Система оплаты при получении">
<div class="price-mode-inner">
<span>Выберите систему оплаты при получении:</span>