Jump to content
Sign in to follow this  
rgbmagic

Вывод описание категории в правой колонке

Recommended Posts

Помогите сделать описание категории в правой колонке сайт.

Желательно вот это дополнительное описание:

<modification>
	<id>category_short_description</id>
	<version>1.0</version>
	<vqmver>1.1.1</vqmver>
	<author>starlin</author>
	<!-- back -->
 
	<file name="admin/controller/catalog/category.php">
		<operation>
			<search position="after" offset="7"><![CDATA[
				  public function index() {
			]]></search>
			<add><![CDATA[
				$query = $this->db->query("DESC " . DB_PREFIX . "category_description short_desc");
				if (!$query->num_rows) {
					$this->db->query("ALTER TABLE `" . DB_PREFIX . "category_description` ADD `short_desc` text COLLATE utf8_bin NOT NULL");
				}
			]]></add>
		</operation>
	</file>
 
	<file name="admin/model/catalog/category.php">
		<operation>
			<search position="replace" offset="2"><![CDATA[
			foreach ($data['category_description'] as $language_id => $value) {
			]]>
			</search>
			<add><![CDATA[
			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']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "', short_desc = '" . $this->db->escape($value['short_desc']) . "'");
			}
			]]></add>
		</operation>
	</file>
 
	<file name="admin/model/catalog/category.php">
		<operation>
			<search position="after"><![CDATA[
				'description'	  => $result['description']
			]]>
			</search>
			<add><![CDATA[
				, 'short_desc' => $result['short_desc']
			]]></add>
		</operation>
	</file>
 
 
	<file name="admin/controller/catalog/category.php">
		<operation>
			<search position="after" offset="1"><![CDATA[
			$this->data['category_description'] = array();
			]]>
			</search>
			<add><![CDATA[
			if (isset($this->error['short_desc'])) {
			$this->data['short_desc'] = $this->error['short_desc'];
		} else {
			$this->data['short_desc'] = array();
		}
			]]></add>
 
		</operation>
	</file>
 
	<file name="admin/controller/catalog/category.php">
		<operation>
			<search position="after"><![CDATA[
			$this->data['entry_description'] = $this->language->get('entry_description');
			]]>
			</search>
			<add><![CDATA[
			$this->data['entry_short_desc'] = $this->language->get('entry_short_desc');
			]]></add>
		</operation>
	</file>
 
	<file name="admin/language/english/catalog/category.php">
		<operation>
			<search position="after"><![CDATA[
			$_['entry_description']	  = 'Description:';
			]]>
			</search>
			<add><![CDATA[
			$_['entry_short_desc']	  = 'Additional description:';
			]]></add>
		</operation>
	</file>
 
	<file name="admin/language/russian/catalog/category.php">
		<operation>
			<search position="after"><![CDATA[
			$_['entry_description']	  = 'Описание:';
			]]>
			</search>
			<add><![CDATA[
			$_['entry_short_desc']	  = 'Additional description:';
			]]></add>
		</operation>
	</file>
	 
	<file name="admin/view/template/catalog/category_form.tpl">
		<operation>
			<search position="after" offset="2"><![CDATA[
			<td><?php echo $entry_description; ?></td>]]>
			</search>
			<add><![CDATA[
				<tr>		 
				<td><?php echo $entry_short_desc; ?></td>
				<td><textarea name="category_description[<?php echo $language['language_id']; ?>][short_desc]" id="short_desc<?php echo $language['language_id']; ?>"><?php echo isset($category_description[$language['language_id']]) ? $category_description[$language['language_id']]['short_desc'] : ''; ?></textarea></td>
				</tr>
				]]></add>
 
		</operation>
	</file>
 
	<file name="admin/view/template/catalog/category_form.tpl">
		<operation>
			<search position="after" offset="3"><![CDATA[
			filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
			]]></search>
			<add><![CDATA[		
				<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script>
				<script type="text/javascript"><!--
				<?php foreach ($languages as $language) { ?>
				CKEDITOR.replace('short_desc<?php echo $language['language_id']; ?>', {
				filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
				filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
				filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
				filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
				filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
				filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
				});
				<?php } ?>
				//--></script>
				]]></add>
		</operation>
	</file>
 
 
	<file name="catalog/model/catalog/category.php">
		<operation>
			<search position="before"><![CDATA[
			  public function getCategory($category_id) {			]]></search>
			<add><![CDATA[
public function getShortDesc($category_id) {
		$query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "short_desc cd ON (c.category_id = cd.category_id) LEFT JOIN " . DB_PREFIX . "category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.category_id = '" . (int)$category_id . "' AND cd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND c2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND c.status = '1'");
 
		if ($query->num_rows) {
			return array(
				'short_desc'	  => $query->row['short_desc']
				);
		} else {
			return false;
		}
	}			]]></add>
		</operation>
	</file>
 
	<file name="catalog/controller/product/category.php">
		<operation>
			<search position="after"><![CDATA[
			$this->data['heading_title'] = $category_info['name'];
			]]></search>
			<add><![CDATA[
			$this->data['short_desc'] = $category_info['short_desc'];
			]]></add>
		</operation>
	</file>
 
	<file name="catalog/controller/product/category.php">
		<operation>
			<search position="after"><![CDATA[
			$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
			]]></search>
			<add><![CDATA[
			$this->data['short_desc'] = html_entity_decode($category_info['short_desc'], ENT_QUOTES, 'UTF-8');
			]]></add>
		</operation>
	</file>
	<!-- front -->
	<file name="catalog/controller/product/category.php">
		<operation>
			<search position="after"><![CDATA[
			$this->data['text_limit'] = $this->language->get('text_limit');
			]]></search>
			<add><![CDATA[
			$this->data['text_short_desc'] = $this->language->get('text_short_desc');
			]]></add>
		</operation>
	</file>
 
 
	<file name="catalog/language/english/product/category.php">
		<operation>
			<search position="after"><![CDATA[
			$_['text_error']		= 'Product not found!';
			]]></search>
			<add><![CDATA[
			$_['text_short_desc']	= 'Additional description';
			]]></add>
		</operation>
	</file>
 
	<file name="catalog/language/russian/product/category.php">
		<operation>
			<search position="after"><![CDATA[
			$_['text_error']		= 'Категория не найдена!';
			]]></search>
			<add><![CDATA[
			$_['text_short_desc']	= 'Additional description';
			]]></add>
		</operation>
	</file>
	 
	<file name="catalog/view/theme/default/template/product/category.tpl">
		<operation>
			<search position="before"><![CDATA[
			<?php echo $content_bottom; ?>
			]]></search>
			<add><![CDATA[
			<?php if ($short_desc) { ?>
			<span><?php echo $text_short_desc; ?></span> <?php echo $short_desc; ?></a><br />
			<?php } ?>
			]]></add>
		</operation>
	</file>
</modification>

Share this post


Link to post
Share on other sites

неужели нет людей, которые могут помочь???

Подскажите тогда как стандартное описание для категорий вывести в column_right

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.