diff --git a/public/admin/language/ru-ru/catalog/category.php b/public/admin/language/ru-ru/catalog/category.php index 5a75bc8..cc59061 100644 --- a/public/admin/language/ru-ru/catalog/category.php +++ b/public/admin/language/ru-ru/catalog/category.php @@ -22,8 +22,8 @@ $_['column_action'] = 'Действие'; // Entry $_['entry_name'] = 'Название категории'; -$_['entry_description'] = 'Описание'; -$_['entry_description_bottom'] = 'Описание Низ:'; +$_['entry_description_top'] = 'Описание Верх'; +$_['entry_description_bottom'] = 'Описание Низ'; $_['entry_meta_title'] = 'Мета-тег Title'; $_['entry_meta_h1'] = 'HTML-тег H1'; $_['entry_meta_keyword'] = 'Мета-тег Keywords'; diff --git a/public/admin/model/catalog/category.php b/public/admin/model/catalog/category.php index 4823efa..6ce6406 100644 --- a/public/admin/model/catalog/category.php +++ b/public/admin/model/catalog/category.php @@ -13,7 +13,7 @@ class ModelCatalogCategory extends Model { } foreach ($data['category_description'] as $language_id => $value) { - $this->db->query("INSERT INTO " . DB_PREFIX . "category_description SET category_id = '" . (int)$category_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', description = '" . $this->db->escape($value['description']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_h1 = '" . $this->db->escape($value['meta_h1']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "'"); + $this->db->query("INSERT INTO " . DB_PREFIX . "category_description SET category_id = '" . (int)$category_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', description = '" . $this->db->escape($value['description']) . "', description_bottom = '" . $this->db->escape($value['description_bottom']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_h1 = '" . $this->db->escape($value['meta_h1']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "'"); } // MySQL Hierarchical Data Closure Table Pattern @@ -89,7 +89,7 @@ class ModelCatalogCategory extends Model { $this->db->query("DELETE FROM " . DB_PREFIX . "category_description WHERE category_id = '" . (int)$category_id . "'"); foreach ($data['category_description'] as $language_id => $value) { - $this->db->query("INSERT INTO " . DB_PREFIX . "category_description SET category_id = '" . (int)$category_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', description = '" . $this->db->escape($value['description']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_h1 = '" . $this->db->escape($value['meta_h1']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "'"); + $this->db->query("INSERT INTO " . DB_PREFIX . "category_description SET category_id = '" . (int)$category_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', description = '" . $this->db->escape($value['description']) . "', description_bottom = '" . $this->db->escape($value['description_bottom']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_h1 = '" . $this->db->escape($value['meta_h1']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "'"); } // MySQL Hierarchical Data Closure Table Pattern @@ -348,12 +348,13 @@ class ModelCatalogCategory extends Model { foreach ($query->rows as $result) { $category_description_data[$result['language_id']] = array( - 'name' => $result['name'], - 'meta_title' => $result['meta_title'], - 'meta_h1' => $result['meta_h1'], - 'meta_description' => $result['meta_description'], - 'meta_keyword' => $result['meta_keyword'], - 'description' => $result['description'] + 'name' => $result['name'], + 'meta_title' => $result['meta_title'], + 'meta_h1' => $result['meta_h1'], + 'meta_description' => $result['meta_description'], + 'meta_keyword' => $result['meta_keyword'], + 'description' => $result['description'], + 'description_bottom' => $result['description_bottom'] ); } diff --git a/public/admin/view/template/catalog/category_form.twig b/public/admin/view/template/catalog/category_form.twig index 1a11e3e..b863581 100644 --- a/public/admin/view/template/catalog/category_form.twig +++ b/public/admin/view/template/catalog/category_form.twig @@ -76,11 +76,17 @@
- -
- -
-
+ +
+ +
+ +
+ +
+ +
+
{% endfor %} diff --git a/public/store/controller/product/category.php b/public/store/controller/product/category.php index 3da649f..07d4fcb 100644 --- a/public/store/controller/product/category.php +++ b/public/store/controller/product/category.php @@ -155,6 +155,7 @@ $this->document->addScript('store/view/theme/dominik/assets/js/swiper-bundle.js' } $data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8'); + $data['description_bottom'] = html_entity_decode($category_info['description_bottom'], ENT_QUOTES, 'UTF-8'); $data['compare'] = $this->url->link('product/compare'); $url = ''; diff --git a/public/store/view/theme/dominik/template/product/category.twig b/public/store/view/theme/dominik/template/product/category.twig index 4562707..4561ca3 100644 --- a/public/store/view/theme/dominik/template/product/category.twig +++ b/public/store/view/theme/dominik/template/product/category.twig @@ -71,7 +71,7 @@
{% if description %} -
{{ description|split("

")[0] ~ '

' }}
+
{{ description }}
{% endif %} {% if products %}
@@ -90,8 +90,8 @@
{% endif %} - {% if description %} -
{{ description }}
+ {% if description_bottom %} +
{{ description_bottom }}
{% endif %} {% if not categories and not products %}
diff --git a/storage/cache/index.html b/storage/cache/index.html deleted file mode 100644 index e69de29..0000000