/* 取得商品信息 */
if ($is_add)
{
/* 默認(rèn)值 */
$last_choose = array(0, 0);
if (!empty($_COOKIE['ECSCP']['last_choose']))
{
$last_choose = explode('|', $_COOKIE['ECSCP']['last_choose']);
}
$goods = array(
'goods_id' => 0,
'goods_desc' => '',
下面增加:
/* 取得商品信息 */
if ($is_add)
{
/* 默認(rèn)值 */
$last_choose = array(0, 0);
if (!empty($_COOKIE['ECSCP']['last_choose']))
{
$last_choose = explode('|', $_COOKIE['ECSCP']['last_choose']);
}
$goods = array(
'goods_id'? => 0,
'goods_desc'? ?=> '',
'goods_shipai'? ?=> '',
'cat_id'? ?=> $last_choose[0],
第2 地方大概:231行:
/* 默認(rèn)值 */
$goods = array(
'goods_id'?=> 0,
'goods_desc'?=> '',
'goods_shipai'?=> '',
'cat_id'?=> 0,
3.
/* 拆分商品名稱樣式 */
$goods_name_style = explode('+', empty($goods['goods_name_style']) ? '+' : $goods['goods_name_style']);
/* 創(chuàng)建 html editor */
create_html_editor('goods_desc', $goods['goods_desc']);
create_html_editor2('goods_shipai', 'goods_shipai',$goods['goods_shipai']);
4.入庫:
/* 入庫 */
if ($is_insert)
{
if ($code == '')
{
$sql = "INSERT INTO " . $ecs->table('goods') . " (goods_name, goods_name_style, goods_sn, " .
"cat_id, brand_id, shop_price, market_price, is_promote, promote_price, " .
"promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, " .
"seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, " .
"is_on_sale, is_alone_sale, is_shipping, goods_desc, add_time, last_update, goods_type, rank_integral, suppliers_id , goods_shipai )" .
"VALUES ('$_POST[goods_name]', '$goods_name_style', '$goods_sn', '$catgory_id', " .
"'$brand_id', '$shop_price', '$market_price', '$is_promote','$promote_price', ".
"'$promote_start_date', '$promote_end_date', '$goods_img', '$goods_thumb', '$original_img', ".
"'$_POST[keywords]', '$_POST[goods_brief]', '$_POST[seller_note]', '$goods_weight', '$goods_number',".
" '$warn_number', '$_POST[integral]', '$give_integral', '$is_best', '$is_new', '$is_hot', '$is_on_sale', '$is_alone_sale', $is_shipping, ".
" '$_POST[goods_desc]', '" . gmtime() . "', '". gmtime() ."', '$goods_type', '$rank_integral', '$suppliers_id' , '$_POST[goods_shipai]')";
}
else
{
$sql = "INSERT INTO " . $ecs->table('goods') . " (goods_name, goods_name_style, goods_sn, " .
"cat_id, brand_id, shop_price, market_price, is_promote, promote_price, " .
"promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, " .
"seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, is_real, " .
"is_on_sale, is_alone_sale, is_shipping, goods_desc, add_time, last_update, goods_type, extension_code, rank_integral , ?goods_shipai)" .
"VALUES ('$_POST[goods_name]', '$goods_name_style', '$goods_sn', '$catgory_id', " .
"'$brand_id', '$shop_price', '$market_price', '$is_promote','$promote_price', ".
"'$promote_start_date', '$promote_end_date', '$goods_img', '$goods_thumb', '$original_img', ".
"'$_POST[keywords]', '$_POST[goods_brief]', '$_POST[seller_note]', '$goods_weight', '$goods_number',".
" '$warn_number', '$_POST[integral]', '$give_integral', '$is_best', '$is_new', '$is_hot', 0, '$is_on_sale', '$is_alone_sale', $is_shipping, ".
" '$_POST[goods_desc]', '" . gmtime() . "', '". gmtime() ."', '$goods_type', '$code', '$rank_integral' , '$_POST[goods_shipai]')";
}
}
else
{
5.
/* 如果有上傳圖片,需要更新數(shù)據(jù)庫 */
if ($goods_img)
{
$sql .= "goods_img = '$goods_img', original_img = '$original_img', ";
}
if ($goods_thumb)
{
$sql .= "goods_thumb = '$goods_thumb', ";
}
if ($code != '')
{
$sql .= "is_real=0, extension_code='$code', ";
}
$sql .= "keywords = '$_POST[keywords]', " .
"goods_brief = '$_POST[goods_brief]', " .
"seller_note = '$_POST[seller_note]', " .
"goods_weight = '$goods_weight'," .
"goods_number = '$goods_number', " .
"warn_number = '$warn_number', " .
"integral = '$_POST[integral]', " .
"give_integral = '$give_integral', " .
"rank_integral = '$rank_integral', " .
"is_best = '$is_best', " .
"is_new = '$is_new', " .
"is_hot = '$is_hot', " .
"is_on_sale = '$is_on_sale', " .
"is_alone_sale = '$is_alone_sale', " .
"is_shipping = '$is_shipping', " .
"goods_desc = '$_POST[goods_desc]', " .
"goods_shipai = '$_POST[goods_shipai]', " .
"last_update = '". gmtime() ."', ".
"goods_type = '$goods_type' " .
"WHERE goods_id = '$_REQUEST[goods_id]' LIMIT 1";
}
$db->query($sql);
找到admin/ includes/lib_main.php
/**
* 生成編輯器
* @param ? string ?input_name ?輸入框名稱
* @param ? string ?input_value 輸入框值
*/
function create_html_editor($input_name, $input_value = '')
{
global $smarty;
$editor = new FCKeditor($input_name);
$editor->BasePath ? = '../includes/fckeditor/';
$editor->ToolbarSet = 'Normal';
$editor->Width ? ? ?= ' ';
$editor->Height ? ? = '320';
$editor->Value ? ? ?= $input_value;
$FCKeditor = $editor->CreateHtml();
$smarty->assign('FCKeditor', $FCKeditor);
}
第2個(gè)商品編輯器
/**
* 生成編輯器2
* @param ? string ?input_name ?輸入框名稱
* @param ? string ?input_value 輸入框值
*/
function create_html_editor2($input_name, $output_name , $input_value = '')
{
global $smarty;
$editor = new FCKeditor($input_name);
$editor->BasePath ? = '../includes/fckeditor/';
$editor->ToolbarSet = 'Normal';
$editor->Width ? ? ?= ' ';
$editor->Height ? ? = '320';
$editor->Value ? ? ?= $input_value;
$FCKeditor = $editor->CreateHtml();
$smarty->assign($output_name, $FCKeditor);//這里輸出就用$output_name變量了。
}
修改一下對(duì)應(yīng)的后臺(tái)顯示文件 /admin/templates/goods_info.htm
下面新增加:
最后后臺(tái)效果:
{$goods.goods_desc}
下面增加第2 個(gè)商品描述編輯器描述內(nèi)容:
{$goods.goods_shipai}
這個(gè)是新增加的前臺(tái)效果:
版權(quán)聲明:
本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明:
ecshop商品描述增加多個(gè)商品描述編輯器的方法
標(biāo)簽:
ecshop商品描述
相關(guān)文章
-
12-29
(自適應(yīng)手機(jī)端)網(wǎng)址發(fā)布頁pbootcms網(wǎng)站模板 網(wǎng)站發(fā)布網(wǎng)站源碼下載
-
12-26
(自適應(yīng)手機(jī))網(wǎng)址發(fā)布頁pbootcms網(wǎng)站模板 網(wǎng)站發(fā)布網(wǎng)站源碼下載
-
12-23
(自適應(yīng)手機(jī)端)奶茶飲品網(wǎng)站pbootcms模板 飲料加盟店網(wǎng)站源碼下載
-
12-20
(帶手機(jī)版)古箏藝術(shù)培訓(xùn)網(wǎng)站pbootcms模板 水墨古典樂器風(fēng)格網(wǎng)站源碼下載
-
12-17
(自適應(yīng)手機(jī)端)響應(yīng)式合同申請(qǐng)書網(wǎng)站模板 word文檔pbootcms網(wǎng)站源碼下載
-
12-14
(自適應(yīng)手機(jī)端)圖書期刊繪本網(wǎng)站模板 畫報(bào)期刊雜志pbootcms網(wǎng)站源碼下載
-
12-10
(自適應(yīng)手機(jī))牙科診所網(wǎng)站pbootcms模板 牙科醫(yī)院網(wǎng)站源碼下載
-
12-07
(自適應(yīng)手機(jī)端)響應(yīng)式電子設(shè)備網(wǎng)站模板 - 數(shù)碼科技企業(yè)產(chǎn)品pbootcms源碼帶下載功能
-
12-04
(自適應(yīng)手機(jī))響應(yīng)式個(gè)人博客網(wǎng)站模版 美文博客pbootcms源碼下載 - 帶評(píng)論功能
-
11-30
(自適應(yīng)手機(jī))響應(yīng)式機(jī)械風(fēng)機(jī)設(shè)備網(wǎng)站模板 五金設(shè)備制造儀器易優(yōu)CMS源碼下載
-
12-01
(自適應(yīng)手機(jī))高爾夫球場(chǎng)pbootcms網(wǎng)站模板 體育運(yùn)動(dòng)場(chǎng)網(wǎng)站源碼下載
-
11-29
(自適應(yīng)手機(jī))電子產(chǎn)品網(wǎng)站pbootcms模板 智能手表數(shù)碼相機(jī)網(wǎng)站源碼下載
-
11-28
易優(yōu)問答插件
-
11-27
PhpStorm 2020.1【PHP編程軟件】中文破解版下載
-
11-25
(自適應(yīng)手機(jī))童裝外貿(mào)網(wǎng)站pbootcms模板 中英文童裝雙語網(wǎng)站源碼下載
-
11-22
易優(yōu)CMS多余圖片清理插件
-
11-23
易優(yōu)CMS文檔定時(shí)發(fā)布插件
-
11-21
(自適應(yīng)手機(jī)端)中英文雙語外貿(mào)網(wǎng)站汽車配件模板 汽車周邊產(chǎn)品pbootcms網(wǎng)站源碼下載
-
11-21
ps cs6軟件 Photoshop軟件 ps制圖軟件
-
11-21
易優(yōu)CMS relevarticle 相關(guān)文檔 調(diào)用
推薦文章
排行榜
- 295ECSHOP模板安裝教程
- 232ecshop二次開發(fā)注冊(cè)頁面添加推薦人驗(yàn)證功能
- 232ecshop語言{$lang.}標(biāo)簽的修改方法
- 232如何解決Ecshop報(bào)錯(cuò)config.php被清空的辦法
- 225Ecshop判斷會(huì)員等級(jí)
- 214ECSHOP退出登錄跳轉(zhuǎn)指定頁面
- 201修正Ecshop后臺(tái)訂單統(tǒng)計(jì)數(shù)據(jù)不準(zhǔn)確BUG
- 195解決ecshop和jquery沖突方法
- 194ECSHOP會(huì)員注冊(cè)訂單分成設(shè)置方法
- 187如何在ecshop網(wǎng)站上添加在線客服系統(tǒng)
模板推薦
-
(帶手機(jī)版)win電腦操作系統(tǒng)軟件IT軟件下載網(wǎng)站易優(yōu)CMS模板下載
模板名稱:(帶手機(jī)版)win電腦操作系統(tǒng)軟件IT軟件下載網(wǎng)站易優(yōu)CMS模板下載模...
-
(PC+WAP)公司注冊(cè)財(cái)務(wù)會(huì)計(jì)類網(wǎng)站pbootcms模板 藍(lán)色律師公證網(wǎng)站源碼下載
(PC+WAP)公司注冊(cè)財(cái)務(wù)會(huì)計(jì)類網(wǎng)站pbootcms模板 藍(lán)色律師公證網(wǎng)站源碼...
-
(自適應(yīng)手機(jī)端)pbootcms綠色園林建筑藝術(shù)網(wǎng)站模板 花卉園藝網(wǎng)站源碼下載
(自適應(yīng)手機(jī)端)pbootcms綠色園林建筑藝術(shù)網(wǎng)站模板 花卉園藝網(wǎng)站源碼下載P...
-
(自適應(yīng)手機(jī)端)pbootcms響應(yīng)式刷卡機(jī)POS機(jī)網(wǎng)站模板 無線支付設(shè)備網(wǎng)站源碼
(自適應(yīng)手機(jī)端)pbootcms響應(yīng)式刷卡機(jī)POS機(jī)網(wǎng)站模板 無線支付設(shè)備網(wǎng)站源...
-
(自適應(yīng)手機(jī)端)pbootcms響應(yīng)式旅游公司網(wǎng)站模板 藍(lán)色寬屏旅行社網(wǎng)站源碼下載
(自適應(yīng)手機(jī)端)pbootcms響應(yīng)式旅游公司網(wǎng)站模板 藍(lán)色寬屏旅行社網(wǎng)站源碼下...
-
熱門標(biāo)簽
- 網(wǎng)站發(fā)布
- 網(wǎng)址發(fā)布頁
- 飲料加盟店
- 奶茶飲品
- 樂器網(wǎng)站
- 水墨古典
- 古箏藝術(shù)
- word文檔
- 合同申請(qǐng)書
- 期刊雜志
- 畫報(bào)
- 繪本網(wǎng)站模板
- 圖書期刊
- 牙科醫(yī)院
- 牙科診所
- 數(shù)碼科技
- 機(jī)械模板
- 機(jī)械風(fēng)機(jī)
- 體育運(yùn)動(dòng)場(chǎng)
- 高爾夫球場(chǎng)
- 數(shù)碼相機(jī)
- 破解版
- PhpStorm
- PHP編程軟件
- 雙語網(wǎng)站
- 童裝
- 童裝外貿(mào)網(wǎng)站
- 多余圖片清理插件
- 文檔定時(shí)發(fā)布插件
- 汽車周邊產(chǎn)品
- 汽車配件模板
- ps制圖軟件
- Photoshop軟件
- 相關(guān)文檔插件
- 易優(yōu)CMS插件
- QQ一鍵登錄
- 易優(yōu)系統(tǒng)助手
- 制圖軟件
- ps軟件
- Photoshop
- 下載功能
- 金店網(wǎng)站
- 劇情介紹
- word資源
- 文案網(wǎng)站
- 電影解說
- 財(cái)務(wù)審計(jì)
- 工程造價(jià)
- 圖片素材網(wǎng)
- 業(yè)務(wù)咨詢
- 服務(wù)機(jī)構(gòu)
- 金融服務(wù)
- 企業(yè)咨詢
- 電腦組裝
- 電腦維修
- 軸承電子
- 出口模版
- 五金行業(yè)
- 英文會(huì)員模版
- 易優(yōu)英文版
-
聯(lián)系我們
-
返回頂部