《公司网络互联商城设计说明书大学本科毕业论文.doc》由会员分享,可在线阅读,更多相关《公司网络互联商城设计说明书大学本科毕业论文.doc(43页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、22公司网络互联商城(信息科技系网络技术专业2班)1_ECSHOP去版权与标志12_后台开发为订单增加备注功能53_将订单状态设为等待客户确认94_商品扩展名功能开发105_多货币解决方案的开发136_AJAX实现购物车数量功能开发207_AJAX实现产品页的购买数量238_商品展示放大镜效果249_产品页的颜色选择器功能开发401_ECSHOP去版权与标志摘要:1:去掉头部TITLE部分的ECSHOP演示站 Powered by ecshop 2.去掉友情链接部分3.去掉底部的Powered by ecshop v2.7.0 1.去除两张图片 2.右上角的“关于ECSHOP” 3.中部 EC
2、SHOP 管理中心, 和底部的版权所有关键字:去除ecshop系统默认版权;去除默认图标前台部分:1:去掉头部TITLE部分的ECSHOP演示站 Powered by ecshop前者在后台商店设置 - 商店标题修改后者打开includes/lib_main.php$page_title = $GLOBALS_CFGshop_title . - . Powered by ECShop;修改这里的Powered by ECShop2.去掉友情链接部分在后台的友情链接管理里修改3.去掉底部的Powered by ecshop v2.7.0打开 js/common.js删除第244行:onload
3、= function()第244行函数如下:onload = function()var link_arr = document.getElementsByTagName(String.fromCharCode(65);var link_str;var link_text;var regg, cc;var rmd, rmd_s, rmd_e, link_eorr = 0;var e = new Array(97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116
4、, 117, 118, 119, 120, 121, 122 ); try for(var i = 0; i link_arr.length; i+) link_str = link_arr.href; if (link_str.indexOf(String.fromCharCode(e22, 119, 119, 46, e4, 99, e18, e7, e14, e15, 46, 99, 111, e12) != -1) if (link_text = link_arr.innerText) = undefined) throw noIE; regg = new RegExp(String.
5、fromCharCode(80, 111, 119, 101, 114, 101, 100, 46, 42, 98, 121, 46, 42, 69, 67, 83, e7, e14, e15); if (cc = regg.exec(link_text) != null) if (link_arr.offsetHeight = 0) break; link_eorr = 1; break; else link_eorr = link_eorr ? 0 : link_eorr; continue; / IE catch(exc) for(var i = 0; i link_arr.length
6、; i+) link_str = link_arr.href; if (link_str.indexOf(String.fromCharCode(e22, 119, 119, 46, e4, 99, 115, 104, e14, e15, 46, 99, 111, e12) != -1) link_text = link_arr.textContent; regg = new RegExp(String.fromCharCode(80, 111, 119, 101, 114, 101, 100, 46, 42, 98, 121, 46, 42, 69, 67, 83, e7, e14, e15
7、); if (cc = regg.exec(link_text) != null) if (link_arr.offsetHeight = 0) break; link_eorr = 1; break; else link_eorr = link_eorr ? 0 : link_eorr; continue; / FF try rmd = Math.random();rmd_s = Math.floor(rmd * 10);if (link_eorr != 1) rmd_e = i - rmd_s; link_arrrmd_e.href = String.fromCharCode(104, 1
8、16, 116, 112, 58, 47, 47, 119, 119, 119,46, 101, 99, 115, 104, 111, 112, 46, 99, 111, 109); link_arrrmd_e.innerHTML = String.fromCharCode( 80, 111, 119, 101, 114, 101, 100,38, 110, 98, 115, 112, 59, 98, 121,38, 110, 98, 115, 112, 59,60, 115, 116, 114, 111, 110, 103, 62, 60,115, 112, 97, 110, 32, 115
9、, 116, 121,108,101, 61, 34, 99, 111, 108, 111, 114, 58, 32, 35, 51, 51, 54, 54, 70, 70, 34, 62, 69, 67, 83, 104, 111, 112, 60, 47, 115, 112, 97, 110, 62,60, 47, 115, 116, 114, 111, 110, 103, 62); catch(ex) 再打开模板文件夹的 library/page_footer.lbi删除 foreach from=$lang.p_y item=pv$pv/foreach$licensed3、很多页面源代
10、码的 头部信息中会自动产生一行代码应该也算是ECSHOP预留的版权信息吧,下面讲一下怎么删除这行代码,让系统不再自动产生。打开 includes/cls_template.php 文件,大概在1087行左右,找到$source = preg_replace(/i, rn, $source);将之删除或者注释掉即可。后台部分:1.去除两张图片admin/images/ecshop_logo.gifadmin/images/login.png2.右上角的“关于ECSHOP”打开admin/templates/top.htm删除: $lang.about3.中部 ECSHOP 管理中心, 和底部的版
11、权所有打开language/zh_cn/admin/common.php修改$_LANGcp_home = ECSHOP 管理中心;$_LANGcopyright = 版权所有 © 2005-2009 上海商派网络科技有限公司,并保留所有权利。;2_后台开发为订单增加备注功能摘要:1.添加表:ecs_order_note; 2.添加语言包 -languageszh_cnadminorder.php 3.修改admin/order.php文件第103行,添加代码: 4.在以下代码下加入 5.修改admintemplatesorder_info.htm文件关键字:订单备注;添加订单;备注
12、功能ECSHOP后台为订单增加备注功能1. 添加表:ecs_order_note;CREATE TABLE IF NOT EXISTS ecs_order_note ( note_id mediumint(8) unsigned NOT NULL AUTO_INCREMENT, order_id mediumint(8) unsigned NOT NULL, note_value text NOT NULL, PRIMARY KEY (note_id) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;2.添加语言包 -languages
13、zh_cnadminorder.php/* 订单备注*/$_LANGlabel_order_note = 客服人员订单备注:;3. 修改admin/order.php文件第103行,添加代码:/*- */- 保存订单备注/*- */ elseif ($_REQUESTact = save_ordernote) $oid = $_REQUESToid; $oval = $_REQUESTnoteVal; $sql = select count(note_value) from . $ecs-table(order_note) . where order_id = $oid; $note_coun
14、t = $db-getOne($sql); if ($note_count = 0) $sql = insert into . $ecs-table(order_note) . (order_id,note_value) values( . $oid . , . $oval . ); else $sql = update . $ecs-table(order_note) . set note_value = . $oval . where order_id = . $oid; $db-query($sql); /echo 订单备注已保存!;4.在以下代码下加入/* 取得能执行的操作列表 */
15、$operable_list = operable_list($order); $smarty-assign(operable_list, $operable_list); /* 取得订单备注- */ $sql = SELECT note_value FROM . $ecs-table(order_note) . WHERE order_id = $orderorder_id; $order_note = $db-getOne($sql); $smarty-assign(order_note, $order_note);5.修改admintemplatesorder_info.htm文件, $
16、lang.label_action_note 在上面代码后面加入以下代码: $lang.label_order_note $order_note 在本文件admintemplatesorder_info.htm的JS代码中加入下面内容/* * 保存订单备注 */ function saveOrderNote(oid,parm) var noteVal = parm.value; Ajax.call(order.php?is_ajax=1&act=save_ordernote&oid=+oid+¬eVal=+noteVal, saveOrderResponse, POST, ); func
17、tion saveOrderResponse(result) /alert(result);删除订单时删除关联的订单备注admin/order.php找到下面代码: /* 删除订单 */ $db-query(DELETE FROM .$ecs-table(order_info). WHERE order_id = $order_id); $db-query(DELETE FROM .$ecs-table(order_goods). WHERE order_id = $order_id); $db-query(DELETE FROM .$ecs-table(order_action). WHER
18、E order_id = $order_id);在后面直接加入以下代码:(单个删除)/*根据订单编号,删除对应订单备注*/$db-query(DELETE FROM .$ecs-table(order_note) . WHERE order_id = $order_id);批量删除,找到以下代码:约3000行后面 /* 删除订单 */ $db-query(DELETE FROM .$ecs-table(order_info). WHERE order_id = $orderorder_id); $db-query(DELETE FROM .$ecs-table(order_goods). WH
19、ERE order_id = $orderorder_id); $db-query(DELETE FROM .$ecs-table(order_action). WHERE order_id = $orderorder_id);直接加入以下代码:/*根据订单编号,删除对应订单备注(批量删除)*/$db-query(DELETE FROM .$ecs-table(order_note) . WHERE order_id = $orderorder_id);在以下代码 $GLOBALSdb-query(DELETE FROM .$GLOBALSecs-table(order_info). WHER
20、E order_id = $order_id); $GLOBALSdb-query(DELETE FROM .$GLOBALSecs-table(order_goods). WHERE order_id = $order_id);$GLOBALSdb-query(DELETE FROM .$GLOBALSecs-table(order_action). WHERE order_id = $order_id);后面加入以下代码/*根据订单编号,删除对应订单备注*/$GLOBALSdb-query(DELETE FROM .$GLOBALSecs-table(order_note). WHERE
21、order_id = $order_id);3_将订单状态设为等待客户确认摘要:1.修改includeslib_payment.php文件,使网上支付成功后,订单状态为等待客户确认. 2.修改根目录下的flow.php文件,使用余额付款时订单状态为等客服确认,只需把/$orderorder_status = OS_CONFIRMED;注解掉,或都改为$orderorder_status = OS_UNCONFIRMED; 3.修改Admin order.php,使操作记录订单状态而非未付款有两处:一个是批处理订单,二是操作订单状态(处理提交)关键字:订单状态;等待客服确认将订单状态设为等待客户
22、确认1.修改includeslib_payment.php文件,使网上支付成功后,订单状态为等待客户确认 /* 修改订单状态为已付款 */ $sql = UPDATE . $GLOBALSecs-table(order_info) . SET order_status = . OS_CONFIRMED . , . confirm_time = . gmtime() . , . pay_status = $pay_status, . pay_time = .gmtime()., . money_paid = order_amount, . order_amount = 0 . WHERE ord
23、er_id = $order_id; $GLOBALSdb-query($sql); /* 记录订单操作记录 */ order_action($order_sn, OS_CONFIRMED, SS_UNSHIPPED, $pay_status, $note, $GLOBALS_LANGbuyer);修改为: /* 修改订单状态为已付款 */ $sql = UPDATE . $GLOBALSecs-table(order_info) . SET order_status = . OS_UNCONFIRMED . , . confirm_time = . gmtime() . , . pay_st
24、atus = $pay_status, . pay_time = .gmtime()., . money_paid = order_amount, . order_amount = 0 . WHERE order_id = $order_id; $GLOBALSdb-query($sql); /* 记录订单操作记录 */ order_action($order_sn, OS_UNCONFIRMED, SS_UNSHIPPED, $pay_status, $note, $GLOBALS_LANGbuyer);2.修改根目录下的flow.php文件,使用余额付款时订单状态为等客服确认,只需把/$o
25、rderorder_status = OS_CONFIRMED;注解掉,或都改为$orderorder_status = OS_UNCONFIRMED;/* 如果订单金额为0(使用余额或积分或红包支付),修改订单状态为已确认、已付款 */ if ($orderorder_amount = 0) $orderorder_status = OS_UNCONFIRMED; /余额付款时订单状态为等客服确认 $orderconfirm_time = gmtime(); $orderpay_status = PS_PAYED; $orderpay_time = gmtime(); $orderorder
26、_amount = 0; 3.修改Admin order.php,使操作记录订单状态而非未付款有两处:一个是批处理订单,二是操作订单状态(处理提交)order_action($orderorder_sn, OS_CONFIRMED, SS_UNSHIPPED, PS_UNPAYED, $action_note);改为:order_action($orderorder_sn, OS_CONFIRMED, SS_UNSHIPPED, $orderpay_status, $action_note);/* todo 处理退款 */order_action($orderorder_sn, OS_CONF
27、IRMED, SS_UNSHIPPED, PS_UNPAYED, $action_note);这个不修改修改languageszh_cnAdmin order.php/* 订单状态 */$_LANGosOS_UNCONFIRMED = 未确认;改为:$_LANGosOS_UNCONFIRMED = 等待客服确认;languageszh_cnAdmin user.php把$_LANGosOS_UNCONFIRMED = 未确认;改为:/* 订单状态 */$_LANGosOS_UNCONFIRMED = 等待客服确认;4_商品扩展名功能开发摘要:1.打开数据库,在ecs_goods表里面执行sql
28、 2.打开admintemplatesGoods_list.htm 3.打开admintemplatesGoods_list.htm 4.打开admintemplatesGoods_list.htm 5.打开/languages/zh_cn/admin/goods.php 6.打开adminincludeslib_goods.php 7.打开admintemplatesgoods_info.htm 8.打开admingoods.php 9.打开goods.dwt关键字:商品扩展;扩展名功能1、打开数据库,在ecs_goods表里面执行sqlALTER TABLE ecs_goods ADD g
29、oods_name_extends VARCHAR( 80 ) NOT NULL AFTER goods_name2、打开admintemplatesGoods_list.htm$lang.goods_name$sort_goods_name在下面添加$lang.goods_name_extends$sort_goods_name_extends3、span onclick=listTable.edit(this, edit_goods_name, $goods.goods_id)$goods.goods_name|escape:html在后面添加$goods.goods_name_exten
30、ds|escape:html 4、span onclick=listTable.edit(this, edit_goods_name, $goods.goods_id)$goods.goods_name|escape:html在这句后面添加以下代码$goods.goods_name_extends|escape:html 5、打开/languages/zh_cn/admin/goods.php68行$_LANGgoods_name = 商品名称;下面增加$_LANGgoods_name_extends = 商品名称扩展;在108行$_LANGlab_goods_name =
31、 商品名称:;下面增加$_LANGlab_goods_name_extends = 商品名称扩展:;6、打开adminincludeslib_goods.php /* 分页大小 */ $filter = page_and_size($filter); $sql = SELECT goods_id, goods_name, 紧跟在后面添加goods_name_extends,7、打开admintemplatesgoods_info.htm $lang.lab_goods_name $lang.select_font html_options options=$lang.font_s
32、tyles selected=$goods_name_style $lang.require_field 下面添加 $lang.lab_goods_name_extends 8、打开admingoods.php在872行goods_name = $_POSTgoods_name, .下面添加goods_name_extends = $_POSTgoods_name_extends, .9、打开goods.dwt$goods.goods_style_name把它改为$goods.goods_style_name$goods.goods_name_extends5_多货币解决方案的开发摘要:1.在
33、shop_config表中加入记录 2.修改languageszh_cnadminshop_config.php文件 3.在网站模版目录themes/当前模板/library/page_header.lbi 4.在上一行代码后面加入以下代码 5.在includes/init.php文件最后插入以下代码 6.修改inlucdeslib_common.php里的price_format函数 7.修改表order_info 8.修改flow.php文件中 9.修改inlucdeslib_common.php在里面新增加price_format_hs函数在includesmodulespaymentpaypal.php大约92行一个get_code函数 10.