TWDesign Posted June 15, 2012 Share Posted June 15, 2012 (edited) Congratulations to Jellygnite Web Design, Australia for posting this on their blog. http://www.jellygnit...cription-v-1-4/ This is one of those features that SHOULD already be in the default PrestaShop distribution. It seems inexplicable that it is not ( or why nobody has written a module for it). Anyway for the sake of preserving a valuable information resource, I thought I should post it again here in the Forum. This is for vers 1.4.7. I've tested it and it works. I can now add extra images and use HTML formatting tags in my category description fields. On the Jellygnite site they have a similar article for vers 1.3 if anyone needs it. Repeated verbatim below: ------------------------------------------------------------------------------------------------ Update for Prestashop version 1.4.7 When you enter a category into Prestashop you have the ability to enter a description. This only allows text though – no HTML. Find out how to display HTML in Prestashop’s category description… You need to make some changes to Prestashop’s core code so please be advised any future upgrades may overwrite your changes. Backup all files before beginning! These changes have been tested with Prestashop version 1.4.7 23 Sep 2011 : I have updated to include the WYSYWIG editor. Please note these changes are optional and make changes to Prestashop’s core code. 30 Mar 2012 : Added the override to remove automatic line breaks 1. Create a file called Category.php in the /override/classes folder Add the content below to Category.php: [*]<?php [*]class Category extends CategoryCore [*]{ [*] public function getTranslationsFieldsChild() { [*] self::validateFieldsLang(); [*] $fieldsArray = array('name', 'link_rewrite', 'meta_title', 'meta_keywords', 'meta_description'); [*] $fields = array(); [*] $languages = Language::getLanguages(); [*] $defaultLanguage = Configuration::get('PS_LANG_DEFAULT'); [*] foreach ($languages as $language) [*] { [*] $fields[$language['id_lang']]['id_lang'] = $language['id_lang']; [*] $fields[$language['id_lang']][$this->identifier] = intval($this->id); [*] $fields[$language['id_lang']]['description'] = (isset($this->description[$language['id_lang']])) ? Tools::htmlentitiesDecodeUTF8(pSQL($this->description[$language['id_lang']], true)) : ''; [*] foreach ($fieldsArray as $field) [*] { [*] if (!Validate::isTableOrIdentifier($field)) [*] die(Tools::displayError()); [*] /* Check fields validity */ [*] if (isset($this->{$field}[$language['id_lang']]) AND !empty($this->{$field}[$language['id_lang']])) [*] $fields[$language['id_lang']][$field] = pSQL($this->{$field}[$language['id_lang']]); [*] elseif (in_array($field, $this->fieldsRequiredLang)) [*] $fields[$language['id_lang']][$field] = pSQL($this->{$field}[$defaultLanguage]); [*] else [*] $fields[$language['id_lang']][$field] = ''; [*] } [*] } [*] return $fields; [*] } [*]} 2. Create a file called AdminTab.php in the /override/classes folder To convert tags in the category listing in the admin area you need to add in Tools::htmlentitiesUTF8 to the value being printed. Add the content below to AdminTab.php: [*]<?php [*]class AdminTab extends AdminTabCore [*]{ [*] public function displayListContent($token = NULL) [*] { [*] /* Display results in a table [*] * [*] * align : determine value alignment [*] * prefix : displayed before value [*] * suffix : displayed after value [*] * image : object image [*] * icon : icon determined by values [*] * active : allow to toggle status [*] */ [*] global $currentIndex, $cookie; [*] $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); [*] $id_category = 1; // default categ [*] $irow = 0; [*] if ($this->_list AND isset($this->fieldsDisplay['position'])) [*] { [*] $positions = array_map(create_function('$elem', 'return (int)($elem[\'position\']);'), $this->_list); [*] sort($positions); [*] } [*] if ($this->_list) [*] { [*] $isCms = false; [*] if (preg_match('/cms/Ui', $this->identifier)) [*] $isCms = true; [*] $keyToGet = 'id_'.($isCms ? 'cms_' : '').'category'.(in_array($this->identifier, array('id_category', 'id_cms_category')) ? '_parent' : ''); [*] foreach ($this->_list AS $tr) [*] { [*] $id = $tr[$this->identifier]; [*] echo '<tr'.(array_key_exists($this->identifier,$this->identifiersDnd) ? ' id="tr_'.(($id_category = (int)(Tools::getValue('id_'.($isCms ? 'cms_' : '').'category', '1'))) ? $id_category : '').'_'.$id.'_'.$tr['position'].'"' : '').($irow++ % 2 ? ' class="alt_row"' : '').' '.((isset($tr['color']) AND $this->colorOnBackground) ? 'style="background-color: '.$tr['color'].'"' : '').'> [*] <td class="center">'; [*] if ($this->delete AND (!isset($this->_listSkipDelete) OR !in_array($id, $this->_listSkipDelete))) [*] echo '<input type="checkbox" name="'.$this->table.'Box[]" value="'.$id.'" class="noborder" />'; [*] echo '</td>'; [*] foreach ($this->fieldsDisplay AS $key => $params) [*] { [*] $tmp = explode('!', $key); [*] $key = isset($tmp[1]) ? $tmp[1] : $tmp[0]; [*] echo ' [*] <td '.(isset($params['position']) ? ' id="td_'.(isset($id_category) AND $id_category ? $id_category : 0).'_'.$id.'"' : '').' class="'.((!isset($this->noLink) OR !$this->noLink) ? 'pointer' : '').((isset($params['position']) AND $this->_orderBy == 'position')? ' dragHandle' : ''). (isset($params['align']) ? ' '.$params['align'] : '').'" '; [*] if (!isset($params['position']) AND (!isset($this->noLink) OR !$this->noLink)) [*] echo ' onclick="document.location = \''.$currentIndex.'&'.$this->identifier.'='.$id.($this->view? '&view' : '&update').$this->table.'&token='.($token!=NULL ? $token : $this->token).'\'">'.(isset($params['prefix']) ? $params['prefix'] : ''); [*] else [*] echo '>'; [*] if (isset($params['active']) AND isset($tr[$key])) [*] $this->_displayEnableLink($token, $id, $tr[$key], $params['active'], Tools::getValue('id_category'), Tools::getValue('id_product')); [*] elseif (isset($params['activeVisu']) AND isset($tr[$key])) [*] echo '<img src="../img/admin/'.($tr[$key] ? 'enabled.gif' : 'disabled.gif').'" [*] alt="'.($tr[$key] ? $this->l('Enabled') : $this->l('Disabled')).'" title="'.($tr[$key] ? $this->l('Enabled') : $this->l('Disabled')).'" />'; [*] elseif (isset($params['position'])) [*] { [*] if ($this->_orderBy == 'position' AND $this->_orderWay != 'DESC') [*] { [*] echo '<a'.(!($tr[$key] != $positions[sizeof($positions) - 1]) ? ' style="display: none;"' : '').' href="'.$currentIndex. [*] '&'.$keyToGet.'='.(int)($id_category).'&'.$this->identifiersDnd[$this->identifier].'='.$id.' [*] &way=1&position='.(int)($tr['position'] + 1).'&token='.($token!=NULL ? $token : $this->token).'"> [*] <img src="../img/admin/'.($this->_orderWay == 'ASC' ? 'down' : 'up').'.gif" [*] alt="'.$this->l('Down').'" title="'.$this->l('Down').'" /></a>'; [*] echo '<a'.(!($tr[$key] != $positions[0]) ? ' style="display: none;"' : '').' href="'.$currentIndex. [*] '&'.$keyToGet.'='.(int)($id_category).'&'.$this->identifiersDnd[$this->identifier].'='.$id.' [*] &way=0&position='.(int)($tr['position'] - 1).'&token='.($token!=NULL ? $token : $this->token).'"> [*] <img src="../img/admin/'.($this->_orderWay == 'ASC' ? 'up' : 'down').'.gif" [*] alt="'.$this->l('Up').'" title="'.$this->l('Up').'" /></a>'; } [*] else [*] echo (int)($tr[$key] + 1); [*] } [*] elseif (isset($params['image'])) [*] { [*] // item_id is the product id in a product image context, else it is the image id. [*] $item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id; [*] // If it's a product image [*] if (isset($tr['id_image'])) [*] { [*] $image = new Image((int)$tr['id_image']); [*] $path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$image->getExistingImgPath().'.'.$this->imageType; [*] }else [*] $path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)($tr['id_image']) : '').'.'.$this->imageType; [*] echo cacheImage($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType); [*] } [*] elseif (isset($params['icon']) AND (isset($params['icon'][$tr[$key]]) OR isset($params['icon']['default']))) [*] echo '<img src="../img/admin/'.(isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'].'" alt="'.$tr[$key]).'" title="'.$tr[$key].'" />'; [*] elseif (isset($params['price'])) [*] echo Tools::displayPrice($tr[$key], (isset($params['currency']) ? Currency::getCurrencyInstance((int)($tr['id_currency'])) : $currency), false); [*] elseif (isset($params['float'])) [*] echo rtrim(rtrim($tr[$key], '0'), '.'); [*] elseif (isset($params['type']) AND $params['type'] == 'date') [*] echo Tools::displayDate($tr[$key], (int)$cookie->id_lang); [*] elseif (isset($params['type']) AND $params['type'] == 'datetime') [*] echo Tools::displayDate($tr[$key], (int)$cookie->id_lang, true); [*] elseif (isset($tr[$key])) [*] { [*] $echo = ($key == 'price' ? round($tr[$key], 2) : isset($params['maxlength']) ? Tools::substr(Tools::htmlentitiesUTF8($tr[$key]), 0, $params['maxlength']).'...' : Tools::htmlentitiesUTF8($tr[$key])); [*] echo isset($params['callback']) ? call_user_func_array(array($this->className, $params['callback']), array($echo, $tr)) : $echo; [*] } [*] else [*] echo '--'; [*] echo (isset($params['suffix']) ? $params['suffix'] : ''). [*] '</td>'; [*] } [*] if ($this->edit OR $this->delete OR ($this->view AND $this->view !== 'noActionColumn')) [*] { [*] echo '<td class="center" style="white-space: nowrap;">'; [*] if ($this->view) [*] $this->_displayViewLink($token, $id); [*] if ($this->edit) [*] $this->_displayEditLink($token, $id); [*] if ($this->delete AND (!isset($this->_listSkipDelete) OR !in_array($id, $this->_listSkipDelete))) [*] $this->_displayDeleteLink($token, $id); [*] if ($this->duplicate) [*] $this->_displayDuplicate($token, $id); [*] echo '</td>'; [*] } [*] echo '</tr>'; [*] } [*] } [*] } [*]} [*]?> **OP'S NOTE: Not sure if the trailing "?>" on line 131 above is necessary. Seems like a typo to me. I removed it when I did my version and it works fine ** 3. Remove automatic linebreaks from description Create a new file /override/controllers/CategoryController.php and copy the following code [*]<?php [*]class CategoryController extends CategoryControllerCore { [*] public function process() [*] { [*] $category_description = $this->category->description; [*] parent::process(); [*] $this->category->description = $category_description; [*] } [*]} 4. Update templates Locate instances in your template files where you use the category description. Some of these may need to be altered. e.g. In /modules/blockcategories/category-tree-branch.tpl line 28: [*]<a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> Create a copy of this file and put in /themes/your_theme/modules/blockcategories/ Update the line to include the smarty function strip_tags in the title tag: [*]<a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|strip_tags:false|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> Make sure you update the category description anywhere else in your templates as required. Thats all there is to it. If you notice any bugs or problems please drop me an email or comment. 5. Optional TinyMCE editor in Admin Area Please note the following optional changes affect Prestashop’s core code. These changes will be overwritten if you ever update Prestashop. In [admin folder]/tabs/AdminCategories.php, line 233: <textarea name="description_'.$language['id_lang'].'" rows="10" cols="100">'.htmlentities($this->getFieldValue($obj, 'description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea> Add class="rte" to the textarea <textarea name="description_'.$language['id_lang'].'" rows="10" cols="100" class="rte">'.htmlentities($this->getFieldValue($obj, 'description', (int)($language['id_lang'])), ENT_COMPAT, 'UTF-8').'</textarea> Also in [admin folder]/tabs/AdminCategories.php, at the end (line 318) after: <p class="clear"></p>'; Add the following to load TinyMCE: [*]/* Add TinyMCE */ [*] global $cookie; [*] $iso = Language::getIsoById((int)($cookie->id_lang)); [*] $isoTinyMCE = (file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en'); [*] $ad = dirname($_SERVER["PHP_SELF"]); [*] echo ' [*] <script type="text/javascript"> [*] var iso = \''.$isoTinyMCE.'\' ; [*] var pathCSS = \''._THEME_CSS_DIR_.'\' ; [*] var ad = \''.$ad.'\' ; [*] </script> [*] <script type="text/javascript" src="'.__PS_BASE_URI__.'js/tiny_mce/tiny_mce.js"></script> [*] <script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce.inc.js"></script>'; [*] /* End TinyMCE */ In /classes/Category.php, line 88: [*]protected $fieldsValidateLang = array('name' => 'isCatalogName', 'link_rewrite' => 'isLinkRewrite', 'description' => 'isCleanHtml', [*] 'meta_title' => 'isGenericName', 'meta_description' => 'isGenericName', 'meta_keywords' => 'isGenericName'); Change the field type of description: ‘description’ => ‘isCleanHtml’ becomes ‘description’ => ‘isString’ [*]protected $fieldsValidateLang = array('name' => 'isCatalogName', 'link_rewrite' => 'isLinkRewrite', 'description' => 'isString', [*] 'meta_title' => 'isGenericName', 'meta_description' => 'isGenericName', 'meta_keywords' => 'isGenericName'); Edited June 15, 2012 by TWDesign (see edit history) 8 Link to comment Share on other sites More sharing options...
exadra37 Posted June 15, 2012 Share Posted June 15, 2012 Good tip Link to comment Share on other sites More sharing options...
Szolo Posted June 22, 2012 Share Posted June 22, 2012 Great post! Thanks a lot! I am wandering, if it works for 1.5 too.... Any experience? Link to comment Share on other sites More sharing options...
TWDesign Posted June 22, 2012 Author Share Posted June 22, 2012 Great post! Thanks a lot! I am wandering, if it works for 1.5 too.... Any experience? None, sorry. I cant work out why the PrestaShop team hasnt made this feature standard in 1.5 Every other ecommerce package allows some kind of wysiwyg editing capability at the category display level ! 1 Link to comment Share on other sites More sharing options...
suatje Posted June 24, 2012 Share Posted June 24, 2012 Dear TWdesign, I agree with you that this feature should be in the default PrestaShop distribution. Thanks for this sharing this solution. Nevertheless i also found a module that solves this problem so i ll share the link. http://addons.prestashop.com/en/front-office-features/5186-HTML-in-category-description.html Link to comment Share on other sites More sharing options...
yans Posted July 6, 2012 Share Posted July 6, 2012 awesome!! it works ^^ Link to comment Share on other sites More sharing options...
markus25 Posted October 31, 2012 Share Posted October 31, 2012 Dear All I've buyed also this module html on catagories http://addons.presta...escription.html But for me it doesn`t work, the first line apears 2 times, i think it have to do with the automatic line break does sombody knows how to elminate this, or what it can be? Thanks Link to comment Share on other sites More sharing options...
pel024 Posted November 9, 2012 Share Posted November 9, 2012 Has anyone tested this on 1.4.9? Link to comment Share on other sites More sharing options...
clayton29657 Posted November 9, 2012 Share Posted November 9, 2012 Dear All I've buyed also this module html on catagories http://addons.presta...escription.html But for me it doesn`t work, the first line apears 2 times, i think it have to do with the automatic line break does sombody knows how to elminate this, or what it can be? Thanks Hello Marcus I would suggest starting a new topic with your issue and also contact the developer of the module so they can help you. Clayton Link to comment Share on other sites More sharing options...
llmills Posted December 1, 2012 Share Posted December 1, 2012 Thank you so much - it worked perfectly on 1.4.4.0 I followed the code from the blog the OP posted Thanks Link to comment Share on other sites More sharing options...
DrLightman Posted December 8, 2012 Share Posted December 8, 2012 Thanks for the hack. It works for me except linebreaks are added anyway, had to do via css .content br { display:none } where i echo the description. Link to comment Share on other sites More sharing options...
dagnez Posted December 25, 2012 Share Posted December 25, 2012 Is there already a solution like that for PS 1.5? Cannot find it anywhere... Link to comment Share on other sites More sharing options...
Avatarmugs Posted January 1, 2013 Share Posted January 1, 2013 (edited) Is there already a solution like that for PS 1.5? Cannot find it anywhere... Great post! Thanks a lot! I am wandering, if it works for 1.5 too.... Any experience? Look the solution at: http://nemops.com/en...prestashop-1-5/ Go to your admin folder, then themes/default/template/helpers/form/ and open up form.tpl. At about line 400, you will find some javascript code. Change the following: ----------- theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull|cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,undo,redo", theme_advanced_buttons2 : "link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,charmap,media,|,ltr,rtl,|,fullscreen", theme_advanced_buttons3 : "", theme_advanced_buttons4 : "" ------------ Into this: ---------- theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "styleprops,|,cite,abbr,acronym,del,ins,attribs,pagebreak", Edited January 1, 2013 by Avatarmugs (see edit history) Link to comment Share on other sites More sharing options...
Ljud-andreas Posted January 18, 2013 Share Posted January 18, 2013 Look the solution at: http://nemops.com/en...prestashop-1-5/ Go to your admin folder, then themes/default/template/helpers/form/ and open up form.tpl. At about line 400, you will find some javascript code. Change the following: ----------- theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull|cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,undo,redo", theme_advanced_buttons2 : "link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,charmap,media,|,ltr,rtl,|,fullscreen", theme_advanced_buttons3 : "", theme_advanced_buttons4 : "" ------------ Into this: ---------- theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "styleprops,|,cite,abbr,acronym,del,ins,attribs,pagebreak", This does only work with CMS Categories right? I've been struggling to get HTML in my Catalog -> Categories -> Description and I've been modifying pages after every tutorial there is in this forum.. So I'm guessing I'll have to buy the module for 30€ to get this done.. Link to comment Share on other sites More sharing options...
Avatarmugs Posted January 18, 2013 Share Posted January 18, 2013 This does only work with CMS Categories right? I've been struggling to get HTML in my Catalog -> Categories -> Description and I've been modifying pages after every tutorial there is in this forum.. So I'm guessing I'll have to buy the module for 30€ to get this done.. For all, of course. Link to comment Share on other sites More sharing options...
robylinda Posted January 23, 2013 Share Posted January 23, 2013 I have found the solution for prestahop 1.5. It works for me. You follow the steps from above untill adding the tinyMCE editor. From this point you can enter html code in the textarea of the category description and it works. For loading the tinyMCE editor you have to go to controllers/admin/AdminCategoriesControllers.php and on the line 400 you have this: array( 'type' => 'textarea', 'label' => $this->l('Description:'), 'name' => 'description', 'lang' => true, 'rows' => 10, 'cols' => 100, 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), you need to add the line 'autoload_rte' => true, so you will have this: array( 'type' => 'textarea', 'label' => $this->l('Description:'), 'name' => 'description', 'autoload_rte' => true, 'lang' => true, 'rows' => 10, 'cols' => 100, 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), Than you have to edit category.tpl from themes/your_theme. Replace the paragraphs from cat_desc with divs on line 59: {if $category->description} <div class="cat_desc"> {if strlen($category->description) > 120} <div id="category_description_short">{$category->description|truncate:120}</div> <div id="category_description_full" style="display:none">{$category->description}</div> <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a> {else} <div>{$category->description}</div> {/if} </div> {/if} Enjoy! 6 Link to comment Share on other sites More sharing options...
Ljud-andreas Posted January 23, 2013 Share Posted January 23, 2013 Thank you! That fixed my problem with WYSIWG! Link to comment Share on other sites More sharing options...
cassim Posted January 26, 2013 Share Posted January 26, 2013 Can't get this to work in my 1.4.9 Presta Link to comment Share on other sites More sharing options...
Nanou2301 Posted January 29, 2013 Share Posted January 29, 2013 Doesn't work for Pretashop 1.4.8.2 either :/ Link to comment Share on other sites More sharing options...
Artem Posted March 8, 2013 Share Posted March 8, 2013 was anyone able to fix this into 1.4.9? Link to comment Share on other sites More sharing options...
Artem Posted March 8, 2013 Share Posted March 8, 2013 I've done everything up to 5th point, and categories broke with following error Parse error: syntax error, unexpected '[' in public_html/override/controllers/CategoryController.php on line 2 im running PS v1.4.9 Link to comment Share on other sites More sharing options...
Artem Posted March 8, 2013 Share Posted March 8, 2013 anyone? Link to comment Share on other sites More sharing options...
mpoohv Posted March 21, 2013 Share Posted March 21, 2013 For everyone who has Prestashop > 1.5, can use this great great solution below. It's very easy. You don't need to buy an expensive module or something! Thanks to robylinda I have found the solution for prestahop 1.5. It works for me. You follow the steps from above untill adding the tinyMCE editor. From this point you can enter html code in the textarea of the category description and it works. For loading the tinyMCE editor you have to go to controllers/admin/AdminCategoriesControllers.php and on the line 400 you have this: array( 'type' => 'textarea', 'label' => $this->l('Description:'), 'name' => 'description', 'lang' => true, 'rows' => 10, 'cols' => 100, 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), you need to add the line 'autoload_rte' => true, so you will have this: array( 'type' => 'textarea', 'label' => $this->l('Description:'), 'name' => 'description', 'autoload_rte' => true, 'lang' => true, 'rows' => 10, 'cols' => 100, 'hint' => $this->l('Invalid characters:').' <>;=#{}' ), Than you have to edit category.tpl from themes/your_theme. Replace the paragraphs from cat_desc with divs on line 59: {if $category->description} <div class="cat_desc"> {if strlen($category->description) > 120} <div id="category_description_short">{$category->description|truncate:120}</div> <div id="category_description_full" style="display:none">{$category->description}</div> <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a> {else} <div>{$category->description}</div> {/if} </div> {/if} Enjoy! 1 Link to comment Share on other sites More sharing options...
Usman Ahmed Posted April 4, 2013 Share Posted April 4, 2013 Is there a way to add HTML code in Features and Value Text field? (Without TinyMCE) Link to comment Share on other sites More sharing options...
mizuplus Posted May 23, 2013 Share Posted May 23, 2013 @robylinda thank you so much! works great Link to comment Share on other sites More sharing options...
SaLiC Posted June 6, 2013 Share Posted June 6, 2013 robylindas solution form, on 23 January 2013 works perfectly for my shop in PS 1.5.2.0!!! Thank you! Link to comment Share on other sites More sharing options...
feuillet Posted June 17, 2013 Share Posted June 17, 2013 Hi All, has anyone an idea how to accomplish this for CMS Categories on 1.5? I have got the Editor working, but all HTML is stripped out all the time... Thanks, S. Link to comment Share on other sites More sharing options...
rakepl Posted September 9, 2013 Share Posted September 9, 2013 Hello, works perfect with PS 1.4.10.0, but I have a question - When I change color and font in description, ex Now that you can buy movies from the iTunes Store , it display <p> <Span style > smt like that , plz see attchment, how can fix it ? - It shows image and tooltip, where are they come from ? how I can set them ? Thank you. Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2013 Share Posted September 9, 2013 is there any chance to test your website where this issue appears? Link to comment Share on other sites More sharing options...
babyewok Posted December 5, 2013 Share Posted December 5, 2013 Is there a solution for 1.4.11? Link to comment Share on other sites More sharing options...
taoufiqaitali Posted December 31, 2013 Share Posted December 31, 2013 Helpful thanks (y) Link to comment Share on other sites More sharing options...
diegoao Posted February 5, 2014 Share Posted February 5, 2014 Hi All, has anyone an idea how to accomplish this for CMS Categories on 1.5? I have got the Editor working, but all HTML is stripped out all the time... Thanks, S. Same happens to me in cms categories description. Did you find any solution? Thanks Link to comment Share on other sites More sharing options...
vekia Posted February 5, 2014 Share Posted February 5, 2014 it's necessary to extend tiny mce object definition and also change validate class. you can find here on board several threads related to this, or just read this: tinymce full editor + all options 1 Link to comment Share on other sites More sharing options...
tannong Posted February 17, 2014 Share Posted February 17, 2014 can someone verify whether this solution works for 1.4.8.2 I think i did try this before but nothing changes.. Thank You Link to comment Share on other sites More sharing options...
vekia Posted February 18, 2014 Share Posted February 18, 2014 this is for prestashop based on 1.5.x engine Link to comment Share on other sites More sharing options...
tannong Posted February 18, 2014 Share Posted February 18, 2014 is there any solution for 1.4.8.2 vekia? Thanks in advance, i had this problem on a thread previously as well, but somehow its gone.. Link to comment Share on other sites More sharing options...
dhimanversha000 Posted June 17, 2014 Share Posted June 17, 2014 thanks for this post solution Link to comment Share on other sites More sharing options...
lak27 Posted August 1, 2014 Share Posted August 1, 2014 Great tip! Thanks! Link to comment Share on other sites More sharing options...
marco78 Posted October 27, 2014 Share Posted October 27, 2014 HI followed every steps from 1 to 4 but in my PS 1.4.8.2, unfortunately it won't work,in b office totally disappear category (& products) listthere's a fixhear y soon Link to comment Share on other sites More sharing options...
motorevolution Posted March 17, 2016 Share Posted March 17, 2016 Hello everyone, I'm looking for a solution to this problem for PS 1.6.1.4. I would be extremely grateful if anyone had already found a solution or could help me with the right instructions. I'm sure there are many others out there who would love to have this option, too. Thank you in advance! Adrian. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now