給ECSHOP後台商品簡單描述為富文字編輯器

來源:互聯網
上載者:User

修改方法

首先來修改 /admin/includes/lib_main.php 檔案將

function create_html_editor($input_name, $input_value = '')

修改為

function create_html_editor($input_name, $input_value = '',$fckid=0)

繼續向下找到

$smarty->assign('FCKeditor', $FCKeditor);

將它修改為

if ($fckid)
{
$smarty->assign('FCKeditor'.$fckid, $FCKeditor);
}
else
{
$smarty->assign('FCKeditor', $FCKeditor);
}

接下來要修改 /admin/goods.php 檔案找到

create_html_editor('goods_desc', $goods['goods_desc']);

在它下面另添加一行

create_html_editor('goods_brief', $goods['goods_brief'],2);

最後修改一下對應的模板檔案 /admin/templates/goods_info.htm,找到下面這行代碼

<textarea name="goods_brief" cols="40" rows="3">{$goods.goods_brief|escape}</textarea>

並且修改為

{$FCKeditor2}

自後,為了能夠順利的儲存較長內容,還應該修改一下 ecs_goods 表的 goods_brief 欄位,將它的欄位類型從 varchar(255) 修改為  text 至於如何修改,有很多途徑。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.