@@ -4,32 +4,34 @@
|
||||
data-fetch-url="{{ route('chat.messages') }}"
|
||||
data-send-url="{{ route('chat.send') }}"
|
||||
data-csrf="{{ csrf_token() }}"
|
||||
data-send-label="{{ __('Отправить') }}"
|
||||
data-restart-label="{{ __('Начать новый чат') }}"
|
||||
>
|
||||
<button class="pc-chat-toggle" type="button" data-chat-toggle>
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M4 5h16v10H8l-4 4V5zm2 2v7.17L7.17 13H18V7H6z"></path>
|
||||
</svg>
|
||||
<span>Чат</span>
|
||||
<span>{{ __('Чат') }}</span>
|
||||
</button>
|
||||
|
||||
<section class="pc-chat-panel" data-chat-panel hidden>
|
||||
<header class="pc-chat-header">
|
||||
<h3>Онлайн-чат</h3>
|
||||
<button class="pc-chat-close" type="button" data-chat-close aria-label="Свернуть чат">×</button>
|
||||
<h3>{{ __('Онлайн-чат') }}</h3>
|
||||
<button class="pc-chat-close" type="button" data-chat-close aria-label="{{ __('Свернуть чат') }}">×</button>
|
||||
</header>
|
||||
<p class="pc-chat-note" data-chat-note>Задайте вопрос — администратор ответит в этом окне.</p>
|
||||
<p class="pc-chat-note" data-chat-note>{{ __('Задайте вопрос — администратор ответит в этом окне.') }}</p>
|
||||
|
||||
<div class="pc-chat-messages" data-chat-messages></div>
|
||||
|
||||
<form class="pc-chat-form" data-chat-form>
|
||||
<textarea
|
||||
name="message"
|
||||
placeholder="Введите сообщение..."
|
||||
placeholder="{{ __('Введите сообщение...') }}"
|
||||
maxlength="2000"
|
||||
rows="3"
|
||||
required
|
||||
></textarea>
|
||||
<button class="pc-btn primary" type="submit">Отправить</button>
|
||||
<button class="pc-btn primary" type="submit">{{ __('Отправить') }}</button>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@php
|
||||
$companyName = config('shop.company_name', config('app.name'));
|
||||
$companyDescription = config('shop.company_description');
|
||||
$companyDescription = __(config('shop.company_description'));
|
||||
$contactPhone = trim((string) config('shop.contact_phone'));
|
||||
$contactEmail = trim((string) config('shop.contact_email'));
|
||||
$contactTelegram = trim((string) config('shop.contact_telegram'));
|
||||
$contactHours = trim((string) config('shop.contact_hours'));
|
||||
$contactHours = trim((string) __(config('shop.contact_hours')));
|
||||
$telegramUrl = '';
|
||||
$phoneUrl = '';
|
||||
$emailUrl = '';
|
||||
@@ -32,28 +32,28 @@
|
||||
</div>
|
||||
<div class="pc-footer-columns">
|
||||
<div class="pc-footer-col">
|
||||
<h4>Каталог</h4>
|
||||
<h4>{{ __('Каталог') }}</h4>
|
||||
<ul class="pc-footer-list">
|
||||
<li><a href="{{ route('catalog.index') }}">Все категории</a></li>
|
||||
<li><a href="{{ route('catalog.category', 'processors') }}">Процессоры</a></li>
|
||||
<li><a href="{{ route('catalog.category', 'graphics-cards') }}">Видеокарты</a></li>
|
||||
<li><a href="{{ route('catalog.category', 'laptops') }}">Ноутбуки</a></li>
|
||||
<li><a href="{{ route('catalog.index') }}">{{ __('Все категории') }}</a></li>
|
||||
<li><a href="{{ route('catalog.category', 'processors') }}">{{ __('Процессоры') }}</a></li>
|
||||
<li><a href="{{ route('catalog.category', 'graphics-cards') }}">{{ __('Видеокарты') }}</a></li>
|
||||
<li><a href="{{ route('catalog.category', 'laptops') }}">{{ __('Ноутбуки') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pc-footer-col">
|
||||
<h4>Покупателю</h4>
|
||||
<h4>{{ __('Покупателю') }}</h4>
|
||||
<ul class="pc-footer-list">
|
||||
<li><a href="{{ route('cart.index') }}">Корзина</a></li>
|
||||
<li><a href="{{ route('favorites.index') }}">Избранное</a></li>
|
||||
<li><a href="{{ route('compare.index') }}">Сравнение</a></li>
|
||||
<li><a href="{{ route('pages.shipping-payment') }}">Доставка и оплата</a></li>
|
||||
<li><a href="{{ route('cart.index') }}">{{ __('Корзина') }}</a></li>
|
||||
<li><a href="{{ route('favorites.index') }}">{{ __('Избранное') }}</a></li>
|
||||
<li><a href="{{ route('compare.index') }}">{{ __('Сравнение') }}</a></li>
|
||||
<li><a href="{{ route('pages.shipping-payment') }}">{{ __('Доставка и оплата') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pc-footer-col">
|
||||
<h4>Контакты</h4>
|
||||
<h4>{{ __('Контакты') }}</h4>
|
||||
<div class="pc-footer-contact">
|
||||
@if ($phoneUrl !== '')
|
||||
<span>Телефон: <a href="{{ $phoneUrl }}">{{ $contactPhone }}</a></span>
|
||||
<span>{{ __('Телефон') }}: <a href="{{ $phoneUrl }}">{{ $contactPhone }}</a></span>
|
||||
@endif
|
||||
@if ($emailUrl !== '')
|
||||
<span>Email: <a href="{{ $emailUrl }}">{{ $contactEmail }}</a></span>
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pc-footer-bottom">
|
||||
<span>(c) {{ date('Y') }} {{ $companyName }}. Все права защищены.</span>
|
||||
<span><a href="{{ route('pages.about') }}">О компании</a> / <a href="{{ route('pages.contacts') }}">Контакты</a></span>
|
||||
<span>{{ __('(c) :year :company. Все права защищены.', ['year' => date('Y'), 'company' => $companyName]) }}</span>
|
||||
<span><a href="{{ route('pages.about') }}">{{ __('О компании') }}</a> / <a href="{{ route('pages.contacts') }}">{{ __('Контакты') }}</a></span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -3,52 +3,90 @@
|
||||
$compareCount = count((array) session('compare', []));
|
||||
$cartCount = collect((array) session('cart', []))->sum(fn ($quantity) => (int) $quantity);
|
||||
$companyName = config('shop.company_name', config('app.name'));
|
||||
$supportedLocales = (array) config('app.supported_locales', []);
|
||||
$currentLocale = app()->getLocale();
|
||||
$currentLocaleData = $supportedLocales[$currentLocale] ?? $supportedLocales[config('app.locale', 'ru')] ?? [
|
||||
'native' => 'Русский',
|
||||
'short' => 'Рус',
|
||||
'flag' => '🇷🇺',
|
||||
];
|
||||
$navItems = [
|
||||
['label' => 'Главная', 'route' => route('home'), 'active' => request()->routeIs('home')],
|
||||
['label' => __('Главная'), 'route' => route('home'), 'active' => request()->routeIs('home')],
|
||||
[
|
||||
'label' => 'Каталог',
|
||||
'label' => __('Каталог'),
|
||||
'route' => route('catalog.index'),
|
||||
'active' => request()->routeIs('catalog.*') || request()->routeIs('products.show') || request()->routeIs('search.index'),
|
||||
],
|
||||
['label' => 'О нас', 'route' => route('pages.about'), 'active' => request()->routeIs('pages.about')],
|
||||
['label' => __('О нас'), 'route' => route('pages.about'), 'active' => request()->routeIs('pages.about')],
|
||||
[
|
||||
'label' => 'Доставка и оплата',
|
||||
'label' => __('Доставка и оплата'),
|
||||
'route' => route('pages.shipping-payment'),
|
||||
'active' => request()->routeIs('pages.shipping-payment'),
|
||||
],
|
||||
['label' => 'Контакты', 'route' => route('pages.contacts'), 'active' => request()->routeIs('pages.contacts')],
|
||||
['label' => __('Контакты'), 'route' => route('pages.contacts'), 'active' => request()->routeIs('pages.contacts')],
|
||||
];
|
||||
@endphp
|
||||
|
||||
<header class="pc-header pc-animate" style="--delay: 0s">
|
||||
<input type="checkbox" id="pc-mobile-menu-toggle" class="pc-mobile-menu-toggle">
|
||||
<label for="pc-mobile-menu-toggle" class="pc-hamburger" aria-label="Меню">
|
||||
<label for="pc-mobile-menu-toggle" class="pc-hamburger" aria-label="{{ __('Меню') }}">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</label>
|
||||
<div class="pc-mobile-menu-head">
|
||||
<label for="pc-mobile-menu-toggle" class="pc-mobile-menu-close" aria-label="Закрыть меню">×</label>
|
||||
<label for="pc-mobile-menu-toggle" class="pc-mobile-menu-close" aria-label="{{ __('Закрыть меню') }}">×</label>
|
||||
</div>
|
||||
<div class="pc-header-left">
|
||||
<a class="pc-logo" href="{{ route('home') }}">
|
||||
<span class="pc-logo-mark"></span>
|
||||
{{ $companyName }}
|
||||
</a>
|
||||
<a class="pc-btn pc-catalog-btn" href="{{ route('catalog.index') }}">Каталог</a>
|
||||
<a class="pc-btn pc-catalog-btn" href="{{ route('catalog.index') }}">{{ __('Каталог') }}</a>
|
||||
</div>
|
||||
<div class="pc-header-center">
|
||||
<form class="pc-search" action="{{ route('search.index') }}" method="get">
|
||||
<input type="text" name="q" placeholder="Поиск товаров по наименованию" value="{{ request('q') }}" />
|
||||
<button class="pc-search-submit" type="submit" aria-label="Искать">
|
||||
<input type="text" name="q" placeholder="{{ __('Поиск товаров по наименованию') }}" value="{{ request('q') }}" />
|
||||
<button class="pc-search-submit" type="submit" aria-label="{{ __('Искать') }}">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M15.5 14h-.79l-.28-.27a6 6 0 1 0-.71.71l.27.28v.79L20 20.5 21.5 19 15.5 14zm-5.5 0A4.5 4.5 0 1 1 10 5a4.5 4.5 0 0 1 0 9z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="pc-header-tools">
|
||||
<details class="pc-lang-switcher" data-locale-switcher>
|
||||
<summary class="pc-lang-switcher-trigger" aria-label="{{ __('Выбор языка') }}">
|
||||
<span class="pc-lang-switcher-current">
|
||||
<span class="pc-lang-switcher-flag" aria-hidden="true">{{ $currentLocaleData['flag'] ?? '🌐' }}</span>
|
||||
<span class="pc-lang-switcher-label">{{ $currentLocaleData['short'] ?? strtoupper($currentLocale) }}</span>
|
||||
</span>
|
||||
<span class="pc-lang-switcher-chevron" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20">
|
||||
<path d="M5.3 7.8a1 1 0 0 1 1.4 0L10 11l3.3-3.2a1 1 0 1 1 1.4 1.4l-4 3.9a1 1 0 0 1-1.4 0l-4-3.9a1 1 0 0 1 0-1.4z"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</summary>
|
||||
<div class="pc-lang-switcher-menu">
|
||||
@foreach ($supportedLocales as $locale => $localeData)
|
||||
<form method="post" action="{{ route('locale.switch', $locale) }}" data-preserve-scroll="true">
|
||||
@csrf
|
||||
<button class="pc-lang-switcher-option {{ $locale === $currentLocale ? 'is-active' : '' }}" type="submit" @disabled($locale === $currentLocale)>
|
||||
<span class="pc-lang-switcher-option-main">
|
||||
<span class="pc-lang-switcher-flag" aria-hidden="true">{{ $localeData['flag'] ?? '🌐' }}</span>
|
||||
<span>{{ $localeData['native'] ?? strtoupper($locale) }}</span>
|
||||
</span>
|
||||
@if ($locale === $currentLocale)
|
||||
<span class="pc-lang-switcher-check" aria-hidden="true">•</span>
|
||||
@endif
|
||||
</button>
|
||||
</form>
|
||||
@endforeach
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<div class="pc-header-icons">
|
||||
<a class="pc-icon-link" href="{{ route('favorites.index') }}" aria-label="Избранное">
|
||||
<a class="pc-icon-link" href="{{ route('favorites.index') }}" aria-label="{{ __('Избранное') }}">
|
||||
<span class="pc-icon">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M12 20s-7-4.5-9-9c-1.2-2.7.7-6 4.2-6 2 0 3.2 1 3.8 2 0.6-1 1.8-2 3.8-2 3.5 0 5.4 3.3 4.2 6-2 4.5-9 9-9 9z"></path>
|
||||
@@ -57,9 +95,9 @@
|
||||
<span class="pc-icon-count">{{ $favoritesCount }}</span>
|
||||
@endif
|
||||
</span>
|
||||
<span class="pc-icon-label">Избранное</span>
|
||||
<span class="pc-icon-label">{{ __('Избранное') }}</span>
|
||||
</a>
|
||||
<a class="pc-icon-link" href="{{ route('compare.index') }}" aria-label="Сравнение">
|
||||
<a class="pc-icon-link" href="{{ route('compare.index') }}" aria-label="{{ __('Сравнение') }}">
|
||||
<span class="pc-icon">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M5 4h3v16H5zM16 4h3v16h-3zM10.5 8h3v12h-3z"></path>
|
||||
@@ -68,9 +106,9 @@
|
||||
<span class="pc-icon-count">{{ $compareCount }}</span>
|
||||
@endif
|
||||
</span>
|
||||
<span class="pc-icon-label">Сравнение</span>
|
||||
<span class="pc-icon-label">{{ __('Сравнение') }}</span>
|
||||
</a>
|
||||
<a class="pc-icon-link" href="{{ route('cart.index') }}" aria-label="Корзина">
|
||||
<a class="pc-icon-link" href="{{ route('cart.index') }}" aria-label="{{ __('Корзина') }}">
|
||||
<span class="pc-icon">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M6 6h14l-2 9H8L6 6zm-2-2h3l1 2h-4zM9 20a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm8 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z"></path>
|
||||
@@ -79,18 +117,18 @@
|
||||
<span class="pc-icon-count">{{ $cartCount }}</span>
|
||||
@endif
|
||||
</span>
|
||||
<span class="pc-icon-label">Корзина</span>
|
||||
<span class="pc-icon-label">{{ __('Корзина') }}</span>
|
||||
</a>
|
||||
<a class="pc-icon-link" href="{{ auth()->check() ? route('account') : route('login') }}" aria-label="Личный кабинет">
|
||||
<a class="pc-icon-link" href="{{ auth()->check() ? route('account') : route('login') }}" aria-label="{{ __('Личный кабинет') }}">
|
||||
<span class="pc-icon">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5z"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="pc-icon-label">{{ auth()->check() ? 'Кабинет' : 'Войти' }}</span>
|
||||
<span class="pc-icon-label">{{ auth()->check() ? __('Кабинет') : __('Войти') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<nav class="pc-header-nav" aria-label="Разделы сайта">
|
||||
<nav class="pc-header-nav" aria-label="{{ __('Разделы сайта') }}">
|
||||
@foreach ($navItems as $item)
|
||||
<a class="pc-header-nav-link {{ $item['active'] ? 'is-active' : '' }}" href="{{ $item['route'] }}">
|
||||
{{ $item['label'] }}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
@php
|
||||
$supportedLocales = (array) config('app.supported_locales', []);
|
||||
$currentLocale = app()->getLocale();
|
||||
$currentLocaleData = $supportedLocales[$currentLocale] ?? $supportedLocales[config('app.locale', 'ru')] ?? [];
|
||||
$siteName = config('seo.site_name', config('app.name', 'PC Shop'));
|
||||
$metaTitleRaw = trim($__env->yieldContent('meta_title'));
|
||||
$metaTitle = $metaTitleRaw !== '' ? "{$metaTitleRaw} - {$siteName}" : config('seo.default_title', $siteName);
|
||||
$metaDescription = trim($__env->yieldContent('meta_description')) ?: config('seo.default_description');
|
||||
$metaKeywords = trim($__env->yieldContent('meta_keywords')) ?: config('seo.default_keywords');
|
||||
$metaTitle = $metaTitleRaw !== '' ? "{$metaTitleRaw} - {$siteName}" : __(config('seo.default_title', $siteName));
|
||||
$metaDescription = trim($__env->yieldContent('meta_description')) ?: __(config('seo.default_description'));
|
||||
$metaKeywords = trim($__env->yieldContent('meta_keywords')) ?: __(config('seo.default_keywords'));
|
||||
$metaCanonical = trim($__env->yieldContent('meta_canonical')) ?: url()->current();
|
||||
$metaOgType = trim($__env->yieldContent('meta_og_type')) ?: 'website';
|
||||
$request = request();
|
||||
@@ -30,10 +33,10 @@
|
||||
$metaImageAlt = trim($__env->yieldContent('meta_image_alt')) ?: $metaTitle;
|
||||
$siteUrl = url('/');
|
||||
$companyName = config('shop.company_name', $siteName);
|
||||
$companyDescription = config('shop.company_description', $metaDescription);
|
||||
$companyDescription = __(config('shop.company_description', $metaDescription));
|
||||
$companyPhone = trim((string) config('shop.contact_phone', ''));
|
||||
$companyEmail = trim((string) config('shop.contact_email', ''));
|
||||
$companyAddress = trim((string) config('shop.contact_address', ''));
|
||||
$companyAddress = trim((string) __(config('shop.contact_address', '')));
|
||||
$companyTelegram = trim((string) config('shop.contact_telegram', ''));
|
||||
if ($companyTelegram !== '' && str_starts_with($companyTelegram, '@')) {
|
||||
$companyTelegram = 'https://t.me/' . ltrim($companyTelegram, '@');
|
||||
@@ -86,10 +89,12 @@
|
||||
<meta name="keywords" content="{{ $metaKeywords }}">
|
||||
<meta name="robots" content="{{ $metaRobots }}">
|
||||
<link rel="canonical" href="{{ $metaCanonical }}">
|
||||
<link rel="alternate" hreflang="ru-RU" href="{{ $metaCanonical }}">
|
||||
@foreach ($supportedLocales as $localeData)
|
||||
<link rel="alternate" hreflang="{{ $localeData['hreflang'] ?? 'ru-RU' }}" href="{{ $metaCanonical }}">
|
||||
@endforeach
|
||||
<link rel="alternate" hreflang="x-default" href="{{ $metaCanonical }}">
|
||||
<meta property="og:type" content="{{ $metaOgType }}">
|
||||
<meta property="og:locale" content="ru_RU">
|
||||
<meta property="og:locale" content="{{ $currentLocaleData['og_locale'] ?? 'ru_RU' }}">
|
||||
<meta property="og:site_name" content="{{ $siteName }}">
|
||||
<meta property="og:title" content="{{ $metaTitle }}">
|
||||
<meta property="og:description" content="{{ $metaDescription }}">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@section('meta_title', 'О компании')
|
||||
@section('meta_description', 'О компании: помощь в подборе комплектующих, консультации и поддержка при сборке ПК.')
|
||||
@section('meta_keywords', 'о компании, магазин комплектующих, поддержка')
|
||||
@section('meta_title', __('О компании'))
|
||||
@section('meta_description', __('О компании: помощь в подборе комплектующих, консультации и поддержка при сборке ПК.'))
|
||||
@section('meta_keywords', __('о компании, магазин комплектующих, поддержка'))
|
||||
@section('meta_canonical', route('pages.about'))
|
||||
|
||||
@section('content')
|
||||
@@ -12,33 +12,33 @@
|
||||
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'О нас', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('О нас'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>{{ $companyName }} — интернет-магазин компьютерных комплектующих.</h2>
|
||||
<p>Мы помогаем подобрать совместимую сборку, оформить заказ и получить технику с понятной поддержкой после покупки.</p>
|
||||
<h2>{{ __(':company — интернет-магазин компьютерных комплектующих.', ['company' => $companyName]) }}</h2>
|
||||
<p>{{ __('Мы помогаем подобрать совместимую сборку, оформить заказ и получить технику с понятной поддержкой после покупки.') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="pc-about-content">
|
||||
<h3>Кто мы</h3>
|
||||
<p>{{ $companyName }} работает для тех, кому важно собрать быстрый и надежный ПК без ошибок по совместимости. В каталоге есть комплектующие для домашних, рабочих и игровых систем: процессоры, материнские платы, видеокарты, память, накопители, блоки питания, корпуса, системы охлаждения, ноутбуки и периферия.</p>
|
||||
<p>Мы делаем акцент на понятном выборе: категории с фильтрами, сравнение товаров, избранное, корзина и личный кабинет с историей заказов. Это помогает быстрее принять решение и не потерять важные позиции при подборе сборки.</p>
|
||||
<h3>{{ __('Кто мы') }}</h3>
|
||||
<p>{{ __(':company работает для тех, кому важно собрать быстрый и надежный ПК без ошибок по совместимости. В каталоге есть комплектующие для домашних, рабочих и игровых систем: процессоры, материнские платы, видеокарты, память, накопители, блоки питания, корпуса, системы охлаждения, ноутбуки и периферия.', ['company' => $companyName]) }}</p>
|
||||
<p>{{ __('Мы делаем акцент на понятном выборе: категории с фильтрами, сравнение товаров, избранное, корзина и личный кабинет с историей заказов. Это помогает быстрее принять решение и не потерять важные позиции при подборе сборки.') }}</p>
|
||||
|
||||
<h3>Как мы помогаем клиентам</h3>
|
||||
<h3>{{ __('Как мы помогаем клиентам') }}</h3>
|
||||
<ul class="pc-list">
|
||||
<li>Проверяем ключевые характеристики и совместимость комплектующих.</li>
|
||||
<li>Подсказываем оптимальные варианты под бюджет и задачи.</li>
|
||||
<li>Сопровождаем заказ от оформления до получения.</li>
|
||||
<li>Объясняем условия доставки, оплаты, возврата и гарантии простым языком.</li>
|
||||
<li>{{ __('Проверяем ключевые характеристики и совместимость комплектующих.') }}</li>
|
||||
<li>{{ __('Подсказываем оптимальные варианты под бюджет и задачи.') }}</li>
|
||||
<li>{{ __('Сопровождаем заказ от оформления до получения.') }}</li>
|
||||
<li>{{ __('Объясняем условия доставки, оплаты, возврата и гарантии простым языком.') }}</li>
|
||||
</ul>
|
||||
|
||||
<h3>Наш подход</h3>
|
||||
<p>Для нас важны прозрачность и сервис: актуальные цены, понятные характеристики и честная обратная связь. Мы стремимся, чтобы покупка техники была удобной как для новичков, так и для опытных пользователей, которые собирают ПК самостоятельно.</p>
|
||||
<p>Если вам нужна консультация перед покупкой, команда {{ $companyName }} поможет подобрать комплектующие и предложит сбалансированные варианты под ваши задачи.</p>
|
||||
<h3>{{ __('Наш подход') }}</h3>
|
||||
<p>{{ __('Для нас важны прозрачность и сервис: актуальные цены, понятные характеристики и честная обратная связь. Мы стремимся, чтобы покупка техники была удобной как для новичков, так и для опытных пользователей, которые собирают ПК самостоятельно.') }}</p>
|
||||
<p>{{ __('Если вам нужна консультация перед покупкой, команда :company поможет подобрать комплектующие и предложит сбалансированные варианты под ваши задачи.', ['company' => $companyName]) }}</p>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@section('meta_title', 'Контакты')
|
||||
@section('meta_description', 'Контакты магазина: телефон, email, адрес и часы работы поддержки.')
|
||||
@section('meta_keywords', 'контакты магазина, телефон, email, адрес')
|
||||
@section('meta_title', __('Контакты'))
|
||||
@section('meta_description', __('Контакты магазина: телефон, email, адрес и часы работы поддержки.'))
|
||||
@section('meta_keywords', __('контакты магазина, телефон, email, адрес'))
|
||||
@section('meta_canonical', route('pages.contacts'))
|
||||
|
||||
@section('content')
|
||||
@@ -11,7 +11,7 @@
|
||||
$contactPhone = trim((string) config('shop.contact_phone'));
|
||||
$contactEmail = trim((string) config('shop.contact_email'));
|
||||
$contactTelegram = trim((string) config('shop.contact_telegram'));
|
||||
$contactHours = trim((string) config('shop.contact_hours'));
|
||||
$contactHours = trim((string) __(config('shop.contact_hours')));
|
||||
$telegramUrl = '';
|
||||
$phoneUrl = '';
|
||||
$emailUrl = '';
|
||||
@@ -33,48 +33,48 @@
|
||||
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Контакты', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Контакты'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Поможем с вашей сборкой.</h2>
|
||||
<p>Оставьте заявку — поможем подобрать комплектующие и ответим по доставке.</p>
|
||||
<h2>{{ __('Поможем с вашей сборкой.') }}</h2>
|
||||
<p>{{ __('Оставьте заявку — поможем подобрать комплектующие и ответим по доставке.') }}</p>
|
||||
</div>
|
||||
<div class="pc-grid pc-grid-2">
|
||||
<article class="pc-card">
|
||||
<div class="pc-card-meta">Поддержка</div>
|
||||
<h3>{{ $companyName }} — поддержка клиентов</h3>
|
||||
<div class="pc-card-meta">{{ __('Поддержка') }}</div>
|
||||
<h3>{{ __(':company — поддержка клиентов', ['company' => $companyName]) }}</h3>
|
||||
@if ($phoneUrl !== '')
|
||||
<p>Телефон: <a class="pc-contact-link" href="{{ $phoneUrl }}">{{ $contactPhone }}</a></p>
|
||||
<p>{{ __('Телефон:') }} <a class="pc-contact-link" href="{{ $phoneUrl }}">{{ $contactPhone }}</a></p>
|
||||
@endif
|
||||
@if ($emailUrl !== '')
|
||||
<p>Почта: <a class="pc-contact-link" href="{{ $emailUrl }}">{{ $contactEmail }}</a></p>
|
||||
<p>{{ __('Почта:') }} <a class="pc-contact-link" href="{{ $emailUrl }}">{{ $contactEmail }}</a></p>
|
||||
@endif
|
||||
@if ($telegramUrl !== '')
|
||||
<p>Telegram: <a class="pc-contact-link" href="{{ $telegramUrl }}" target="_blank" rel="noopener noreferrer">{{ $contactTelegram }}</a></p>
|
||||
@endif
|
||||
@if ($contactHours !== '')
|
||||
<p>Часы: {{ $contactHours }}</p>
|
||||
<p>{{ __('Часы:') }} {{ $contactHours }}</p>
|
||||
@endif
|
||||
</article>
|
||||
<form class="pc-card pc-form" method="post" action="{{ route('pages.contacts.submit') }}">
|
||||
@csrf
|
||||
<label>
|
||||
Имя
|
||||
<input type="text" name="name" value="{{ old('name') }}" placeholder="Ваше имя" required />
|
||||
{{ __('Имя') }}
|
||||
<input type="text" name="name" value="{{ old('name') }}" placeholder="{{ __('Ваше имя') }}" required />
|
||||
</label>
|
||||
<label>
|
||||
Почта
|
||||
{{ __('Почта') }}
|
||||
<input type="email" name="email" value="{{ old('email') }}" placeholder="mail@example.com" required />
|
||||
</label>
|
||||
<label>
|
||||
Сообщение
|
||||
<textarea name="message" placeholder="Расскажите о вашей сборке" required>{{ old('message') }}</textarea>
|
||||
{{ __('Сообщение') }}
|
||||
<textarea name="message" placeholder="{{ __('Расскажите о вашей сборке') }}" required>{{ old('message') }}</textarea>
|
||||
</label>
|
||||
<button type="submit" class="pc-btn primary">Отправить сообщение</button>
|
||||
<button type="submit" class="pc-btn primary">{{ __('Отправить сообщение') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@section('meta_title', 'Доставка и оплата')
|
||||
@section('meta_description', 'Условия доставки и способы оплаты заказов в интернет-магазине комплектующих.')
|
||||
@section('meta_keywords', 'доставка, оплата, условия заказа')
|
||||
@section('meta_title', __('Доставка и оплата'))
|
||||
@section('meta_description', __('Условия доставки и способы оплаты заказов в интернет-магазине комплектующих.'))
|
||||
@section('meta_keywords', __('доставка, оплата, условия заказа'))
|
||||
@section('meta_canonical', route('pages.shipping-payment'))
|
||||
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Доставка и оплата', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Доставка и оплата'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Быстрая доставка и удобная оплата.</h2>
|
||||
<p>Выбирайте курьера или доставку по времени с безопасной оплатой.</p>
|
||||
<h2>{{ __('Быстрая доставка и удобная оплата.') }}</h2>
|
||||
<p>{{ __('Выбирайте курьера или доставку по времени с безопасной оплатой.') }}</p>
|
||||
</div>
|
||||
<div class="pc-grid pc-grid-2">
|
||||
<article class="pc-card">
|
||||
<div class="pc-card-meta">Доставка</div>
|
||||
<h3>Варианты доставки</h3>
|
||||
<div class="pc-card-meta">{{ __('Доставка') }}</div>
|
||||
<h3>{{ __('Варианты доставки') }}</h3>
|
||||
<ul class="pc-list">
|
||||
<li>День в день в пределах города</li>
|
||||
<li>1-3 дня по стране</li>
|
||||
<li>Онлайн‑треккинг</li>
|
||||
<li>{{ __('День в день в пределах города') }}</li>
|
||||
<li>{{ __('1-3 дня по стране') }}</li>
|
||||
<li>{{ __('Онлайн‑треккинг') }}</li>
|
||||
</ul>
|
||||
</article>
|
||||
<article class="pc-card">
|
||||
<div class="pc-card-meta">Оплата</div>
|
||||
<h3>Способы оплаты</h3>
|
||||
<div class="pc-card-meta">{{ __('Оплата') }}</div>
|
||||
<h3>{{ __('Способы оплаты') }}</h3>
|
||||
<ul class="pc-list">
|
||||
<li>Оплата банковской картой</li>
|
||||
<li>Безналичный расчет для юрлиц</li>
|
||||
<li>Подтверждение оплаты в личном кабинете</li>
|
||||
<li>{{ __('Оплата банковской картой') }}</li>
|
||||
<li>{{ __('Безналичный расчет для юрлиц') }}</li>
|
||||
<li>{{ __('Подтверждение оплаты в личном кабинете') }}</li>
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
];
|
||||
@endphp
|
||||
|
||||
<nav class="pc-breadcrumbs" aria-label="Хлебные крошки">
|
||||
<nav class="pc-breadcrumbs" aria-label="{{ __('Хлебные крошки') }}">
|
||||
@foreach ($items as $item)
|
||||
@if (!$loop->last && !empty($item['url']))
|
||||
<a href="{{ $item['url'] }}">{{ $item['label'] }}</a>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
$hasSubtitle = $slide->show_subtitle && !empty($slide->subtitle);
|
||||
$hasButton = $slide->show_button && !empty($slide->button_text) && !empty($slide->button_url);
|
||||
$hasContent = $hasTitle || $hasSubtitle || $hasButton;
|
||||
$altText = $hasTitle ? $slide->title : 'Слайд на главной странице';
|
||||
$altText = $hasTitle ? __($slide->title) : __('Слайд на главной странице');
|
||||
@endphp
|
||||
<article class="pc-home-slide {{ $loop->first ? 'is-active' : '' }}" data-home-slide>
|
||||
<img src="{{ $slide->image_url }}" alt="{{ $altText }}" loading="{{ $loop->first ? 'eager' : 'lazy' }}">
|
||||
@@ -19,13 +19,13 @@
|
||||
@if ($hasContent)
|
||||
<div class="pc-home-slide-content">
|
||||
@if ($hasTitle)
|
||||
<h2>{{ $slide->title }}</h2>
|
||||
<h2>{{ __($slide->title) }}</h2>
|
||||
@endif
|
||||
@if ($hasSubtitle)
|
||||
<p>{{ $slide->subtitle }}</p>
|
||||
<p>{{ __($slide->subtitle) }}</p>
|
||||
@endif
|
||||
@if ($hasButton)
|
||||
<a class="pc-btn primary" href="{{ $slide->button_url }}">{{ $slide->button_text }}</a>
|
||||
<a class="pc-btn primary" href="{{ $slide->button_url }}">{{ __($slide->button_text) }}</a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@@ -34,16 +34,16 @@
|
||||
<article class="pc-home-slide is-active is-fallback" data-home-slide>
|
||||
<div class="pc-home-slide-overlay"></div>
|
||||
<div class="pc-home-slide-content">
|
||||
<h2>{{ $fallbackTitle ?? 'Собирайте ПК быстрее' }}</h2>
|
||||
<p>{{ $fallbackText ?? 'Загрузите баннеры в админке, чтобы вывести акции и подборки товаров на главной странице.' }}</p>
|
||||
<h2>{{ __($fallbackTitle ?? 'Собирайте ПК быстрее') }}</h2>
|
||||
<p>{{ __($fallbackText ?? 'Загрузите баннеры в админке, чтобы вывести акции и подборки товаров на главной странице.') }}</p>
|
||||
@if (!empty($fallbackUrl))
|
||||
<a class="pc-btn primary" href="{{ $fallbackUrl }}">{{ $fallbackButton ?? 'Открыть каталог' }}</a>
|
||||
<a class="pc-btn primary" href="{{ $fallbackUrl }}">{{ __($fallbackButton ?? 'Открыть каталог') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
</article>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
<button class="pc-home-slider-btn is-prev" type="button" data-home-slider-prev aria-label="Предыдущий слайд" @disabled($isSingle)>‹</button>
|
||||
<button class="pc-home-slider-btn is-next" type="button" data-home-slider-next aria-label="Следующий слайд" @disabled($isSingle)>›</button>
|
||||
<button class="pc-home-slider-btn is-prev" type="button" data-home-slider-prev aria-label="{{ __('Предыдущий слайд') }}" @disabled($isSingle)>‹</button>
|
||||
<button class="pc-home-slider-btn is-next" type="button" data-home-slider-next aria-label="{{ __('Следующий слайд') }}" @disabled($isSingle)>›</button>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav class="pc-pager" role="navigation" aria-label="Пагинация">
|
||||
<nav class="pc-pager" role="navigation" aria-label="{{ __('Пагинация') }}">
|
||||
<ul class="pc-pager-list">
|
||||
<li>
|
||||
@if ($paginator->onFirstPage())
|
||||
<span class="pc-pager-link is-disabled" aria-disabled="true">Назад</span>
|
||||
<span class="pc-pager-link is-disabled" aria-disabled="true">{{ __('Назад') }}</span>
|
||||
@else
|
||||
<a class="pc-pager-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">Назад</a>
|
||||
<a class="pc-pager-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">{{ __('Назад') }}</a>
|
||||
@endif
|
||||
</li>
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
|
||||
<li>
|
||||
@if ($paginator->hasMorePages())
|
||||
<a class="pc-pager-link" href="{{ $paginator->nextPageUrl() }}" rel="next">Вперед</a>
|
||||
<a class="pc-pager-link" href="{{ $paginator->nextPageUrl() }}" rel="next">{{ __('Вперед') }}</a>
|
||||
@else
|
||||
<span class="pc-pager-link is-disabled" aria-disabled="true">Вперед</span>
|
||||
<span class="pc-pager-link is-disabled" aria-disabled="true">{{ __('Вперед') }}</span>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -13,33 +13,33 @@
|
||||
@endphp
|
||||
|
||||
<div class="pc-payment-details {{ $class ?? '' }}">
|
||||
<h3>{{ $title ?? 'Оплата по реквизитам' }}</h3>
|
||||
<h3>{{ __($title ?? 'Оплата по реквизитам') }}</h3>
|
||||
|
||||
@isset($amount)
|
||||
<p class="pc-payment-total">Сумма к оплате: <strong>{{ number_format((float) $amount, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong></p>
|
||||
<p class="pc-payment-total">{{ __('Сумма к оплате:') }} <strong>{{ number_format((float) $amount, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong></p>
|
||||
@endisset
|
||||
|
||||
<div class="pc-payment-grid">
|
||||
<div class="pc-payment-row">
|
||||
<span class="pc-payment-key">Банк</span>
|
||||
<strong class="pc-payment-value">{{ $paymentBank }}</strong>
|
||||
<span class="pc-payment-key">{{ __('Банк') }}</span>
|
||||
<strong class="pc-payment-value">{{ __($paymentBank) }}</strong>
|
||||
</div>
|
||||
<div class="pc-payment-row">
|
||||
<span class="pc-payment-key">Получатель</span>
|
||||
<span class="pc-payment-key">{{ __('Получатель') }}</span>
|
||||
<strong class="pc-payment-value">{{ $paymentCardHolder }}</strong>
|
||||
</div>
|
||||
<div class="pc-payment-row">
|
||||
<span class="pc-payment-key">Номер карты</span>
|
||||
<span class="pc-payment-key">{{ __('Номер карты') }}</span>
|
||||
<strong class="pc-payment-value">{{ $paymentCardNumber }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@isset($purpose)
|
||||
<p class="pc-payment-purpose">Назначение платежа: <strong>{{ $purpose }}</strong></p>
|
||||
<p class="pc-payment-purpose">{{ __('Назначение платежа:') }} <strong>{{ $purpose }}</strong></p>
|
||||
@endisset
|
||||
|
||||
@if (!empty($showHelp))
|
||||
<p class="pc-muted">После оплаты отправьте чек в поддержку для подтверждения заказа.</p>
|
||||
<p class="pc-muted">{{ __('После оплаты отправьте чек в поддержку для подтверждения заказа.') }}</p>
|
||||
@if ($telegramUrl !== '')
|
||||
<p class="pc-muted">Telegram: <a class="pc-contact-link" href="{{ $telegramUrl }}" target="_blank" rel="noopener noreferrer">{{ $telegram }}</a></p>
|
||||
@endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="pc-product-tools">
|
||||
<form method="post" action="{{ route('favorites.toggle', $product) }}" class="pc-product-tool-form" data-preserve-scroll="true">
|
||||
@csrf
|
||||
<button class="pc-product-tool {{ $isFavorite ? 'is-active' : '' }}" type="submit" aria-label="Добавить в избранное" title="В избранное">
|
||||
<button class="pc-product-tool {{ $isFavorite ? 'is-active' : '' }}" type="submit" aria-label="{{ __('Добавить в избранное') }}" title="{{ __('В избранное') }}">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M12 20s-7-4.5-9-9c-1.2-2.7.7-6 4.2-6 2 0 3.2 1 3.8 2 0.6-1 1.8-2 3.8-2 3.5 0 5.4 3.3 4.2 6-2 4.5-9 9-9 9z"></path>
|
||||
</svg>
|
||||
@@ -20,7 +20,7 @@
|
||||
</form>
|
||||
<form method="post" action="{{ route('compare.toggle', $product) }}" class="pc-product-tool-form" data-preserve-scroll="true">
|
||||
@csrf
|
||||
<button class="pc-product-tool {{ $isCompared ? 'is-active' : '' }}" type="submit" aria-label="Добавить в сравнение" title="Сравнить">
|
||||
<button class="pc-product-tool {{ $isCompared ? 'is-active' : '' }}" type="submit" aria-label="{{ __('Добавить в сравнение') }}" title="{{ __('Сравнить') }}">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M5 4h3v16H5zM16 4h3v16h-3zM10.5 8h3v12h-3z"></path>
|
||||
</svg>
|
||||
@@ -37,7 +37,7 @@
|
||||
<a class="pc-product-link" href="{{ route('products.show', $product) }}">{{ $product->name }}</a>
|
||||
</h3>
|
||||
@if (!empty($product->short_description))
|
||||
<p>{{ $product->short_description }}</p>
|
||||
<p>{{ __($product->short_description) }}</p>
|
||||
@endif
|
||||
<div class="pc-product-meta">
|
||||
<strong>{{ number_format($product->price, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
@@ -50,11 +50,11 @@
|
||||
<form method="post" action="{{ route('cart.add', $product) }}" data-preserve-scroll="true">
|
||||
@csrf
|
||||
<button class="pc-btn ghost {{ $isInCart ? 'is-active' : '' }}" type="submit">
|
||||
{{ $isInCart ? 'В корзине' : 'В корзину' }}
|
||||
{{ $isInCart ? __('В корзине') : __('В корзину') }}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<button class="pc-btn ghost" type="button" disabled>Нет в наличии</button>
|
||||
<button class="pc-btn ghost" type="button" disabled>{{ __('Нет в наличии') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>{{ $title ?? 'Товары' }}</h2>
|
||||
<h2>{{ __($title ?? 'Товары') }}</h2>
|
||||
@if (!empty($description))
|
||||
<p>{{ $description }}</p>
|
||||
<p>{{ __($description) }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($items->isEmpty())
|
||||
<div class="pc-card">{{ $emptyText ?? 'Пока нет товаров.' }}</div>
|
||||
<div class="pc-card">{{ __($emptyText ?? 'Пока нет товаров.') }}</div>
|
||||
@else
|
||||
<div class="pc-product-carousel" data-product-carousel>
|
||||
<button class="pc-product-carousel-btn is-prev" type="button" data-product-carousel-prev aria-label="Предыдущие товары">‹</button>
|
||||
<button class="pc-product-carousel-btn is-prev" type="button" data-product-carousel-prev aria-label="{{ __('Предыдущие товары') }}">‹</button>
|
||||
<div class="pc-product-carousel-track" data-product-carousel-track>
|
||||
@foreach ($items as $product)
|
||||
<div class="pc-product-carousel-item">
|
||||
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<button class="pc-product-carousel-btn is-next" type="button" data-product-carousel-next aria-label="Следующие товары">›</button>
|
||||
<button class="pc-product-carousel-btn is-next" type="button" data-product-carousel-next aria-label="{{ __('Следующие товары') }}">›</button>
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
|
||||
@@ -3,24 +3,24 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Личный кабинет', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Личный кабинет'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Личный кабинет</h2>
|
||||
<p>Управляйте данными профиля и просматривайте историю заказов.</p>
|
||||
<h2>{{ __('Личный кабинет') }}</h2>
|
||||
<p>{{ __('Управляйте данными профиля и просматривайте историю заказов.') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="pc-grid pc-grid-2">
|
||||
<div class="pc-card">
|
||||
<form class="pc-form" method="post" action="{{ route('account.update') }}">
|
||||
@csrf
|
||||
<h3>Данные аккаунта</h3>
|
||||
<h3>{{ __('Данные аккаунта') }}</h3>
|
||||
<label>
|
||||
Имя
|
||||
{{ __('Имя') }}
|
||||
<input type="text" name="name" value="{{ old('name', $user->name) }}" required>
|
||||
</label>
|
||||
<label>
|
||||
@@ -28,25 +28,25 @@
|
||||
<input type="email" name="email" value="{{ old('email', $user->email) }}" required>
|
||||
</label>
|
||||
<div class="pc-product-actions">
|
||||
<button class="pc-btn primary" type="submit">Сохранить</button>
|
||||
<button class="pc-btn primary" type="submit">{{ __('Сохранить') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
<form method="post" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button class="pc-btn ghost" type="submit">Выйти</button>
|
||||
<button class="pc-btn ghost" type="submit">{{ __('Выйти') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="pc-card">
|
||||
<h3>Мои заказы</h3>
|
||||
<h3>{{ __('Мои заказы') }}</h3>
|
||||
@if ($orders->isEmpty())
|
||||
<p>Пока нет заказов.</p>
|
||||
<a class="pc-btn ghost" href="{{ route('catalog.index') }}">Перейти в каталог</a>
|
||||
<p>{{ __('Пока нет заказов.') }}</p>
|
||||
<a class="pc-btn ghost" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
|
||||
@else
|
||||
<div class="pc-account-orders">
|
||||
@foreach ($orders as $order)
|
||||
<a class="pc-account-order" href="{{ route('account.orders.show', $order) }}">
|
||||
<span>Заказ #{{ $order->id }}</span>
|
||||
<span>{{ __('Заказ #:number', ['number' => $order->id]) }}</span>
|
||||
<strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Вход', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Вход'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section pc-auth-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Вход</h2>
|
||||
<p>Введите email и пароль для доступа к заказам и профилю.</p>
|
||||
<h2>{{ __('Вход') }}</h2>
|
||||
<p>{{ __('Введите email и пароль для доступа к заказам и профилю.') }}</p>
|
||||
</div>
|
||||
|
||||
<form class="pc-card pc-form pc-auth-form" method="post" action="{{ route('login.attempt') }}">
|
||||
@@ -21,20 +21,20 @@
|
||||
<input type="email" name="email" value="{{ old('email') }}" required>
|
||||
</label>
|
||||
<label>
|
||||
Пароль
|
||||
{{ __('Пароль') }}
|
||||
<input type="password" name="password" required>
|
||||
</label>
|
||||
<label>
|
||||
Капча: решите пример {{ $captchaQuestion }}
|
||||
{{ __('Капча: решите пример :question', ['question' => $captchaQuestion]) }}
|
||||
<input type="text" name="captcha" inputmode="numeric" autocomplete="off" required>
|
||||
</label>
|
||||
<label class="pc-checkbox">
|
||||
<input type="checkbox" name="remember" value="1" @checked(old('remember'))>
|
||||
<span>Запомнить меня</span>
|
||||
<span>{{ __('Запомнить меня') }}</span>
|
||||
</label>
|
||||
<div class="pc-product-actions">
|
||||
<button class="pc-btn primary" type="submit">Войти</button>
|
||||
<a class="pc-btn ghost" href="{{ route('register') }}">Создать аккаунт</a>
|
||||
<button class="pc-btn primary" type="submit">{{ __('Войти') }}</button>
|
||||
<a class="pc-btn ghost" href="{{ route('register') }}">{{ __('Создать аккаунт') }}</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Регистрация', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Регистрация'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section pc-auth-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Регистрация</h2>
|
||||
<p>Создайте аккаунт, чтобы отслеживать заказы и сохранять избранное.</p>
|
||||
<h2>{{ __('Регистрация') }}</h2>
|
||||
<p>{{ __('Создайте аккаунт, чтобы отслеживать заказы и сохранять избранное.') }}</p>
|
||||
</div>
|
||||
|
||||
<form class="pc-card pc-form pc-auth-form" method="post" action="{{ route('register.store') }}">
|
||||
@csrf
|
||||
<label>
|
||||
Имя
|
||||
{{ __('Имя') }}
|
||||
<input type="text" name="name" value="{{ old('name') }}" required>
|
||||
</label>
|
||||
<label>
|
||||
@@ -25,20 +25,20 @@
|
||||
<input type="email" name="email" value="{{ old('email') }}" required>
|
||||
</label>
|
||||
<label>
|
||||
Пароль
|
||||
{{ __('Пароль') }}
|
||||
<input type="password" name="password" required>
|
||||
</label>
|
||||
<label>
|
||||
Подтверждение пароля
|
||||
{{ __('Подтверждение пароля') }}
|
||||
<input type="password" name="password_confirmation" required>
|
||||
</label>
|
||||
<label>
|
||||
Капча: решите пример {{ $captchaQuestion }}
|
||||
{{ __('Капча: решите пример :question', ['question' => $captchaQuestion]) }}
|
||||
<input type="text" name="captcha" inputmode="numeric" autocomplete="off" required>
|
||||
</label>
|
||||
<div class="pc-product-actions">
|
||||
<button class="pc-btn primary" type="submit">Зарегистрироваться</button>
|
||||
<a class="pc-btn ghost" href="{{ route('login') }}">Уже есть аккаунт</a>
|
||||
<button class="pc-btn primary" type="submit">{{ __('Зарегистрироваться') }}</button>
|
||||
<a class="pc-btn ghost" href="{{ route('login') }}">{{ __('Уже есть аккаунт') }}</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Корзина', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Корзина'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Товары в корзине</h2>
|
||||
<h2>{{ __('Товары в корзине') }}</h2>
|
||||
</div>
|
||||
|
||||
@if ($items->isEmpty())
|
||||
<div class="pc-card">
|
||||
<h3>Корзина пустая</h3>
|
||||
<p>Добавьте товары из каталога, чтобы оформить заказ.</p>
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Перейти в каталог</a>
|
||||
<h3>{{ __('Корзина пустая') }}</h3>
|
||||
<p>{{ __('Добавьте товары из каталога, чтобы оформить заказ.') }}</p>
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
|
||||
</div>
|
||||
@else
|
||||
<div class="pc-cart-layout">
|
||||
@@ -38,13 +38,13 @@
|
||||
@csrf
|
||||
@method('patch')
|
||||
<input type="number" name="quantity" min="1" max="{{ max(1, $product->stock) }}" value="{{ $item['quantity'] }}">
|
||||
<button class="pc-btn ghost" type="submit">Обновить</button>
|
||||
<button class="pc-btn ghost" type="submit">{{ __('Обновить') }}</button>
|
||||
</form>
|
||||
<strong class="pc-cart-subtotal">{{ number_format($item['subtotal'], 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
<form method="post" action="{{ route('cart.remove', $product) }}" data-preserve-scroll="true">
|
||||
@csrf
|
||||
@method('delete')
|
||||
<button class="pc-btn ghost" type="submit">Удалить</button>
|
||||
<button class="pc-btn ghost" type="submit">{{ __('Удалить') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</article>
|
||||
@@ -52,16 +52,16 @@
|
||||
</div>
|
||||
|
||||
<aside class="pc-card pc-cart-summary">
|
||||
<h3>Итого</h3>
|
||||
<h3>{{ __('Итого') }}</h3>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Товаров</span>
|
||||
<span>{{ __('Товаров') }}</span>
|
||||
<strong>{{ $itemsCount }}</strong>
|
||||
</div>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Сумма</span>
|
||||
<span>{{ __('Сумма') }}</span>
|
||||
<strong>{{ number_format($total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</div>
|
||||
<a class="pc-btn primary" href="{{ route('checkout.show') }}">Перейти к оформлению</a>
|
||||
<a class="pc-btn primary" href="{{ route('checkout.show') }}">{{ __('Перейти к оформлению') }}</a>
|
||||
</aside>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
'@type' => 'ListItem',
|
||||
'position' => $index + 1,
|
||||
'url' => route('catalog.category', $category),
|
||||
'name' => $category->name,
|
||||
'name' => __($category->name),
|
||||
])
|
||||
->all();
|
||||
$catalogSchema = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'CollectionPage',
|
||||
'name' => 'Каталог товаров',
|
||||
'name' => __('Каталог товаров'),
|
||||
'url' => route('catalog.index'),
|
||||
'description' => 'Каталог компьютерных комплектующих и техники.',
|
||||
'description' => __('Каталог компьютерных комплектующих и техники.'),
|
||||
'mainEntity' => [
|
||||
'@type' => 'ItemList',
|
||||
'numberOfItems' => count($catalogCategoryList),
|
||||
@@ -25,14 +25,14 @@
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@section('meta_title', $searchQuery !== '' ? "Поиск: {$searchQuery}" : 'Каталог товаров')
|
||||
@section('meta_title', $searchQuery !== '' ? __('Поиск: :query', ['query' => $searchQuery]) : __('Каталог товаров'))
|
||||
@section(
|
||||
'meta_description',
|
||||
$searchQuery !== ''
|
||||
? "Результаты поиска по запросу «{$searchQuery}». Подберите нужные комплектующие по наименованию."
|
||||
: 'Каталог компьютерных комплектующих: процессоры, материнские платы, видеокарты, память, накопители и ноутбуки.'
|
||||
? __('Результаты поиска по запросу «:query». Подберите нужные комплектующие по наименованию.', ['query' => $searchQuery])
|
||||
: __('Каталог компьютерных комплектующих: процессоры, материнские платы, видеокарты, память, накопители и ноутбуки.')
|
||||
)
|
||||
@section('meta_keywords', 'каталог комплектующих, поиск товаров, процессоры, материнские платы, видеокарты')
|
||||
@section('meta_keywords', __('каталог комплектующих, поиск товаров, процессоры, материнские платы, видеокарты'))
|
||||
@section('meta_canonical', route('catalog.index'))
|
||||
@section('meta_robots', $hasCatalogQuery ? 'noindex,follow' : 'index,follow')
|
||||
|
||||
@@ -45,24 +45,24 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Каталог', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Каталог'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Категории товаров</h2>
|
||||
<h2>{{ __('Категории товаров') }}</h2>
|
||||
</div>
|
||||
|
||||
<div class="pc-grid pc-grid-4 pc-category-grid">
|
||||
@forelse ($categories as $category)
|
||||
<a class="pc-card pc-category-card pc-category-link" href="{{ route('catalog.category', $category) }}">
|
||||
<div class="pc-category-image" role="img" aria-label="{{ $category->name }}"></div>
|
||||
<h3 class="pc-category-title">{{ $category->name }}</h3>
|
||||
<div class="pc-category-image" role="img" aria-label="{{ __($category->name) }}"></div>
|
||||
<h3 class="pc-category-title">{{ __($category->name) }}</h3>
|
||||
</a>
|
||||
@empty
|
||||
<div class="pc-card">Категории пока не добавлены.</div>
|
||||
<div class="pc-card">{{ __('Категории пока не добавлены.') }}</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</section>
|
||||
@@ -71,16 +71,16 @@
|
||||
<section class="pc-section">
|
||||
<div class="pc-category-toolbar">
|
||||
<div class="pc-section-title">
|
||||
<h2>Результаты по запросу: "{{ request('q') }}"</h2>
|
||||
<h2>{{ __('Результаты по запросу: ":query"', ['query' => request('q')]) }}</h2>
|
||||
</div>
|
||||
<p class="pc-muted">Найдено: <strong>{{ $products->total() }}</strong></p>
|
||||
<p class="pc-muted">{{ __('Найдено:') }} <strong>{{ $products->total() }}</strong></p>
|
||||
</div>
|
||||
|
||||
<div class="pc-products-grid">
|
||||
@forelse ($products as $product)
|
||||
@include('partials.product-card', ['product' => $product])
|
||||
@empty
|
||||
<div class="pc-card">По вашему запросу ничего не найдено.</div>
|
||||
<div class="pc-card">{{ __('По вашему запросу ничего не найдено.') }}</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@php
|
||||
$translatedCategoryName = __($category->name);
|
||||
$translatedCategoryDescription = $category->description ? __($category->description) : __('Категория товаров :category', ['category' => $translatedCategoryName]);
|
||||
$hasSeoFilters = request()->filled('q')
|
||||
|| request()->filled('sort')
|
||||
|| request()->filled('page')
|
||||
@@ -24,9 +26,9 @@
|
||||
$categorySchema = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'CollectionPage',
|
||||
'name' => $category->name,
|
||||
'name' => $translatedCategoryName,
|
||||
'url' => route('catalog.category', $category),
|
||||
'description' => $category->description ?: 'Категория товаров ' . $category->name,
|
||||
'description' => $translatedCategoryDescription,
|
||||
'mainEntity' => [
|
||||
'@type' => 'ItemList',
|
||||
'numberOfItems' => $products->total(),
|
||||
@@ -35,9 +37,9 @@
|
||||
];
|
||||
@endphp
|
||||
|
||||
@section('meta_title', $category->name)
|
||||
@section('meta_description', ($category->description ?: 'Товары категории ' . $category->name . '.') . ' Фильтры и сортировка для быстрого подбора.')
|
||||
@section('meta_keywords', $category->name . ', комплектующие, купить, фильтры товаров')
|
||||
@section('meta_title', $translatedCategoryName)
|
||||
@section('meta_description', __('Товары категории :category. Фильтры и сортировка для быстрого подбора.', ['category' => $translatedCategoryName]))
|
||||
@section('meta_keywords', __(':category, комплектующие, купить, фильтры товаров', ['category' => $translatedCategoryName]))
|
||||
@section('meta_canonical', route('catalog.category', $category))
|
||||
@section('meta_robots', $hasSeoFilters ? 'noindex,follow' : 'index,follow')
|
||||
|
||||
@@ -50,15 +52,15 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Каталог', 'url' => route('catalog.index')],
|
||||
['label' => $category->name, 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Каталог'), 'url' => route('catalog.index')],
|
||||
['label' => $translatedCategoryName, 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section pc-category-page">
|
||||
<div class="pc-section-title">
|
||||
<h2>{{ $category->name }}</h2>
|
||||
<h2>{{ $translatedCategoryName }}</h2>
|
||||
</div>
|
||||
|
||||
@php
|
||||
@@ -69,7 +71,7 @@
|
||||
if (request()->filled('price_from') || request()->filled('price_to')) {
|
||||
$priceFromLabel = trim((string) request('price_from', ''));
|
||||
$priceToLabel = trim((string) request('price_to', ''));
|
||||
$activeFilters->push("Цена: {$priceFromLabel} - {$priceToLabel}");
|
||||
$activeFilters->push(__('Цена: :from - :to', ['from' => $priceFromLabel, 'to' => $priceToLabel]));
|
||||
}
|
||||
|
||||
foreach ((array) ($filters ?? []) as $filter) {
|
||||
@@ -90,12 +92,16 @@
|
||||
|
||||
$fromLabel = trim((string) request($fromParam, ''));
|
||||
$toLabel = trim((string) request($toParam, ''));
|
||||
$activeFilters->push(($filter['label'] ?? $rangeKey) . ": {$fromLabel} - {$toLabel}");
|
||||
$activeFilters->push(__(':label: :from - :to', [
|
||||
'label' => __($filter['label'] ?? $rangeKey),
|
||||
'from' => $fromLabel,
|
||||
'to' => $toLabel,
|
||||
]));
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="pc-category-toolbar">
|
||||
<p class="pc-muted">Найдено товаров: <strong>{{ $products->total() }}</strong></p>
|
||||
<p class="pc-muted">{{ __('Найдено товаров:') }} <strong>{{ $products->total() }}</strong></p>
|
||||
<div class="pc-category-toolbar-controls">
|
||||
<form class="pc-sort-form" method="get">
|
||||
@foreach ((array) ($appliedFilters ?? []) as $key => $value)
|
||||
@@ -124,12 +130,12 @@
|
||||
@if (request()->filled('q'))
|
||||
<input type="hidden" name="q" value="{{ request('q') }}">
|
||||
@endif
|
||||
<label for="sort">Сортировка:</label>
|
||||
<label for="sort">{{ __('Сортировка:') }}</label>
|
||||
<select id="sort" name="sort" onchange="this.form.submit()">
|
||||
<option value="newest" @selected($sort === 'newest')>Сначала новые</option>
|
||||
<option value="price_asc" @selected($sort === 'price_asc')>Сначала дешевле</option>
|
||||
<option value="price_desc" @selected($sort === 'price_desc')>Сначала дороже</option>
|
||||
<option value="name_asc" @selected($sort === 'name_asc')>По названию</option>
|
||||
<option value="newest" @selected($sort === 'newest')>{{ __('Сначала новые') }}</option>
|
||||
<option value="price_asc" @selected($sort === 'price_asc')>{{ __('Сначала дешевле') }}</option>
|
||||
<option value="price_desc" @selected($sort === 'price_desc')>{{ __('Сначала дороже') }}</option>
|
||||
<option value="name_asc" @selected($sort === 'name_asc')>{{ __('По названию') }}</option>
|
||||
</select>
|
||||
</form>
|
||||
<button
|
||||
@@ -142,7 +148,7 @@
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M4 6h16v2H4V6zm3 5h10v2H7v-2zm3 5h4v2h-4v-2z"></path>
|
||||
</svg>
|
||||
<span>Фильтр</span>
|
||||
<span>{{ __('Фильтр') }}</span>
|
||||
@if ($activeFilters->isNotEmpty())
|
||||
<span class="pc-filter-toggle-count">{{ $activeFilters->count() }}</span>
|
||||
@endif
|
||||
@@ -161,7 +167,7 @@
|
||||
<aside class="pc-filters">
|
||||
<div id="pc-category-filters" class="pc-filter-details {{ $activeFilters->isNotEmpty() ? 'is-open' : '' }}">
|
||||
<form method="get">
|
||||
<div class="pc-filter-title">Фильтры</div>
|
||||
<div class="pc-filter-title">{{ __('Фильтры') }}</div>
|
||||
@if ($sort !== 'newest')
|
||||
<input type="hidden" name="sort" value="{{ $sort }}">
|
||||
@endif
|
||||
@@ -169,7 +175,7 @@
|
||||
<input type="hidden" name="q" value="{{ request('q') }}">
|
||||
@endif
|
||||
<label class="pc-filter-block">
|
||||
<span>Цена</span>
|
||||
<span>{{ __('Цена') }}</span>
|
||||
<div class="pc-range-fields">
|
||||
<input
|
||||
type="number"
|
||||
@@ -178,7 +184,7 @@
|
||||
value="{{ $priceFilter['from'] ?? '' }}"
|
||||
@if (!empty($priceFilter['min'])) min="{{ $priceFilter['min'] }}" @endif
|
||||
@if (!empty($priceFilter['max'])) max="{{ $priceFilter['max'] }}" @endif
|
||||
placeholder="От"
|
||||
placeholder="{{ __('От') }}"
|
||||
>
|
||||
<input
|
||||
type="number"
|
||||
@@ -187,7 +193,7 @@
|
||||
value="{{ $priceFilter['to'] ?? '' }}"
|
||||
@if (!empty($priceFilter['min'])) min="{{ $priceFilter['min'] }}" @endif
|
||||
@if (!empty($priceFilter['max'])) max="{{ $priceFilter['max'] }}" @endif
|
||||
placeholder="До"
|
||||
placeholder="{{ __('До') }}"
|
||||
>
|
||||
</div>
|
||||
</label>
|
||||
@@ -200,7 +206,7 @@
|
||||
@continue($filterKey === '')
|
||||
@if ($isRangeFilter)
|
||||
<label class="pc-filter-block">
|
||||
<span>{{ $filter['label'] }}</span>
|
||||
<span>{{ __($filter['label']) }}</span>
|
||||
<div class="pc-range-fields">
|
||||
<input
|
||||
type="number"
|
||||
@@ -209,7 +215,7 @@
|
||||
value="{{ $rangeData['from'] ?? '' }}"
|
||||
@if (!empty($rangeData['min'])) min="{{ $rangeData['min'] }}" @endif
|
||||
@if (!empty($rangeData['max'])) max="{{ $rangeData['max'] }}" @endif
|
||||
placeholder="От"
|
||||
placeholder="{{ __('От') }}"
|
||||
>
|
||||
<input
|
||||
type="number"
|
||||
@@ -218,33 +224,33 @@
|
||||
value="{{ $rangeData['to'] ?? '' }}"
|
||||
@if (!empty($rangeData['min'])) min="{{ $rangeData['min'] }}" @endif
|
||||
@if (!empty($rangeData['max'])) max="{{ $rangeData['max'] }}" @endif
|
||||
placeholder="До"
|
||||
placeholder="{{ __('До') }}"
|
||||
>
|
||||
</div>
|
||||
</label>
|
||||
@else
|
||||
<label class="pc-filter-block">
|
||||
<span>{{ $filter['label'] }}</span>
|
||||
<span>{{ __($filter['label']) }}</span>
|
||||
<select name="filters[{{ $filterKey }}]">
|
||||
<option value="">Все</option>
|
||||
<option value="">{{ __('Все') }}</option>
|
||||
@foreach ($filterOptions[$filterKey] ?? [] as $option)
|
||||
@php
|
||||
$optionValue = trim((string) $option);
|
||||
@endphp
|
||||
@continue($optionValue === '')
|
||||
<option value="{{ $optionValue }}" @selected(($appliedFilters[$filterKey] ?? '') === $optionValue)>
|
||||
{{ $optionValue }}
|
||||
{{ __($optionValue) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
@endif
|
||||
@empty
|
||||
<p class="pc-muted">Для этой категории фильтры пока не заданы.</p>
|
||||
<p class="pc-muted">{{ __('Для этой категории фильтры пока не заданы.') }}</p>
|
||||
@endforelse
|
||||
<div class="pc-filter-actions">
|
||||
<button type="submit" class="pc-btn primary">Показать</button>
|
||||
<a class="pc-btn ghost" href="{{ route('catalog.category', $category) }}">Сбросить</a>
|
||||
<button type="submit" class="pc-btn primary">{{ __('Показать') }}</button>
|
||||
<a class="pc-btn ghost" href="{{ route('catalog.category', $category) }}">{{ __('Сбросить') }}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -254,7 +260,7 @@
|
||||
@forelse ($products as $product)
|
||||
@include('partials.product-card', ['product' => $product])
|
||||
@empty
|
||||
<div class="pc-card">Пока нет товаров в этой категории.</div>
|
||||
<div class="pc-card">{{ __('Пока нет товаров в этой категории.') }}</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Корзина', 'url' => route('cart.index')],
|
||||
['label' => 'Данные получателя', 'url' => route('checkout.show')],
|
||||
['label' => 'Реквизиты для оплаты', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Корзина'), 'url' => route('cart.index')],
|
||||
['label' => __('Данные получателя'), 'url' => route('checkout.show')],
|
||||
['label' => __('Реквизиты для оплаты'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Реквизиты для оплаты</h2>
|
||||
<p>Переведите сумму заказа по реквизитам ниже и подтвердите оформление.</p>
|
||||
<h2>{{ __('Реквизиты для оплаты') }}</h2>
|
||||
<p>{{ __('Переведите сумму заказа по реквизитам ниже и подтвердите оформление.') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="pc-cart-layout">
|
||||
<div class="pc-card">
|
||||
<h3>Данные получателя</h3>
|
||||
<h3>{{ __('Данные получателя') }}</h3>
|
||||
<p><strong>{{ $customer['customer_name'] }}</strong></p>
|
||||
<p>{{ $customer['email'] }}</p>
|
||||
@if (!empty($customer['phone']))
|
||||
@@ -26,16 +26,16 @@
|
||||
@endif
|
||||
<p>{{ $customer['address'] }}</p>
|
||||
@if (!empty($customer['comment']))
|
||||
<p>Комментарий: {{ $customer['comment'] }}</p>
|
||||
<p>{{ __('Комментарий:') }} {{ $customer['comment'] }}</p>
|
||||
@endif
|
||||
|
||||
<div class="pc-product-actions">
|
||||
<a class="pc-btn ghost" href="{{ route('checkout.show') }}">Изменить данные</a>
|
||||
<a class="pc-btn ghost" href="{{ route('checkout.show') }}">{{ __('Изменить данные') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside class="pc-card pc-cart-summary">
|
||||
<h3>Ваш заказ</h3>
|
||||
<h3>{{ __('Ваш заказ') }}</h3>
|
||||
<div class="pc-account-orders">
|
||||
@foreach ($items as $item)
|
||||
<div class="pc-account-order">
|
||||
@@ -45,11 +45,11 @@
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Товаров</span>
|
||||
<span>{{ __('Товаров') }}</span>
|
||||
<strong>{{ $itemsCount }}</strong>
|
||||
</div>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Итого</span>
|
||||
<span>{{ __('Итого') }}</span>
|
||||
<strong>{{ number_format($total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</div>
|
||||
</aside>
|
||||
@@ -57,13 +57,13 @@
|
||||
|
||||
@include('partials.payment-requisites', [
|
||||
'amount' => $total,
|
||||
'purpose' => 'Номер заказа будет присвоен после подтверждения',
|
||||
'purpose' => __('Номер заказа будет присвоен после подтверждения'),
|
||||
'showHelp' => true,
|
||||
])
|
||||
|
||||
<form method="post" action="{{ route('checkout.store') }}">
|
||||
@csrf
|
||||
<button class="pc-btn primary" type="submit">Подтвердить оформление заказа</button>
|
||||
<button class="pc-btn primary" type="submit">{{ __('Подтвердить оформление заказа') }}</button>
|
||||
</form>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@@ -3,28 +3,28 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Заказ оформлен', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Заказ оформлен'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-card">
|
||||
<h2>Заказ №{{ $order->id }} успешно оформлен</h2>
|
||||
<p>Мы приняли заказ в обработку. Статус заказа: <strong>{{ $order->status }}</strong>.</p>
|
||||
<p>Способ оплаты: <strong>{{ $order->payment_method_label }}</strong>.</p>
|
||||
<p>Сумма заказа: <strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>.</p>
|
||||
<h2>{{ __('Заказ №:number успешно оформлен', ['number' => $order->id]) }}</h2>
|
||||
<p>{{ __('Мы приняли заказ в обработку. Статус заказа:') }} <strong>{{ $order->status_label }}</strong>.</p>
|
||||
<p>{{ __('Способ оплаты:') }} <strong>{{ $order->payment_method_label }}</strong>.</p>
|
||||
<p>{{ __('Сумма заказа:') }} <strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>.</p>
|
||||
|
||||
@include('partials.payment-requisites', [
|
||||
'amount' => $order->total,
|
||||
'purpose' => 'Заказ #' . $order->id,
|
||||
'purpose' => __('Заказ #:number', ['number' => $order->id]),
|
||||
'showHelp' => true,
|
||||
])
|
||||
|
||||
<div class="pc-product-actions">
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Продолжить покупки</a>
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Продолжить покупки') }}</a>
|
||||
@auth
|
||||
<a class="pc-btn ghost" href="{{ route('account.orders.show', $order) }}">Открыть заказ</a>
|
||||
<a class="pc-btn ghost" href="{{ route('account.orders.show', $order) }}">{{ __('Открыть заказ') }}</a>
|
||||
@endauth
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Корзина', 'url' => route('cart.index')],
|
||||
['label' => 'Данные получателя', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Корзина'), 'url' => route('cart.index')],
|
||||
['label' => __('Данные получателя'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Данные получателя</h2>
|
||||
<p>Заполните контакты и перейдите на страницу с реквизитами для оплаты.</p>
|
||||
<h2>{{ __('Данные получателя') }}</h2>
|
||||
<p>{{ __('Заполните контакты и перейдите на страницу с реквизитами для оплаты.') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="pc-cart-layout">
|
||||
<form class="pc-card pc-form" method="post" action="{{ route('checkout.prepare') }}">
|
||||
@csrf
|
||||
<label>
|
||||
Имя получателя
|
||||
{{ __('Имя получателя') }}
|
||||
<input type="text" name="customer_name" value="{{ old('customer_name', session('checkout.customer.customer_name', auth()->user()->name ?? '')) }}" required>
|
||||
</label>
|
||||
<label>
|
||||
@@ -27,22 +27,22 @@
|
||||
<input type="email" name="email" value="{{ old('email', session('checkout.customer.email', auth()->user()->email ?? '')) }}" required>
|
||||
</label>
|
||||
<label>
|
||||
Телефон
|
||||
{{ __('Телефон') }}
|
||||
<input type="text" name="phone" value="{{ old('phone', session('checkout.customer.phone')) }}">
|
||||
</label>
|
||||
<label>
|
||||
Адрес доставки
|
||||
{{ __('Адрес доставки') }}
|
||||
<textarea name="address" required>{{ old('address', session('checkout.customer.address')) }}</textarea>
|
||||
</label>
|
||||
<label>
|
||||
Комментарий к заказу
|
||||
{{ __('Комментарий к заказу') }}
|
||||
<textarea name="comment">{{ old('comment', session('checkout.customer.comment')) }}</textarea>
|
||||
</label>
|
||||
<button class="pc-btn primary" type="submit">Перейти к реквизитам</button>
|
||||
<button class="pc-btn primary" type="submit">{{ __('Перейти к реквизитам') }}</button>
|
||||
</form>
|
||||
|
||||
<aside class="pc-card pc-cart-summary">
|
||||
<h3>Ваш заказ</h3>
|
||||
<h3>{{ __('Ваш заказ') }}</h3>
|
||||
<div class="pc-account-orders">
|
||||
@foreach ($items as $item)
|
||||
<div class="pc-account-order">
|
||||
@@ -52,11 +52,11 @@
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Товаров</span>
|
||||
<span>{{ __('Товаров') }}</span>
|
||||
<strong>{{ $itemsCount }}</strong>
|
||||
</div>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Итого</span>
|
||||
<span>{{ __('Итого') }}</span>
|
||||
<strong>{{ number_format($total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
@@ -3,28 +3,28 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Сравнение', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Сравнение'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Сравнение товаров</h2>
|
||||
<h2>{{ __('Сравнение товаров') }}</h2>
|
||||
</div>
|
||||
|
||||
@if ($products->isEmpty())
|
||||
<div class="pc-card">
|
||||
<h3>Список сравнения пуст</h3>
|
||||
<p>Добавьте товары в сравнение из карточек каталога.</p>
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Перейти в каталог</a>
|
||||
<h3>{{ __('Список сравнения пуст') }}</h3>
|
||||
<p>{{ __('Добавьте товары в сравнение из карточек каталога.') }}</p>
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
|
||||
</div>
|
||||
@else
|
||||
<div class="pc-compare-actions">
|
||||
<form method="post" action="{{ route('compare.clear') }}" data-preserve-scroll="true">
|
||||
@csrf
|
||||
@method('delete')
|
||||
<button class="pc-btn ghost" type="submit">Очистить сравнение</button>
|
||||
<button class="pc-btn ghost" type="submit">{{ __('Очистить сравнение') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<table class="pc-compare-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Характеристика</th>
|
||||
<th>{{ __('Характеристика') }}</th>
|
||||
@foreach ($products as $product)
|
||||
<th>{{ $product->name }}</th>
|
||||
@endforeach
|
||||
@@ -49,9 +49,9 @@
|
||||
<tbody>
|
||||
@foreach ($specKeys as $key)
|
||||
<tr>
|
||||
<th>{{ $specLabels[$key] ?? $key }}</th>
|
||||
<th>{{ __($specLabels[$key] ?? $key) }}</th>
|
||||
@foreach ($products as $product)
|
||||
<td>{{ data_get($product->specs, $key, '—') }}</td>
|
||||
<td>{{ __(strval(data_get($product->specs, $key, '—'))) }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Избранное', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Избранное'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Избранные товары</h2>
|
||||
<h2>{{ __('Избранные товары') }}</h2>
|
||||
</div>
|
||||
|
||||
@if ($products->isEmpty())
|
||||
<div class="pc-card">
|
||||
<h3>Список пуст</h3>
|
||||
<p>Добавьте товары в избранное из каталога или со страницы товара.</p>
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">Перейти в каталог</a>
|
||||
<h3>{{ __('Список пуст') }}</h3>
|
||||
<p>{{ __('Добавьте товары в избранное из каталога или со страницы товара.') }}</p>
|
||||
<a class="pc-btn primary" href="{{ route('catalog.index') }}">{{ __('Перейти в каталог') }}</a>
|
||||
</div>
|
||||
@else
|
||||
<div class="pc-products-grid">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@section('meta_title', 'Главная')
|
||||
@section('meta_description', 'Интернет-магазин комплектующих для ПК: процессоры, материнские платы, видеокарты, ноутбуки и периферия.')
|
||||
@section('meta_keywords', 'интернет-магазин пк, комплектующие, процессоры, видеокарты, ноутбуки')
|
||||
@section('meta_title', __('Главная'))
|
||||
@section('meta_description', __('Интернет-магазин комплектующих для ПК: процессоры, материнские платы, видеокарты, ноутбуки и периферия.'))
|
||||
@section('meta_keywords', __('интернет-магазин пк, комплектующие, процессоры, видеокарты, ноутбуки'))
|
||||
@section('meta_canonical', route('home'))
|
||||
|
||||
@section('content')
|
||||
@@ -10,62 +10,62 @@
|
||||
@include('partials.home-slider', [
|
||||
'slides' => $leftSlides,
|
||||
'sliderClass' => 'is-main',
|
||||
'fallbackTitle' => 'Собирайте ПК быстрее',
|
||||
'fallbackText' => 'Процессоры, материнские платы, видеокарты, ноутбуки и периферия в одном каталоге.',
|
||||
'fallbackTitle' => __('Собирайте ПК быстрее'),
|
||||
'fallbackText' => __('Процессоры, материнские платы, видеокарты, ноутбуки и периферия в одном каталоге.'),
|
||||
'fallbackUrl' => route('catalog.index'),
|
||||
'fallbackButton' => 'Перейти в каталог',
|
||||
'fallbackButton' => __('Перейти в каталог'),
|
||||
])
|
||||
@include('partials.home-slider', [
|
||||
'slides' => $rightSlides,
|
||||
'sliderClass' => 'is-side',
|
||||
'fallbackTitle' => 'Доставка и оплата',
|
||||
'fallbackText' => 'Узнайте сроки доставки и способы оплаты заказа.',
|
||||
'fallbackTitle' => __('Доставка и оплата'),
|
||||
'fallbackText' => __('Узнайте сроки доставки и способы оплаты заказа.'),
|
||||
'fallbackUrl' => route('pages.shipping-payment'),
|
||||
'fallbackButton' => 'Подробнее',
|
||||
'fallbackButton' => __('Подробнее'),
|
||||
])
|
||||
</section>
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Категории</h2>
|
||||
<h2>{{ __('Категории') }}</h2>
|
||||
</div>
|
||||
<div class="pc-grid pc-grid-4 pc-category-grid">
|
||||
@foreach ($categories as $category)
|
||||
<a class="pc-card pc-category-card pc-category-link" href="{{ route('catalog.category', $category) }}">
|
||||
<div class="pc-category-image" role="img" aria-label="{{ $category->name }}"></div>
|
||||
<h3 class="pc-category-title">{{ $category->name }}</h3>
|
||||
<div class="pc-category-image" role="img" aria-label="{{ __($category->name) }}"></div>
|
||||
<h3 class="pc-category-title">{{ __($category->name) }}</h3>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@include('partials.product-carousel', [
|
||||
'title' => 'Популярные товары',
|
||||
'title' => __('Популярные товары'),
|
||||
'products' => $featured,
|
||||
'emptyText' => 'Пока нет популярных товаров.',
|
||||
'emptyText' => __('Пока нет популярных товаров.'),
|
||||
])
|
||||
|
||||
@include('partials.product-carousel', [
|
||||
'title' => 'Новые товары',
|
||||
'title' => __('Новые товары'),
|
||||
'products' => $newProducts,
|
||||
'emptyText' => 'Пока нет новых товаров.',
|
||||
'emptyText' => __('Пока нет новых товаров.'),
|
||||
])
|
||||
|
||||
<section class="pc-grid pc-grid-3">
|
||||
<a class="pc-card pc-category-link" href="{{ route('pages.shipping-payment') }}">
|
||||
<div class="pc-card-meta">Сервис</div>
|
||||
<h3>Доставка и оплата</h3>
|
||||
<p>Условия доставки, способы оплаты и сроки отправки.</p>
|
||||
<div class="pc-card-meta">{{ __('Сервис') }}</div>
|
||||
<h3>{{ __('Доставка и оплата') }}</h3>
|
||||
<p>{{ __('Условия доставки, способы оплаты и сроки отправки.') }}</p>
|
||||
</a>
|
||||
<a class="pc-card pc-category-link" href="{{ route('pages.about') }}">
|
||||
<div class="pc-card-meta">Компания</div>
|
||||
<h3>О нас</h3>
|
||||
<p>Чем занимаемся и как помогаем выбрать комплектующие.</p>
|
||||
<div class="pc-card-meta">{{ __('Компания') }}</div>
|
||||
<h3>{{ __('О нас') }}</h3>
|
||||
<p>{{ __('Чем занимаемся и как помогаем выбрать комплектующие.') }}</p>
|
||||
</a>
|
||||
<a class="pc-card pc-category-link" href="{{ route('pages.contacts') }}">
|
||||
<div class="pc-card-meta">Поддержка</div>
|
||||
<h3>Контакты</h3>
|
||||
<p>Свяжитесь с нами для консультации по вашей сборке.</p>
|
||||
<div class="pc-card-meta">{{ __('Поддержка') }}</div>
|
||||
<h3>{{ __('Контакты') }}</h3>
|
||||
<p>{{ __('Свяжитесь с нами для консультации по вашей сборке.') }}</p>
|
||||
</a>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Личный кабинет', 'url' => route('account')],
|
||||
['label' => 'Заказ #' . $order->id, 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Личный кабинет'), 'url' => route('account')],
|
||||
['label' => __('Заказ #:number', ['number' => $order->id]), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Заказ #{{ $order->id }}</h2>
|
||||
<p>Статус: <strong>{{ $order->status }}</strong></p>
|
||||
<p>Способ оплаты: <strong>{{ $order->payment_method_label }}</strong></p>
|
||||
<h2>{{ __('Заказ #:number', ['number' => $order->id]) }}</h2>
|
||||
<p>{{ __('Статус:') }} <strong>{{ $order->status_label }}</strong></p>
|
||||
<p>{{ __('Способ оплаты:') }} <strong>{{ $order->payment_method_label }}</strong></p>
|
||||
</div>
|
||||
|
||||
<div class="pc-grid pc-grid-2">
|
||||
<div class="pc-card">
|
||||
<h3>Состав заказа</h3>
|
||||
<h3>{{ __('Состав заказа') }}</h3>
|
||||
<div class="pc-account-orders">
|
||||
@foreach ($order->items as $item)
|
||||
<div class="pc-account-order">
|
||||
@@ -28,13 +28,13 @@
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Итого</span>
|
||||
<span>{{ __('Итого') }}</span>
|
||||
<strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pc-card">
|
||||
<h3>Данные получателя</h3>
|
||||
<h3>{{ __('Данные получателя') }}</h3>
|
||||
<p><strong>{{ $order->customer_name }}</strong></p>
|
||||
<p>{{ $order->email }}</p>
|
||||
@if ($order->phone)
|
||||
@@ -44,7 +44,7 @@
|
||||
<p>{{ $order->address }}</p>
|
||||
@endif
|
||||
@if ($order->comment)
|
||||
<p>Комментарий: {{ $order->comment }}</p>
|
||||
<p>{{ __('Комментарий:') }} {{ $order->comment }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,7 +52,7 @@
|
||||
@if (!in_array($order->status, ['paid', 'shipped', 'completed'], true))
|
||||
@include('partials.payment-requisites', [
|
||||
'amount' => $order->total,
|
||||
'purpose' => 'Заказ #' . $order->id,
|
||||
'purpose' => __('Заказ #:number', ['number' => $order->id]),
|
||||
'showHelp' => true,
|
||||
])
|
||||
@endif
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'Product',
|
||||
'name' => $product->name,
|
||||
'description' => $product->short_description ?: ($product->description ?: "Купить {$product->name} по выгодной цене."),
|
||||
'description' => __($product->short_description ?: ($product->description ?: __('Купить :product по выгодной цене.', ['product' => $product->name]))),
|
||||
'sku' => $product->sku ?: null,
|
||||
'category' => $product->category?->name,
|
||||
'category' => $product->category?->name ? __($product->category->name) : null,
|
||||
'image' => $productSchemaImages,
|
||||
'url' => route('products.show', $product),
|
||||
'offers' => [
|
||||
@@ -47,8 +47,8 @@
|
||||
@endphp
|
||||
|
||||
@section('meta_title', $product->name)
|
||||
@section('meta_description', \Illuminate\Support\Str::limit(strip_tags($product->short_description ?: ($product->description ?: "Купить {$product->name} по выгодной цене.")), 160))
|
||||
@section('meta_keywords', $product->name . ', ' . ($product->category?->name ?? 'товар') . ', купить')
|
||||
@section('meta_description', \Illuminate\Support\Str::limit(strip_tags(__($product->short_description ?: ($product->description ?: __('Купить :product по выгодной цене.', ['product' => $product->name])))), 160))
|
||||
@section('meta_keywords', __(':product, :category, купить', ['product' => $product->name, 'category' => $product->category?->name ? __($product->category->name) : __('товар')]))
|
||||
@section('meta_canonical', route('products.show', $product))
|
||||
@section('meta_image', $productImageUrl)
|
||||
@section('meta_image_alt', $product->name)
|
||||
@@ -72,9 +72,9 @@
|
||||
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Каталог', 'url' => route('catalog.index')],
|
||||
['label' => $product->category?->name ?? 'Категория', 'url' => $product->category ? route('catalog.category', $product->category) : null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Каталог'), 'url' => route('catalog.index')],
|
||||
['label' => $product->category?->name ? __($product->category->name) : __('Категория'), 'url' => $product->category ? route('catalog.category', $product->category) : null],
|
||||
['label' => $product->name, 'url' => null],
|
||||
],
|
||||
])
|
||||
@@ -96,20 +96,20 @@
|
||||
@endif
|
||||
|
||||
@if (count($productGallery) > 1)
|
||||
<div class="pc-product-thumbs" aria-label="Дополнительные изображения товара">
|
||||
<div class="pc-product-thumbs" aria-label="{{ __('Дополнительные изображения товара') }}">
|
||||
@foreach ($productGallery as $imageUrl)
|
||||
<button
|
||||
class="pc-product-thumb {{ $loop->first ? 'is-active' : '' }}"
|
||||
type="button"
|
||||
data-product-gallery-thumb
|
||||
data-image-src="{{ $imageUrl }}"
|
||||
data-image-alt="{{ $product->name }} - фото {{ $loop->iteration }}"
|
||||
aria-label="Показать фото {{ $loop->iteration }}"
|
||||
data-image-alt="{{ __(':product - фото :number', ['product' => $product->name, 'number' => $loop->iteration]) }}"
|
||||
aria-label="{{ __('Показать фото :number', ['number' => $loop->iteration]) }}"
|
||||
aria-pressed="{{ $loop->first ? 'true' : 'false' }}"
|
||||
>
|
||||
<img
|
||||
src="{{ $imageUrl }}"
|
||||
alt="{{ $product->name }} - миниатюра {{ $loop->iteration }}"
|
||||
alt="{{ __(':product - миниатюра :number', ['product' => $product->name, 'number' => $loop->iteration]) }}"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
>
|
||||
@@ -120,10 +120,10 @@
|
||||
</div>
|
||||
<div class="pc-product-info">
|
||||
<h1>{{ $product->name }}</h1>
|
||||
<p class="pc-muted">{{ $product->short_description }}</p>
|
||||
<p class="pc-muted">{{ __($product->short_description) }}</p>
|
||||
<div class="pc-product-badges">
|
||||
@if ($product->sku)
|
||||
<span class="pc-sku">Артикул: {{ $product->sku }}</span>
|
||||
<span class="pc-sku">{{ __('Артикул:') }} {{ $product->sku }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="pc-product-price">
|
||||
@@ -137,22 +137,22 @@
|
||||
<form method="post" action="{{ route('cart.add', $product) }}" data-preserve-scroll="true">
|
||||
@csrf
|
||||
<button class="pc-btn primary {{ $isInCart ? 'is-active' : '' }}" type="submit">
|
||||
{{ $isInCart ? 'В корзине' : 'В корзину' }}
|
||||
{{ $isInCart ? __('В корзине') : __('В корзину') }}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<button class="pc-btn primary" type="button" disabled>Нет в наличии</button>
|
||||
<button class="pc-btn primary" type="button" disabled>{{ __('Нет в наличии') }}</button>
|
||||
@endif
|
||||
<form method="post" action="{{ route('favorites.toggle', $product) }}" data-preserve-scroll="true">
|
||||
@csrf
|
||||
<button class="pc-btn ghost {{ $isFavorite ? 'is-active' : '' }}" type="submit">
|
||||
{{ $isFavorite ? 'Убрать из избранного' : 'В избранное' }}
|
||||
{{ $isFavorite ? __('Убрать из избранного') : __('В избранное') }}
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" action="{{ route('compare.toggle', $product) }}" data-preserve-scroll="true">
|
||||
@csrf
|
||||
<button class="pc-btn ghost {{ $isCompared ? 'is-active' : '' }}" type="submit">
|
||||
{{ $isCompared ? 'Убрать из сравнения' : 'В сравнение' }}
|
||||
{{ $isCompared ? __('Убрать из сравнения') : __('В сравнение') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -166,10 +166,10 @@
|
||||
<input type="radio" name="product-tabs" id="tab-payment">
|
||||
|
||||
<div class="pc-tab-labels">
|
||||
<label for="tab-specs">Характеристики</label>
|
||||
<label for="tab-desc">Описание</label>
|
||||
<label for="tab-shipping">Доставка</label>
|
||||
<label for="tab-payment">Оплата</label>
|
||||
<label for="tab-specs">{{ __('Характеристики') }}</label>
|
||||
<label for="tab-desc">{{ __('Описание') }}</label>
|
||||
<label for="tab-shipping">{{ __('Доставка') }}</label>
|
||||
<label for="tab-payment">{{ __('Оплата') }}</label>
|
||||
</div>
|
||||
|
||||
<div class="pc-tab-content">
|
||||
@@ -177,29 +177,29 @@
|
||||
<div class="pc-specs-grid">
|
||||
@forelse (($product->specs ?? []) as $key => $value)
|
||||
<div class="pc-spec-row">
|
||||
<span>{{ $specLabels[$key] ?? str_replace('_', ' ', $key) }}</span>
|
||||
<strong>{{ $value }}</strong>
|
||||
<span>{{ __($specLabels[$key] ?? str_replace('_', ' ', $key)) }}</span>
|
||||
<strong>{{ __((string) $value) }}</strong>
|
||||
</div>
|
||||
@empty
|
||||
<p class="pc-muted">Характеристики еще не добавлены.</p>
|
||||
<p class="pc-muted">{{ __('Характеристики еще не добавлены.') }}</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</section>
|
||||
<section class="pc-tab-panel pc-tab-desc">
|
||||
<p class="pc-muted">{{ $product->description ?? 'Описание товара будет добавлено позже.' }}</p>
|
||||
<p class="pc-muted">{{ __($product->description ?? __('Описание товара будет добавлено позже.')) }}</p>
|
||||
</section>
|
||||
<section class="pc-tab-panel pc-tab-shipping">
|
||||
<ul class="pc-list">
|
||||
<li>Доставка курьером по городу</li>
|
||||
<li>Самовывоз из пункта выдачи</li>
|
||||
<li>Отправка по стране 1-3 дня</li>
|
||||
<li>{{ __('Доставка курьером по городу') }}</li>
|
||||
<li>{{ __('Самовывоз из пункта выдачи') }}</li>
|
||||
<li>{{ __('Отправка по стране 1-3 дня') }}</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="pc-tab-panel pc-tab-payment">
|
||||
<ul class="pc-list">
|
||||
<li>Оплата картой онлайн</li>
|
||||
<li>Банковский перевод</li>
|
||||
<li>Рассрочка на крупные заказы</li>
|
||||
<li>{{ __('Оплата картой онлайн') }}</li>
|
||||
<li>{{ __('Банковский перевод') }}</li>
|
||||
<li>{{ __('Рассрочка на крупные заказы') }}</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
@@ -209,7 +209,7 @@
|
||||
@if ($related->isNotEmpty())
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Что еще посмотреть в этой категории</h2>
|
||||
<h2>{{ __('Что еще посмотреть в этой категории') }}</h2>
|
||||
</div>
|
||||
<div class="pc-products-grid">
|
||||
@foreach ($related as $item)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
? [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'SearchResultsPage',
|
||||
'name' => "Результаты поиска: {$searchQuery}",
|
||||
'name' => __('Результаты поиска: :query', ['query' => $searchQuery]),
|
||||
'url' => route('search.index', ['q' => $searchQuery]),
|
||||
'mainEntity' => [
|
||||
'@type' => 'ItemList',
|
||||
@@ -25,14 +25,14 @@
|
||||
: null;
|
||||
@endphp
|
||||
|
||||
@section('meta_title', $searchQuery !== '' ? "Поиск: {$searchQuery}" : 'Поиск товаров')
|
||||
@section('meta_title', $searchQuery !== '' ? __('Поиск: :query', ['query' => $searchQuery]) : __('Поиск товаров'))
|
||||
@section(
|
||||
'meta_description',
|
||||
$searchQuery !== ''
|
||||
? "Найденные товары по запросу «{$searchQuery}». Выберите подходящий товар и откройте подробную карточку."
|
||||
: 'Поиск товаров по наименованию: процессоры, видеокарты, материнские платы, ноутбуки и периферия.'
|
||||
? __('Найденные товары по запросу «:query». Выберите подходящий товар и откройте подробную карточку.', ['query' => $searchQuery])
|
||||
: __('Поиск товаров по наименованию: процессоры, видеокарты, материнские платы, ноутбуки и периферия.')
|
||||
)
|
||||
@section('meta_keywords', 'поиск товаров, результаты поиска, комплектующие пк, ноутбуки')
|
||||
@section('meta_keywords', __('поиск товаров, результаты поиска, комплектующие пк, ноутбуки'))
|
||||
@section('meta_canonical', route('search.index'))
|
||||
@section('meta_robots', 'noindex,follow')
|
||||
|
||||
@@ -47,20 +47,20 @@
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Главная', 'url' => route('home')],
|
||||
['label' => 'Поиск', 'url' => null],
|
||||
['label' => __('Главная'), 'url' => route('home')],
|
||||
['label' => __('Поиск'), 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-category-toolbar">
|
||||
<div class="pc-section-title">
|
||||
<h2>{{ $searchQuery !== '' ? 'Результаты поиска' : 'Поиск товаров' }}</h2>
|
||||
<h2>{{ $searchQuery !== '' ? __('Результаты поиска') : __('Поиск товаров') }}</h2>
|
||||
<p>
|
||||
@if ($searchQuery !== '')
|
||||
Запрос: "{{ $searchQuery }}"
|
||||
{{ __('Запрос: ":query"', ['query' => $searchQuery]) }}
|
||||
@else
|
||||
Введите название товара, чтобы увидеть найденные позиции.
|
||||
{{ __('Введите название товара, чтобы увидеть найденные позиции.') }}
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
@@ -68,12 +68,12 @@
|
||||
@if ($searchQuery !== '')
|
||||
<form class="pc-sort-form" method="get" action="{{ route('search.index') }}">
|
||||
<input type="hidden" name="q" value="{{ $searchQuery }}">
|
||||
<label for="sort">Сортировка:</label>
|
||||
<label for="sort">{{ __('Сортировка:') }}</label>
|
||||
<select id="sort" name="sort" onchange="this.form.submit()">
|
||||
<option value="newest" @selected($sort === 'newest')>Сначала новые</option>
|
||||
<option value="price_asc" @selected($sort === 'price_asc')>Сначала дешевле</option>
|
||||
<option value="price_desc" @selected($sort === 'price_desc')>Сначала дороже</option>
|
||||
<option value="name_asc" @selected($sort === 'name_asc')>По названию</option>
|
||||
<option value="newest" @selected($sort === 'newest')>{{ __('Сначала новые') }}</option>
|
||||
<option value="price_asc" @selected($sort === 'price_asc')>{{ __('Сначала дешевле') }}</option>
|
||||
<option value="price_desc" @selected($sort === 'price_desc')>{{ __('Сначала дороже') }}</option>
|
||||
<option value="name_asc" @selected($sort === 'name_asc')>{{ __('По названию') }}</option>
|
||||
</select>
|
||||
</form>
|
||||
@endif
|
||||
@@ -81,26 +81,26 @@
|
||||
|
||||
<form class="pc-search-page-form" method="get" action="{{ route('search.index') }}">
|
||||
<div class="pc-search">
|
||||
<input type="text" name="q" placeholder="Например, Ryzen 7 или RTX 4060" value="{{ $searchQuery }}">
|
||||
<input type="text" name="q" placeholder="{{ __('Например, Ryzen 7 или RTX 4060') }}" value="{{ $searchQuery }}">
|
||||
</div>
|
||||
<button class="pc-btn primary" type="submit">Найти</button>
|
||||
<button class="pc-btn primary" type="submit">{{ __('Найти') }}</button>
|
||||
@if ($searchQuery !== '')
|
||||
<a class="pc-btn ghost" href="{{ route('search.index') }}">Очистить</a>
|
||||
<a class="pc-btn ghost" href="{{ route('search.index') }}">{{ __('Очистить') }}</a>
|
||||
@endif
|
||||
</form>
|
||||
|
||||
@if ($searchQuery === '')
|
||||
<div class="pc-card">
|
||||
Введите запрос в строку поиска, чтобы открыть список найденных товаров.
|
||||
{{ __('Введите запрос в строку поиска, чтобы открыть список найденных товаров.') }}
|
||||
</div>
|
||||
@else
|
||||
<p class="pc-muted">Найдено товаров: <strong>{{ $products->total() }}</strong></p>
|
||||
<p class="pc-muted">{{ __('Найдено товаров:') }} <strong>{{ $products->total() }}</strong></p>
|
||||
|
||||
<div class="pc-products-grid">
|
||||
@forelse ($products as $product)
|
||||
@include('partials.product-card', ['product' => $product])
|
||||
@empty
|
||||
<div class="pc-card">По вашему запросу ничего не найдено.</div>
|
||||
<div class="pc-card">{{ __('По вашему запросу ничего не найдено.') }}</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user