diff --git a/public/store/controller/common/header.php b/public/store/controller/common/header.php index c62dc9e..616fa6b 100644 --- a/public/store/controller/common/header.php +++ b/public/store/controller/common/header.php @@ -99,6 +99,7 @@ foreach(['name','email','telephone','address','open', 'comment'] as $item){ } else { $data['blog_menu'] = ''; } + $data['service_menu'] = $this->load->controller('service/menu'); $data['search'] = $this->load->controller('common/search'); $data['cart'] = $this->load->controller('common/cart'); $data['menu'] = $this->load->controller('common/menu'); diff --git a/public/store/controller/service/category.php b/public/store/controller/service/category.php index befd2a5..3247b04 100644 --- a/public/store/controller/service/category.php +++ b/public/store/controller/service/category.php @@ -6,8 +6,8 @@ class ControllerServiceCategory extends Controller { $this->load->model('service/service'); $this->load->model('tool/image'); - $sort = isset($this->request->get['sort']) ? $this->request->get['sort'] : 'p.date_added'; - $order = isset($this->request->get['order']) ? $this->request->get['order'] : 'DESC'; + $sort = isset($this->request->get['sort']) ? $this->request->get['sort'] : 'p.sort_order'; + $order = isset($this->request->get['order']) ? $this->request->get['order'] : 'ASC'; $page = isset($this->request->get['page']) ? (int)$this->request->get['page'] : 1; $limit = isset($this->request->get['limit']) ? (int)$this->request->get['limit'] : (int)$this->config->get('configblog_article_limit'); $service_category_path = isset($this->request->get['service_category_id']) ? (string)$this->request->get['service_category_id'] : ''; @@ -68,6 +68,7 @@ class ControllerServiceCategory extends Controller { $data['heading_title'] = $category_info['meta_h1'] ? $category_info['meta_h1'] : $category_info['name']; $data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8'); $data['button_more'] = $this->language->get('button_more'); + $data['button_request'] = $this->language->get('button_request'); $data['text_empty'] = $this->language->get('text_empty'); $data['text_refine'] = $this->language->get('text_refine'); @@ -95,11 +96,12 @@ class ControllerServiceCategory extends Controller { ); $service_total = $this->model_service_service->getTotalServices($filter_data); + $data['service_total'] = $service_total; $data['services'] = array(); foreach ($this->model_service_service->getServices($filter_data) as $service) { if ($service['image']) { - $image = $this->model_tool_image->resize($service['image'], $this->config->get('configblog_image_article_width'), $this->config->get('configblog_image_article_height')); + $image = $this->model_tool_image->resize($service['image'], 610, 818); } else { $image = false; } diff --git a/public/store/controller/service/menu.php b/public/store/controller/service/menu.php new file mode 100644 index 0000000..d82891f --- /dev/null +++ b/public/store/controller/service/menu.php @@ -0,0 +1,28 @@ +load->model('service/category'); + + $data['categories'] = $this->getCategories(); + + return $this->load->view('service/menu', $data); + } + + private function getCategories($parent_id = 0, $path = '') { + $category_data = array(); + $categories = $this->model_service_category->getCategories($parent_id); + + foreach ($categories as $category) { + $category_path = $path ? $path . '_' . $category['service_category_id'] : $category['service_category_id']; + + $category_data[] = array( + 'name' => $category['name'], + 'href' => $this->url->link('service/category', 'service_category_id=' . $category_path) + ); + + $category_data = array_merge($category_data, $this->getCategories($category['service_category_id'], $category_path)); + } + + return $category_data; + } +} diff --git a/public/store/controller/service/service.php b/public/store/controller/service/service.php index 5b0977e..fa5520c 100644 --- a/public/store/controller/service/service.php +++ b/public/store/controller/service/service.php @@ -68,12 +68,23 @@ class ControllerServiceService extends Controller { $data['text_related'] = $this->language->get('text_related'); $data['text_related_product'] = $this->language->get('text_related_product'); + $data['button_more'] = $this->language->get('button_more'); + $data['button_request'] = $this->language->get('button_request'); + $data['button_all_services'] = $this->language->get('button_all_services'); $data['service_id'] = $this->request->get['service_id']; $data['description'] = html_entity_decode($service_info['description'], ENT_QUOTES, 'UTF-8'); + $data['summary'] = $service_info['meta_description']; + $data['category_href'] = $this->url->link('service/category', 'service_category_id=' . $service_category_path); $this->load->model('tool/image'); + if ($service_info['image']) { + $data['thumb'] = $this->model_tool_image->resize($service_info['image'], 610, 818); + } else { + $data['thumb'] = ''; + } + $data['services'] = array(); $results = $this->model_service_service->getServiceRelated($this->request->get['service_id']); diff --git a/public/store/language/ru-ru/service/category.php b/public/store/language/ru-ru/service/category.php index 7a5bd71..2d550af 100644 --- a/public/store/language/ru-ru/service/category.php +++ b/public/store/language/ru-ru/service/category.php @@ -27,5 +27,6 @@ $_['text_name_asc'] = 'Названию (по возрастанию)'; $_['text_name_desc'] = 'Названию (по убыванию)'; $_['text_default'] = 'По умолчанию'; -$_['button_more'] = 'подробнее'; -?> \ No newline at end of file +$_['button_more'] = 'Подробнее'; +$_['button_request'] = 'Записаться на консультацию'; +?> diff --git a/public/store/language/ru-ru/service/service.php b/public/store/language/ru-ru/service/service.php index bb2b885..d588e88 100644 --- a/public/store/language/ru-ru/service/service.php +++ b/public/store/language/ru-ru/service/service.php @@ -26,4 +26,6 @@ $_['text_related_product'] = 'Сопутствующие товары'; $_['text_tax'] = 'Без НДС:'; $_['text_service'] = 'Услуги'; -$_['button_more'] = 'подробнее'; +$_['button_more'] = 'Подробнее'; +$_['button_request'] = 'Записаться на консультацию'; +$_['button_all_services'] = 'Все услуги'; diff --git a/public/store/view/theme/dominik/assets/css/main.css b/public/store/view/theme/dominik/assets/css/main.css index cdb19da..ff1ee31 100644 --- a/public/store/view/theme/dominik/assets/css/main.css +++ b/public/store/view/theme/dominik/assets/css/main.css @@ -359,6 +359,520 @@ section{ fill: #000 !important; } +.service-category-page, +.service-page { + background: linear-gradient(180deg, #f8f6f5 0, #fff 460px); + color: #14142b; +} + +.service-category-hero, +.service-hero { + padding: 34px 0 76px; +} + +.service-breadcrumb { + display: flex; + flex-wrap: wrap; + gap: 4px; + padding: 0; + margin: 0 0 38px; + list-style: none; + color: rgba(20, 20, 43, 0.58); + font-size: 14px; +} + +.service-breadcrumb span { + margin-left: 4px; +} + +.service-breadcrumb a:hover, +.service-text-link:hover, +.service-card__link:hover { + color: var(--color-dark-gray); +} + +.service-eyebrow { + margin-bottom: 12px; + color: var(--color-dark-gray); + font-size: 13px; + line-height: 1.25; + text-transform: uppercase; +} + +.service-category-hero__grid, +.service-hero__grid { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(230px, 360px); + gap: 48px; + align-items: end; +} + +.service-category-hero h1, +.service-hero h1 { + max-width: 870px; + margin: 0; + font-size: clamp(44px, 6.3vw, 88px); + line-height: 1.02; +} + +.service-category-hero__description, +.service-category-hero p, +.service-hero__copy p { + max-width: 700px; + margin: 22px 0 0; + color: rgba(20, 20, 43, 0.72); + font-size: 18px; + line-height: 1.65; +} + +.service-category-hero__description p:last-child { + margin-bottom: 0; +} + +.service-category-hero__aside { + display: flex; + flex-direction: column; + justify-content: center; + min-height: 210px; + padding: 28px; + background: var(--color-secondary); + color: #14142b; + font-size: 16px; + line-height: 1.45; +} + +.service-category-hero__number { + display: block; + margin-bottom: 8px; + font-size: 86px; + line-height: 0.9; +} + +.service-refine { + padding: 0 0 34px; +} + +.service-refine__list { + display: flex; + flex-wrap: wrap; + gap: 10px; +} + +.service-refine__item { + padding: 10px 16px; + border: 1px solid rgba(20, 20, 43, 0.18); + transition: background-color 0.2s, border-color 0.2s; +} + +.service-refine__item:hover { + background: var(--color-secondary); + border-color: var(--color-secondary); + color: #14142b; +} + +.service-category-content, +.service-content-section, +.service-related-section { + padding: 0 0 84px; +} + +.service-category-grid { + display: grid; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 16px; +} + +.service-card { + min-width: 0; + background: #fff; + border: 1px solid rgba(20, 20, 43, 0.1); + transition: box-shadow 0.25s, transform 0.25s; +} + +.service-card:hover { + box-shadow: 0 20px 44px rgba(20, 20, 43, 0.08); + transform: translateY(-5px); +} + +.service-card__image { + position: relative; + display: block; + overflow: hidden; + aspect-ratio: 305 / 409; + background: var(--color-secondary); +} + +.service-card__image img, +.service-related-card__image img { + width: 100%; + height: 100%; + object-fit: cover; + transition: transform 0.35s; +} + +.service-card:hover .service-card__image img, +.service-related-card:hover .service-related-card__image img { + transform: scale(1.035); +} + +.service-card__number { + position: absolute; + right: 16px; + bottom: 12px; + color: rgba(255, 255, 255, 0.78); + font-size: 42px; + line-height: 1; +} + +.service-card__body { + padding: 22px 20px 24px; +} + +.service-card h2, +.service-related-card h3 { + margin: 0; + font-size: 22px; + line-height: 1.16; +} + +.service-card p, +.service-related-card p { + margin: 14px 0 17px; + color: rgba(20, 20, 43, 0.68); + font-size: 15px; + line-height: 1.55; +} + +.service-card__link, +.service-text-link, +.service-module-card__link { + display: inline-flex; + gap: 9px; + align-items: center; + color: #14142b; + font-size: 13px; + text-transform: uppercase; +} + +.service-card__link span, +.service-text-link span, +.service-module-card__link span { + font-size: 20px; + line-height: 1; + transition: transform 0.2s; +} + +.service-card__link:hover span, +.service-text-link:hover span, +.service-module-card:hover .service-module-card__link span { + transform: translateX(4px); +} + +.service-category-pagination { + margin-top: 30px; +} + +.service-category-cta { + padding-bottom: 84px; +} + +.service-category-cta__inner { + display: flex; + gap: 30px; + align-items: center; + justify-content: space-between; + padding: 42px; + background: var(--color-secondary); +} + +.service-category-cta h2, +.service-related-head h2, +.service-sidebar h2 { + margin: 0; + font-size: 32px; + line-height: 1.14; +} + +.service-category-cta p { + max-width: 700px; + margin: 12px 0 0; + line-height: 1.55; +} + +.service-module-card { + display: block; + overflow: hidden; + color: #14142b; + transition: box-shadow 0.25s, transform 0.25s; +} + +.service-module-card:hover { + color: #14142b; + box-shadow: 0 16px 38px rgba(20, 20, 43, 0.12); + transform: translateY(-5px); +} + +.service-module-card img { + width: 100%; +} + +.service-module-card__link { + margin-top: 18px; +} + +.service-hero__grid { + grid-template-columns: minmax(0, 1fr) minmax(280px, 410px); +} + +.service-hero__grid--single { + grid-template-columns: 1fr; +} + +.service-hero__actions { + display: flex; + flex-wrap: wrap; + gap: 22px; + align-items: center; + margin-top: 32px; +} + +.service-hero__visual { + max-height: 570px; + overflow: hidden; + background: var(--color-secondary); +} + +.service-hero__visual img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; +} + +.service-content-layout { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(290px, 370px); + gap: 56px; + align-items: start; +} + +.service-content { + min-width: 0; + color: rgba(20, 20, 43, 0.78); + font-size: 17px; + line-height: 1.75; +} + +.service-content .service-lead { + margin-top: 0; + color: #14142b; + font-size: 23px; + line-height: 1.55; +} + +.service-content h2 { + margin: 42px 0 15px; + color: #14142b; + font-size: 32px; + line-height: 1.18; +} + +.service-content ol { + padding-left: 23px; + margin-bottom: 0; +} + +.service-content li { + padding-left: 6px; + margin-bottom: 9px; +} + +.service-benefits { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 12px; + margin: 28px 0 0; +} + +.service-benefits__item { + padding: 20px; + background: #f8f6f5; + border-top: 2px solid var(--color-secondary); +} + +.service-benefits__item strong, +.service-benefits__item span { + display: block; +} + +.service-benefits__item strong { + margin-bottom: 10px; + color: #14142b; + font-size: 17px; + font-weight: 400; + line-height: 1.35; +} + +.service-benefits__item span { + color: rgba(20, 20, 43, 0.68); + font-size: 14px; + line-height: 1.55; +} + +.service-sidebar { + position: sticky; + top: 96px; +} + +.service-sidebar__card { + padding: 30px; + background: #f8f6f5; + border: 1px solid rgba(20, 20, 43, 0.1); +} + +.service-sidebar p { + margin: 14px 0 24px; + color: rgba(20, 20, 43, 0.7); + line-height: 1.55; +} + +.service-sidebar .btn { + width: 100%; +} + +.service-related-section { + padding-top: 72px; + border-top: 1px solid rgba(20, 20, 43, 0.1); +} + +.service-related-head { + margin-bottom: 25px; +} + +.service-related-grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 16px; +} + +.service-related-card { + display: grid; + grid-template-columns: 150px minmax(0, 1fr); + min-width: 0; + overflow: hidden; + background: #fff; + border: 1px solid rgba(20, 20, 43, 0.1); +} + +.service-related-card__image { + min-height: 250px; + overflow: hidden; + background: var(--color-secondary); +} + +.service-related-card__body { + padding: 19px; +} + +@media (max-width: 991px) { + .service-category-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + .service-content-layout { + grid-template-columns: 1fr; + gap: 30px; + } + .service-sidebar { + position: static; + } + .service-related-grid { + grid-template-columns: 1fr; + } +} + +@media (max-width: 767px) { + .service-category-hero, + .service-hero { + padding: 24px 0 50px; + } + .service-breadcrumb { + margin-bottom: 28px; + font-size: 13px; + } + .service-category-hero__grid, + .service-hero__grid { + grid-template-columns: 1fr; + gap: 26px; + } + .service-category-hero h1, + .service-hero h1 { + font-size: 46px; + } + .service-category-hero__aside { + min-height: 0; + padding: 22px; + } + .service-category-hero__number { + font-size: 68px; + } + .service-category-content, + .service-content-section, + .service-related-section { + padding-bottom: 58px; + } + .service-category-grid { + grid-template-columns: 1fr; + } + .service-category-cta { + padding-bottom: 58px; + } + .service-category-cta__inner { + display: block; + padding: 27px 22px; + } + .service-category-cta .btn { + width: 100%; + margin-top: 18px; + } + .service-hero__visual { + max-height: 400px; + } + .service-content { + font-size: 16px; + } + .service-content .service-lead { + font-size: 20px; + } + .service-content h2 { + margin-top: 34px; + font-size: 27px; + } + .service-benefits { + grid-template-columns: 1fr; + } + .service-related-section { + padding-top: 52px; + } + .service-related-card { + grid-template-columns: 110px minmax(0, 1fr); + } + .service-related-card__image { + min-height: 220px; + } + .service-related-card__body { + padding: 15px; + } + .service-related-card h3 { + font-size: 19px; + } + .service-related-card p { + display: none; + } + .service-related-card .service-card__link { + margin-top: 18px; + } +} + .not-found-page { min-height: 60vh; display: flex; diff --git a/public/store/view/theme/dominik/template/common/header.twig b/public/store/view/theme/dominik/template/common/header.twig index 24402a9..12ca416 100644 --- a/public/store/view/theme/dominik/template/common/header.twig +++ b/public/store/view/theme/dominik/template/common/header.twig @@ -61,6 +61,7 @@
@@ -76,7 +77,7 @@
- + - +
- + - \ No newline at end of file + diff --git a/public/store/view/theme/dominik/template/extension/module/wd_services.twig b/public/store/view/theme/dominik/template/extension/module/wd_services.twig index e1538d5..9762039 100644 --- a/public/store/view/theme/dominik/template/extension/module/wd_services.twig +++ b/public/store/view/theme/dominik/template/extension/module/wd_services.twig @@ -7,20 +7,21 @@ {% endif %}
- {% for banner in banners %} - -
-
- - -
-
+ {% for banner in banners %} + +
+ + + + +
{% endfor %}
-{% endif %} \ No newline at end of file +{% endif %} diff --git a/public/store/view/theme/dominik/template/service/category.twig b/public/store/view/theme/dominik/template/service/category.twig index cccbb41..d9754cd 100644 --- a/public/store/view/theme/dominik/template/service/category.twig +++ b/public/store/view/theme/dominik/template/service/category.twig @@ -1,56 +1,85 @@ {{ header }} {{ content_top }} -
-
- -

{{ heading_title }}

-
- {% if thumb or description %} -
- {% if thumb %} -
{{ heading_title }}
- {% endif %} - {% if description %} -
{{ description }}
- {% endif %} -
-
- {% endif %} - {% if categories %} -

{{ text_refine }}

-
    - {% for category in categories %} -
  • {{ category.name }}
  • +
    +
    +
    +
      + {% for key,breadcrumb in breadcrumbs %} +
    • {{ breadcrumb.text }}{% if key + 1 < breadcrumbs|length %}{% endif %}
    • {% endfor %}
    - {% endif %} - {% if services %} -
    - {% for service in services %} -
    -
    - {% if service.thumb %} -
    {{ service.name }}
    - {% endif %} -
    -

    {{ service.name }}

    -

    {{ service.description }}

    -
    - -
    +
    +
    +
    Забота о вашем образе
    +

    {{ heading_title }}

    + {% if description %} +
    {{ description }}
    + {% else %} +

    Поможем продумать важные детали свадебного образа и подготовиться к вашему особенному дню.

    + {% endif %}
    +
    + {{ service_total }} + направления, чтобы платье стало именно вашим +
    +
    +
    +
    + + {% if categories %} +
    +
    +
    {{ text_refine }}
    +
    + {% for category in categories %} + {{ category.name }} {% endfor %}
    - {% elseif not categories %} -

    {{ text_empty }}

    - {% endif %} - {{ pagination }}
    -
-
+ + {% endif %} + +
+
+ {% if services %} +
+ {% for service in services %} + + {% endfor %} +
+
{{ pagination }}
+ {% elseif not categories %} +
+

{{ text_empty }}

+
+ {% endif %} +
+
+ +
+
+
+
+
Начнем с примерки
+

Расскажите, какой образ вы представляете

+

Консультант ответит на вопросы и поможет подобрать удобное время для визита в салон.

+
+ {{ button_request }} +
+
+
+ {{ content_bottom }} {{ footer }} diff --git a/public/store/view/theme/dominik/template/service/menu.twig b/public/store/view/theme/dominik/template/service/menu.twig new file mode 100644 index 0000000..aa778d8 --- /dev/null +++ b/public/store/view/theme/dominik/template/service/menu.twig @@ -0,0 +1,3 @@ +{% for category in categories %} +
  • {{ category.name }}
  • +{% endfor %} diff --git a/public/store/view/theme/dominik/template/service/service.twig b/public/store/view/theme/dominik/template/service/service.twig index 321e5f5..f772dec 100644 --- a/public/store/view/theme/dominik/template/service/service.twig +++ b/public/store/view/theme/dominik/template/service/service.twig @@ -1,52 +1,88 @@ {{ header }} {{ content_top }} -
    -
    - -

    {{ heading_title }}

    -
    {{ description }}
    - - {% if products %} -
    -

    {{ text_related_product }}

    -
    - {% for product in products %} -
    - {% include 'dominik/template/common/product.twig' %} -
    - {% endfor %} - -
    - {% endif %} - - {% if services %} -
    -

    {{ text_related }}

    -
    - {% for service in services %} -
    -
    -
    {{ service.name }}
    -
    -

    {{ service.name }}

    -

    {{ service.description }}

    -
    -
    - - - -
    +
    +
    +
    +
      + {% for key,breadcrumb in breadcrumbs %} +
    • {{ breadcrumb.text }}{% if key + 1 < breadcrumbs|length %}{% endif %}
    • + {% endfor %} +
    +
    +
    +
    Услуги свадебного салона
    +

    {{ heading_title }}

    + {% if summary %}

    {{ summary }}

    {% endif %} +
    + {% if thumb %} +
    + {{ heading_title }} +
    + {% endif %} +
    +
    +
    + +
    +
    +
    +
    {{ description }}
    + +
    +
    +
    + + {% if products %} + +
    +
    + {% endif %} + {% if services %} + + {% endif %} + {{ content_bottom }} {{ footer }}