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

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
+17 -7
View File
@@ -446,10 +446,10 @@ body {
} }
.price-mode-inner { .price-mode-inner {
width: min(980px, calc(100% - (var(--page-gap) * 2))); width: min(var(--page-max), calc(100% - (var(--page-gap) * 2)));
display: grid; display: grid;
grid-template-columns: auto minmax(0, 1fr); grid-template-columns: max-content minmax(0, 1fr);
gap: 8px 16px; gap: 10px 18px;
align-items: center; align-items: center;
margin: 0 auto; margin: 0 auto;
padding: 12px 0; padding: 12px 0;
@@ -463,9 +463,11 @@ body {
.price-mode-options { .price-mode-options {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: nowrap;
gap: 8px; gap: 8px;
align-items: center;
justify-content: center; justify-content: center;
max-width: 100%;
} }
.price-mode-button { .price-mode-button {
@@ -484,6 +486,7 @@ body {
color: var(--brand-green); color: var(--brand-green);
background: #ffffff; background: #ffffff;
cursor: pointer; cursor: pointer;
white-space: nowrap;
} }
.price-mode-button b { .price-mode-button b {
@@ -497,12 +500,12 @@ body {
color: #ffffff; color: #ffffff;
background: var(--brand-red); background: var(--brand-red);
text-align: center; text-align: center;
white-space: normal; white-space: nowrap;
} }
.price-mode-button-qr b { .price-mode-button-qr b {
max-width: 190px; max-width: none;
line-height: 1.1; line-height: 1;
background: var(--brand-green-2); background: var(--brand-green-2);
} }
@@ -4114,6 +4117,13 @@ body[data-payment-mode="invoice"] .invoice-benefit-banner {
.price-mode-options { .price-mode-options {
justify-content: center; justify-content: center;
overflow-x: auto;
padding-bottom: 2px;
scrollbar-width: none;
}
.price-mode-options::-webkit-scrollbar {
display: none;
} }
.brand-link { .brand-link {
+8 -1
View File
@@ -11,6 +11,13 @@ declare(strict_types=1);
$megaCategories = []; $megaCategories = [];
$currentPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/'; $currentPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/';
$isCartPage = $currentPath === '/cart'; $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'); $yandexMapsApiKey = (string) app_env('YANDEX_MAPS_API_KEY', '9ab8ad56-c350-4a2c-8f23-35acb102ee7a');
$queryParameters = []; $queryParameters = [];
parse_str((string) (parse_url($_SERVER['REQUEST_URI'] ?? '', PHP_URL_QUERY) ?? ''), $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 require base_path('views/partials/mega-category-menu.php'); ?>
<?php if (!$isCartPage): ?> <?php if ($showPriceModeBar): ?>
<section class="price-mode-bar" aria-label="Система оплаты при получении"> <section class="price-mode-bar" aria-label="Система оплаты при получении">
<div class="price-mode-inner"> <div class="price-mode-inner">
<span>Выберите систему оплаты при получении:</span> <span>Выберите систему оплаты при получении:</span>