Тексты товаров в разные ячейки и 404 страница

This commit is contained in:
Konstantin
2026-05-30 12:02:09 +03:00
parent af9b7b13a4
commit 0774c39ba8
23 changed files with 101 additions and 12062 deletions
@@ -100,7 +100,6 @@ foreach(['name','email','telephone','address','open', 'comment'] as $item){
$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');
+2 -12
View File
@@ -1,16 +1,6 @@
<?php
class ControllerCommonSearch extends Controller {
public function index() {
$this->load->language('common/search');
$data['text_search'] = $this->language->get('text_search');
if (isset($this->request->get['search'])) {
$data['search'] = $this->request->get['search'];
} else {
$data['search'] = '';
}
return $this->load->view('common/search', $data);
return '';
}
}
}
+12 -2
View File
@@ -38,14 +38,24 @@ class ControllerErrorNotFound extends Controller {
$data['text_eyebrow'] = $this->language->get('text_eyebrow');
$data['text_hint'] = $this->language->get('text_hint');
$data['button_home'] = $this->language->get('button_home');
$data['button_search'] = $this->language->get('button_search');
$data['button_catalog'] = $this->language->get('button_catalog');
$data['button_contact'] = $this->language->get('button_contact');
$data['button_continue'] = $this->language->get('button_home');
$data['continue'] = $this->url->link('common/home');
$data['search'] = $this->url->link('product/search');
$data['contact'] = $this->url->link('information/contact');
$this->load->model('catalog/category');
$categories = $this->model_catalog_category->getCategories(0);
$data['catalog'] = $this->url->link('common/home');
if ($categories) {
$data['catalog'] = $this->url->link('product/category', 'path=' . $categories[0]['category_id']);
$data['button_catalog'] = $categories[0]['name'];
}
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
@@ -63,7 +63,15 @@ class ControllerInformationSitemap extends Controller {
$data['download'] = $this->url->link('account/download', '', true);
$data['cart'] = $this->url->link('checkout/cart');
$data['checkout'] = $this->url->link('checkout/checkout', '', true);
$data['search'] = $this->url->link('product/search');
$data['search'] = $this->url->link('common/home');
$data['catalog'] = $this->url->link('common/home');
if ($categories_1) {
$data['search'] = $this->url->link('product/category', 'path=' . $categories_1[0]['category_id']);
$data['catalog'] = $this->url->link('product/category', 'path=' . $categories_1[0]['category_id']);
}
$data['text_catalog'] = $categories_1 ? $categories_1[0]['name'] : $this->language->get('text_search');
$data['contact'] = $this->url->link('information/contact');
$this->load->model('catalog/information');
+5 -46
View File
@@ -106,51 +106,6 @@ class ControllerProductProduct extends Controller {
}
}
if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {
$url = '';
if (isset($this->request->get['search'])) {
$url .= '&search=' . $this->request->get['search'];
}
if (isset($this->request->get['tag'])) {
$url .= '&tag=' . $this->request->get['tag'];
}
if (isset($this->request->get['description'])) {
$url .= '&description=' . $this->request->get['description'];
}
if (isset($this->request->get['category_id'])) {
$url .= '&category_id=' . $this->request->get['category_id'];
}
if (isset($this->request->get['sub_category'])) {
$url .= '&sub_category=' . $this->request->get['sub_category'];
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_search'),
'href' => $this->url->link('product/search', $url)
);
}
if (isset($this->request->get['product_id'])) {
$product_id = (int)$this->request->get['product_id'];
} else {
@@ -257,6 +212,10 @@ class ControllerProductProduct extends Controller {
$data['reward'] = $product_info['reward'];
$data['points'] = $product_info['points'];
$data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');
$data['description_first_rental'] = html_entity_decode($product_info['description_first_rental'], ENT_QUOTES, 'UTF-8');
$data['description_second_rental'] = html_entity_decode($product_info['description_second_rental'], ENT_QUOTES, 'UTF-8');
$data['description_purchase'] = html_entity_decode($product_info['description_purchase'], ENT_QUOTES, 'UTF-8');
$data['description_terms'] = html_entity_decode($product_info['description_terms'], ENT_QUOTES, 'UTF-8');
if ($product_info['quantity'] <= 0) {
$data['stock'] = $product_info['stock_status'];
@@ -471,7 +430,7 @@ $data['price_n'] = $product_info['price'];
foreach ($tags as $tag) {
$data['tags'][] = array(
'tag' => trim($tag),
'href' => $this->url->link('product/search', 'tag=' . trim($tag))
'href' => ''
);
}
}
+4 -454
View File
@@ -1,464 +1,14 @@
<?php
// * @source See SOURCE.txt for source and other copyright.
// * @license GNU General Public License version 3; see LICENSE.txt
class ControllerProductSearch extends Controller {
public function index() {
$this->load->language('product/search');
$this->load->model('catalog/category');
$this->load->model('catalog/product');
$categories = $this->model_catalog_category->getCategories(0);
$this->load->model('tool/image');
if (isset($this->request->get['search'])) {
$search = $this->request->get['search'];
if ($categories) {
$this->response->redirect($this->url->link('product/category', 'path=' . $categories[0]['category_id']));
} else {
$search = '';
$this->response->redirect($this->url->link('common/home'));
}
if (isset($this->request->get['tag'])) {
$tag = $this->request->get['tag'];
} elseif (isset($this->request->get['search'])) {
$tag = $this->request->get['search'];
} else {
$tag = '';
}
if (isset($this->request->get['description'])) {
$description = $this->request->get['description'];
} else {
$description = '';
}
if (isset($this->request->get['category_id'])) {
$category_id = $this->request->get['category_id'];
} else {
$category_id = 0;
}
if (isset($this->request->get['sub_category'])) {
$sub_category = $this->request->get['sub_category'];
} else {
$sub_category = '';
}
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'p.sort_order';
}
if (isset($this->request->get['order'])) {
$order = $this->request->get['order'];
} else {
$order = 'ASC';
}
if (isset($this->request->get['page'])) {
$page = (int)$this->request->get['page'];
} else {
$page = 1;
}
if (isset($this->request->get['limit'])) {
$limit = (int)$this->request->get['limit'];
} else {
$limit = $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit');
}
if (isset($this->request->get['search'])) {
$this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->request->get['search']);
} elseif (isset($this->request->get['tag'])) {
$this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->language->get('heading_tag') . $this->request->get['tag']);
} else {
$this->document->setTitle($this->language->get('heading_title'));
}
$this->document->setRobots('noindex,follow');
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home')
);
$url = '';
if (isset($this->request->get['search'])) {
$url .= '&search=' . urlencode(html_entity_decode($this->request->get['search'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['tag'])) {
$url .= '&tag=' . urlencode(html_entity_decode($this->request->get['tag'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['description'])) {
$url .= '&description=' . $this->request->get['description'];
}
if (isset($this->request->get['category_id'])) {
$url .= '&category_id=' . $this->request->get['category_id'];
}
if (isset($this->request->get['sub_category'])) {
$url .= '&sub_category=' . $this->request->get['sub_category'];
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('product/search', $url)
);
if (isset($this->request->get['search'])) {
$data['heading_title'] = $this->language->get('heading_title') . ' - ' . $this->request->get['search'];
} else {
$data['heading_title'] = $this->language->get('heading_title');
}
$this->document->setRobots('noindex,follow');
$data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
$data['compare'] = $this->url->link('product/compare');
// 3 Level Category Search
$data['categories'] = array();
$categories_1 = $this->model_catalog_category->getCategories(0);
foreach ($categories_1 as $category_1) {
$level_2_data = array();
$categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']);
foreach ($categories_2 as $category_2) {
$level_3_data = array();
$categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']);
foreach ($categories_3 as $category_3) {
$level_3_data[] = array(
'category_id' => $category_3['category_id'],
'name' => $category_3['name'],
);
}
$level_2_data[] = array(
'category_id' => $category_2['category_id'],
'name' => $category_2['name'],
'children' => $level_3_data
);
}
$data['categories'][] = array(
'category_id' => $category_1['category_id'],
'name' => $category_1['name'],
'children' => $level_2_data
);
}
$data['products'] = array();
if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {
$filter_data = array(
'filter_name' => $search,
'filter_tag' => $tag,
'filter_description' => $description,
'filter_category_id' => $category_id,
'filter_sub_category' => $sub_category,
'sort' => $sort,
'order' => $order,
'start' => ($page - 1) * $limit,
'limit' => $limit
);
$product_total = $this->model_catalog_product->getTotalProducts($filter_data);
$results = $this->model_catalog_product->getProducts($filter_data);
foreach ($results as $result) {
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_height'));
} else {
$image = $this->model_tool_image->resize('placeholder.png', $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_height'));
}
if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
} else {
$price = false;
}
if (!is_null($result['special']) && (float)$result['special'] >= 0) {
$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
$tax_price = (float)$result['special'];
} else {
$special = false;
$tax_price = (float)$result['price'];
}
if ($this->config->get('config_tax')) {
$tax = $this->currency->format($tax_price, $this->session->data['currency']);
} else {
$tax = false;
}
if ($this->config->get('config_review_status')) {
$rating = (int)$result['rating'];
} else {
$rating = false;
}
$data['products'][] = array(
'product_id' => $result['product_id'],
'thumb' => $image,
'name' => $result['name'],
'description' => utf8_substr(trim(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..',
'price' => $price,
'special' => $special,
'tax' => $tax,
'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1,
'rating' => $result['rating'],
'href' => $this->url->link('product/product', 'product_id=' . $result['product_id'] . $url)
);
}
$url = '';
if (isset($this->request->get['search'])) {
$url .= '&search=' . urlencode(html_entity_decode($this->request->get['search'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['tag'])) {
$url .= '&tag=' . urlencode(html_entity_decode($this->request->get['tag'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['description'])) {
$url .= '&description=' . $this->request->get['description'];
}
if (isset($this->request->get['category_id'])) {
$url .= '&category_id=' . $this->request->get['category_id'];
}
if (isset($this->request->get['sub_category'])) {
$url .= '&sub_category=' . $this->request->get['sub_category'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$data['sorts'] = array();
$data['sorts'][] = array(
'text' => $this->language->get('text_default'),
'value' => 'p.sort_order-ASC',
'href' => $this->url->link('product/search', 'sort=p.sort_order&order=ASC' . $url)
);
$data['sorts'][] = array(
'text' => $this->language->get('text_name_asc'),
'value' => 'pd.name-ASC',
'href' => $this->url->link('product/search', 'sort=pd.name&order=ASC' . $url)
);
$data['sorts'][] = array(
'text' => $this->language->get('text_name_desc'),
'value' => 'pd.name-DESC',
'href' => $this->url->link('product/search', 'sort=pd.name&order=DESC' . $url)
);
$data['sorts'][] = array(
'text' => $this->language->get('text_price_asc'),
'value' => 'p.price-ASC',
'href' => $this->url->link('product/search', 'sort=p.price&order=ASC' . $url)
);
$data['sorts'][] = array(
'text' => $this->language->get('text_price_desc'),
'value' => 'p.price-DESC',
'href' => $this->url->link('product/search', 'sort=p.price&order=DESC' . $url)
);
if ($this->config->get('config_review_status')) {
$data['sorts'][] = array(
'text' => $this->language->get('text_rating_desc'),
'value' => 'rating-DESC',
'href' => $this->url->link('product/search', 'sort=rating&order=DESC' . $url)
);
$data['sorts'][] = array(
'text' => $this->language->get('text_rating_asc'),
'value' => 'rating-ASC',
'href' => $this->url->link('product/search', 'sort=rating&order=ASC' . $url)
);
}
$data['sorts'][] = array(
'text' => $this->language->get('text_model_asc'),
'value' => 'p.model-ASC',
'href' => $this->url->link('product/search', 'sort=p.model&order=ASC' . $url)
);
$data['sorts'][] = array(
'text' => $this->language->get('text_model_desc'),
'value' => 'p.model-DESC',
'href' => $this->url->link('product/search', 'sort=p.model&order=DESC' . $url)
);
$url = '';
if (isset($this->request->get['search'])) {
$url .= '&search=' . urlencode(html_entity_decode($this->request->get['search'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['tag'])) {
$url .= '&tag=' . urlencode(html_entity_decode($this->request->get['tag'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['description'])) {
$url .= '&description=' . $this->request->get['description'];
}
if (isset($this->request->get['category_id'])) {
$url .= '&category_id=' . $this->request->get['category_id'];
}
if (isset($this->request->get['sub_category'])) {
$url .= '&sub_category=' . $this->request->get['sub_category'];
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
$data['limits'] = array();
$limits = array_unique(array($this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'), 25, 50, 75, 100));
sort($limits);
foreach($limits as $value) {
$data['limits'][] = array(
'text' => $value,
'value' => $value,
'href' => $this->url->link('product/search', $url . '&limit=' . $value)
);
}
$url = '';
if (isset($this->request->get['search'])) {
$url .= '&search=' . urlencode(html_entity_decode($this->request->get['search'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['tag'])) {
$url .= '&tag=' . urlencode(html_entity_decode($this->request->get['tag'], ENT_QUOTES, 'UTF-8'));
}
if (isset($this->request->get['description'])) {
$url .= '&description=' . $this->request->get['description'];
}
if (isset($this->request->get['category_id'])) {
$url .= '&category_id=' . $this->request->get['category_id'];
}
if (isset($this->request->get['sub_category'])) {
$url .= '&sub_category=' . $this->request->get['sub_category'];
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['limit'])) {
$url .= '&limit=' . $this->request->get['limit'];
}
$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->url = $this->url->link('product/search', $url . '&page={page}');
$data['pagination'] = $pagination->render();
$data['results'] = sprintf($this->language->get('text_pagination'), ($product_total) ? (($page - 1) * $limit) + 1 : 0, ((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit), $product_total, ceil($product_total / $limit));
if (isset($this->request->get['search']) && $this->config->get('config_customer_search')) {
$this->load->model('account/search');
if ($this->customer->isLogged()) {
$customer_id = $this->customer->getId();
} else {
$customer_id = 0;
}
if (isset($this->request->server['REMOTE_ADDR'])) {
$ip = $this->request->server['REMOTE_ADDR'];
} else {
$ip = '';
}
$search_data = array(
'keyword' => $search,
'category_id' => $category_id,
'sub_category' => $sub_category,
'description' => $description,
'products' => $product_total,
'customer_id' => $customer_id,
'ip' => $ip
);
$this->model_account_search->addSearch($search_data);
}
}
$data['search'] = $search;
$data['description'] = $description;
$data['category_id'] = $category_id;
$data['sub_category'] = $sub_category;
$data['sort'] = $sort;
$data['order'] = $order;
$data['limit'] = $limit;
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
$this->response->setOutput($this->load->view('product/search', $data));
}
}
@@ -8,9 +8,9 @@ $_['heading_title'] = 'Страница не найдена';
// Text
$_['text_eyebrow'] = 'Ошибка 404';
$_['text_error'] = 'Похоже, эта страница больше не доступна или адрес был введён с ошибкой.';
$_['text_hint'] = 'Вернитесь на главную, посмотрите каталог через поиск или напишите нам — поможем найти нужную вещь.';
$_['text_hint'] = 'Вернитесь на главную, перейдите в каталог или напишите нам — поможем найти нужную вещь.';
// Button
$_['button_home'] = 'На главную';
$_['button_search'] = 'К поиску';
$_['button_catalog'] = 'Каталог';
$_['button_contact'] = 'Написать нам';
+4
View File
@@ -15,6 +15,10 @@ class ModelCatalogProduct extends Model {
'product_id' => $query->row['product_id'],
'name' => $query->row['name'],
'description' => $query->row['description'],
'description_first_rental' => $query->row['description_first_rental'],
'description_second_rental' => $query->row['description_second_rental'],
'description_purchase' => $query->row['description_purchase'],
'description_terms' => $query->row['description_terms'],
'meta_title' => $query->row['meta_title'],
'noindex' => $query->row['noindex'],
'meta_h1' => $query->row['meta_h1'],
+2 -10
View File
@@ -52,20 +52,12 @@ $(document).ready(function() {
/* Search */
$('#search input[name=\'search\']').parent().find('button').on('click', function() {
var url = $('base').attr('href') + 'index.php?route=product/search';
var value = $('header #search input[name=\'search\']').val();
if (value) {
url += '&search=' + encodeURIComponent(value);
}
location = url;
return false;
});
$('#search input[name=\'search\']').on('keydown', function(e) {
if (e.keyCode == 13) {
$('header #search input[name=\'search\']').parent().find('button').trigger('click');
return false;
}
});
@@ -7,10 +7,10 @@
<div class="not-found-eyebrow">{{ text_eyebrow|default('Ошибка 404') }}</div>
<h1 class="heading">{{ heading_title|default('Страница не найдена') }}</h1>
<p class="subheading">{{ text_error|default('Похоже, эта страница больше не доступна или адрес был введён с ошибкой.') }}</p>
<p>{{ text_hint|default('Вернитесь на главную или воспользуйтесь поиском, чтобы найти нужный раздел.') }}</p>
<p>{{ text_hint|default('Вернитесь на главную или перейдите в каталог, чтобы найти нужный раздел.') }}</p>
<div class="not-found-actions">
<a href="{{ continue }}" class="btn btn-dark">{{ button_home|default('На главную') }}</a>
<a href="{{ search|default(continue) }}" class="btn btn-outline-dark">{{ button_search|default('Поиск') }}</a>
<a href="{{ catalog|default(continue) }}" class="btn btn-outline-dark">{{ button_catalog|default('Каталог') }}</a>
<a href="{{ contact|default(continue) }}" class="btn btn-white">{{ button_contact|default('Связаться') }}</a>
</div>
</div>
@@ -53,7 +53,7 @@
</li>
<li><a href="{{ history }}">{{ text_cart }}</a></li>
<li><a href="{{ checkout }}">{{ text_checkout }}</a></li>
<li><a href="{{ search }}">{{ text_search }}</a></li>
<li><a href="{{ catalog|default(home) }}">{{ text_catalog|default('Каталог') }}</a></li>
<li>{{ text_information }}
<ul>
{% for information in informations %}
@@ -125,42 +125,36 @@
{% endif %}
<div class="mt-5">
<button type="button" class="btn btn-dark py-3 px-5 w-mob-100" onclick="SendRequest('{{ product_id }}')">Записаться на примерку</button>
</div>
<div class="mt-5">
{% set description = description|split('__NEWLINE__') %}
<ul class="nav nav-tabs mb-3 justify-content-center justify-content-md-start" id="myTab" role="tablist">
{% set i = 0 %}
{% for item in range(0,5) %}
{% if description[item] or (item == 0 and attribute_groups) %}
<li class="nav-item" role="presentation">
<button class="nav-link {{ i == 0 ? 'active' : '' }}" id="home-tab-{{ item }}" data-bs-toggle="tab" data-bs-target="#home-{{ item }}" type="button" role="tab" aria-controls="home-{{ item }}" aria-selected="{{ i == 0 ? 'true' : 'false' }}">
{% if item == 0 %}
Описание
{% elseif item == 1 %}
Первый прокат
{% elseif item == 2 %}
Второй прокат
{% elseif item == 3 %}
Покупка
{% elseif item == 4 %}
Условия
{% endif %}
</button>
</li>
</div>
<div class="mt-5">
{% set description_tabs = [
{'title': 'Описание', 'content': description, 'show_attributes': true},
{'title': 'Первый прокат', 'content': description_first_rental},
{'title': 'Второй прокат', 'content': description_second_rental},
{'title': 'Покупка', 'content': description_purchase},
{'title': 'Условия', 'content': description_terms}
] %}
<ul class="nav nav-tabs mb-3 justify-content-center justify-content-md-start" id="myTab" role="tablist">
{% set i = 0 %}
{% for tab in description_tabs %}
{% if tab.content or (tab.show_attributes and attribute_groups) %}
<li class="nav-item" role="presentation">
<button class="nav-link {{ i == 0 ? 'active' : '' }}" id="home-tab-{{ loop.index0 }}" data-bs-toggle="tab" data-bs-target="#home-{{ loop.index0 }}" type="button" role="tab" aria-controls="home-{{ loop.index0 }}" aria-selected="{{ i == 0 ? 'true' : 'false' }}">{{ tab.title }}</button>
</li>
{% set i = i + 1 %}
{% endif %}
{% endfor %}
</ul>
<div class="tab-content" id="myTabContent">
{% set i = 0 %}
{% for item in range(0,5) %}
{% if description[item] or (item == 0 and attribute_groups) %}
<div class="tab-pane fade {{ i == 0 ? 'show active' : '' }}" id="home-{{ item }}" role="tabpanel" aria-labelledby="home-tab-{{ item }}">
{% if item == 0 and attribute_groups %}
</ul>
<div class="tab-content" id="myTabContent">
{% set i = 0 %}
{% for tab in description_tabs %}
{% if tab.content or (tab.show_attributes and attribute_groups) %}
<div class="tab-pane fade {{ i == 0 ? 'show active' : '' }}" id="home-{{ loop.index0 }}" role="tabpanel" aria-labelledby="home-tab-{{ loop.index0 }}">
{% if tab.show_attributes and attribute_groups %}
<div class="mb-4">
{% for attribute_group in attribute_groups %}
@@ -177,9 +171,9 @@
</div>
{% endfor %}
</div>
{% endif %}
{{ description[item] }}
</div>
{% endif %}
{{ tab.content }}
</div>
{% set i = i + 1 %}
{% endif %}
@@ -747,4 +741,3 @@ $(document).ready(function() {
//--></script>
#}