自prestashop的1.4.4以来官方就将分类描述的编辑器功能取消,对优化来说有时需要在分类描述中加链接,这样编辑器功能就是必不可少的
找到prestashop的后台文件夹,进入tabs文件夹
打开AdminCategories.php文件
大概在200行左右插入
// 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>
<script type=”text/javascript”>
toggleVirtualProduct(getE(\’is_virtual_good\’));
unitPriceWithTax(\’unit\’);
</script>’;
$categoryBox = Tools::getValue(‘categoryBox’, array());
再找到 Description下面替换下面这段
<textarea cols=”100″ rows=”10″ id=”description_’.$language['id_lang'].’” name=”description_’.$language['id_lang'].’”>’.htmlentities(stripslashes($this->getFieldValue($obj, ‘description’, $language['id_lang'])), ENT_COMPAT, ‘UTF-8′).’</textarea>
现在再进入后台找到分类描述里面就可以看到已经有编辑器
(责任编辑:好模板) |