Jump to content
andrey8501

Как в баннерах сделать поле заголовков textarea ?

Recommended Posts

В общем хочу сделать баннер
поверх изображений, что бы выводился определенный текст, форматированный
заголовок в баннеры вывел, но текстовое поле не позволяет вставить нужный html код

хотелось бы заменить это поле на textarea и визуальным редактором как в продуктах в описании

не хотелось бы ставить сторонних модулей
может где то есть решение, ткните
я не нашел

 

bandicam 2020-02-28 17-16-30-915.jpg

Share this post


Link to post
Share on other sites

Если решения не нашли, то скорее всего самому допиливать или искать, кто сможет.

Потому что в админке в настройках подобное не выставишь, только кодом и работа с базой

Share this post


Link to post
Share on other sites

Может кто подскажет по какой причине когда меняю input на textarea не сохраняет ничего в поле description ?
приложил ocmod

Спойлер

<?xml version="1.0" encoding="utf-8"?>
<modification>
	<name>Description for banners</name>
	<version>1.0</version>
	<author>Ravilr</author>
	<link>http://myopencart.com</link>
	<code>Description_for_banners_23</code>
	
	<file path="admin/controller/design/banner.php">
		<operation>
			<search><![CDATA[
			$data['button_remove'] = $this->language->get('button_remove');
			]]></search>
			<add position="after"><![CDATA[
			$data['entry_description'] = $this->language->get('entry_description');
			]]></add>
		</operation>
		<operation>
			<search><![CDATA[
			$data['banner_images'][$key][] = array(
			]]></search>
			<add position="after"><![CDATA[
			'description'      => $banner_image['description'],
			]]></add>
		</operation>
	</file>
	
	<file path="admin/model/design/banner.php">
		<operation>
			<search><![CDATA[
			title = '" .  $this->db->escape($banner_image['title']) . "', 
			]]></search>
			<add position="replace"><![CDATA[
			title = '" .  $this->db->escape($banner_image['title']) . "', description = '" .  $this->db->escape($banner_image['description']) . "', 
			]]>
			</add>
		</operation>
		<operation>
			<search><![CDATA[
			'title'      => $banner_image['title'],
			]]></search>
			<add position="after"><![CDATA[
			'description'      => $banner_image['description'],
			]]></add>
		</operation>
	</file>
	
	<file path="admin/language/ru-ru/design/banner.php">
		<operation>
			<search><![CDATA[
			$_['entry_title']       = 'Заголовок';
			]]></search>
			<add position="after"><![CDATA[
			$_['entry_description']       = 'Описание';
			]]></add>
		</operation>
	</file>
	
	<file path="admin/view/template/design/banner_form.tpl">
		<operation>
			<search><![CDATA[
			<td class="text-left"><?php echo $entry_title; ?></td>
			]]></search>
			<add position="after"><![CDATA[
			<td class="text-left"><?php echo $entry_description; ?></td>
			]]></add>
		</operation>
		<operation>
			<search><![CDATA[
			[<?php echo $image_row; ?>][link]
			]]></search>
			<add position="before"><![CDATA[
				<td class="text-left" style="width: 30%;"><input style="height:300px;" type="text" name="banner_image[<?php echo $language['language_id']; ?>][<?php echo $image_row; ?>][description]" value="<?php echo $banner_image['description']; ?>" placeholder="<?php echo $entry_description; ?>" class="form-control" /></td>
			]]></add>
		</operation>
		<operation>
			<search><![CDATA[
			[' + image_row + '][title]
			]]></search>
			<add position="after"><![CDATA[
			html += '  <td class="text-left"><input style="height:300px;" type="text" name="banner_image[' + language_id + '][' + image_row + '][description]" value="" placeholder="<?php echo $entry_description; ?>" class="form-control" /></td>';	
			]]></add>
		</operation>
	</file>
	
	<file path="catalog/controller/extension/module/{banner,slideshow}.php">
		<operation>
			<search><![CDATA[
			'title' => $result['title'],
			]]></search>
			<add position="after"><![CDATA[
			'description' => html_entity_decode($result['description']),
			]]></add>
		</operation>
	</file>
	

</modification>

 

 

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.


  • 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.