Ecshop的超级客服插件
Ecshop的超级客服插件

Ecshop的超级客服插件

Ecshop的超级客服插件特点:

1,左侧或右侧悬浮可伸缩,简洁美观。

2,带后台,可自定义皮肤样式。

3.功能强大,包含qq,旺旺,53kf以及社会化网络分享按钮。

ecshop客服插件
ecshop客服插件

安装前请做好备份!!!!!!!!!!!!。

Ecshop的超级客服插件安装步骤:

首先将admin目录下的kefu.php打开,将if($urlhost!='www.zuoyunlai.com'&&$urlhost!='zuoyunlai.com')里面的域名换成自己的域名,这就是关键所在。

1. 将解压文件复制到根目录放心不会覆盖原有文件。如果默认模版不是default把themes文件地下的default修改为你的模版文件夹名!在覆盖。文件然后在执行一下操作。ecs_kefu.sql不用覆盖,以下操作请用Adobe Dreamweaver 操作或者其他php编译工具。

2. 在languages/zh_cn/admin/common.php里面找:

$_LANG['captcha_manage'] = '验证码管理';

在这段代码下面加入:

$_LANG['kefu'] = '客服管理';

3. 在admin/includes/inc_menu.php里面找:

$modules['11_system']['captcha_manage']  = 'captcha_manage.php?act=main';

在这段代码下面加入:

$modules['11_system']['kefu']   = 'kefu.php?act=main';

4. 在themes/你的模版文件名/library/page_footer.lbi文件最底部加入代码:

{insert name='kefushow'}

5.在includes/lib_insert.php文件最底部增加以下函数,放到 ?> 的前面:

function insert_kefushow($arr)
{
    
	
	$kefu = kefushow();
	$GLOBALS['smarty']->assign('kefu',     $kefu);
	
	
	$val = $GLOBALS['smarty']->fetch('library/kefu_show.lbi');
	
	return $val;
	
}

6.在includes/lib_main.php文件最底部增加以下函数放到 ?> 的前面:

/**
 * 获得客服信息。
 *
 * @access  private
 * @return  array
 */
function kefushow()
{
    $sql = 'SELECT name, value FROM ' . $GLOBALS['ecs']->table('kefu') . '';
        $res = $GLOBALS['db']->getAll($sql);
		
		
	    $arr = array();
		
		foreach ($res AS $row)
        {
            $arr[$row['name']] = $row['value'];
        }

		$arr['kefushow']               = !empty($arr['kefushow']) ? $arr['kefushow'] : '';
        $arr['skin']                   = !empty($arr['skin']) ? $arr['skin'] : '';
		$arr['show']                   = !empty($arr['show']) ? $arr['show'] : '';
        $arr['showlefttop']            = !empty($arr['showlefttop']) ? $arr['showlefttop'] : '';
		$arr['showleft']               = !empty($arr['showleft']) ? $arr['showleft'] : '';
		
		$arr['showrighttop']           = !empty($arr['showrighttop']) ? $arr['showrighttop'] : '';
        $arr['showright']              = !empty($arr['showright']) ? $arr['showright'] : '';
		$arr['fs_show']                = !empty($arr['fs_show']) ? $arr['fs_show'] : '';
        $arr['typeone']                = !empty($arr['typeone']) ? $arr['typeone'] : '';
        //$arr['kfqq']                   = !empty($arr['kfqq']) ? $arr['kfqq'] : '';
		//$arr['kfqq']                   =explode(",",$arr['kfqq']);
		
		//售前客服qq
		 foreach ($res AS $key =>$row)
    	{
        $arr[$row['kfqq']]['id']   = explode(",",$arr['kfqq']);
         }
		 
		  foreach ($arr[$row['kfqq']]['id'] AS $key =>$row)
    	 {
			 $aaa=explode(":",$row);
            $arr['qqone'][$key]['name']   = $aaa[0];
			$arr['qqone'][$key]['qq']   = $aaa[1];
         }
		 
		 //售前客服旺旺
		 foreach ($res AS $key =>$row)
    	{
        $arr[$row['im']]['id']   = explode(",",$arr['im']);
         }
		 
		  foreach ($arr[$row['im']]['id'] AS $key =>$row)
    	 {
			 $aaa=explode(":",$row);
            $arr['imone'][$key]['name']   = $aaa[0];
			$arr['imone'][$key]['im']   = $aaa[1];
         }
		$arr['typetwo']                = !empty($arr['typetwo']) ? $arr['typetwo'] : '';
		
		
		//售后客服qq
		 foreach ($res AS $key =>$row)
    	{
        $arr[$row['kfqqtwo']]['id']   = explode(",",$arr['kfqqtwo']);
         }
		 
		  foreach ($arr[$row['kfqqtwo']]['id'] AS $key =>$row)
    	 {
			 $aaa=explode(":",$row);
            $arr['qqtwo'][$key]['name']   = $aaa[0];
			$arr['qqtwo'][$key]['qq']   = $aaa[1];
         }
		 
		 //售后客服旺旺
		 foreach ($res AS $key =>$row)
    	{
        $arr[$row['imtwo']]['id']   = explode(",",$arr['imtwo']);
         }
		 
		  foreach ($arr[$row['imtwo']]['id'] AS $key =>$row)
    	 {
			 $aaa=explode(":",$row);
            $arr['imqqtwo'][$key]['name']   = $aaa[0];
			$arr['imqqtwo'][$key]['im']   = $aaa[1];
         }
		
		if($arr['qqqun']){
			$arr['qqqun']                     =explode(",",$arr['qqqun']);
		}else{
			$arr['qqqun']                   = $arr['qqqun'];
		}
		
		if($arr['wwqun']){
			$arr['wwqun']                     =explode(",",$arr['wwqun']);
		}else{
			$arr['wwqun']                   = $arr['wwqun'];
		}

		
		$arr['kftel']                  = !empty($arr['kftel']) ? $arr['kftel'] : '';
        $arr['shijian']                = !empty($arr['shijian']) ? $arr['shijian'] : '';
		$arr['qqcss']                  = !empty($arr['qqcss']) ? $arr['qqcss'] : '';
		
		
		if($arr['kf53']){
			$arr['kf53']                     =explode(",",$arr['kf53']);
		}else{
			$arr['kf53']                   = $arr['kf53'];
		}
		
		
		$arr['wwcss']                  = !empty($arr['wwcss']) ? $arr['wwcss'] : '';
		$arr['fenxiang']               = !empty($arr['fenxiang']) ? $arr['fenxiang'] : '';
		if($arr['fenxiang']){
		$arr['fenxiang']               =explode(",",$arr['fenxiang']);
		}else{
		$arr['fenxiang']               =$arr['fenxiang'];
		}
		return $arr;

}

7.打开网站后台-数据库管理-SQL查询,将ecs_kefu.sql文件用记事本打开复制里面的代码到执行框,提交查询。如果数据表前缀经过修改了,请把ecs_修改为您数据库表的前缀,再执行。

相关文件下载:[download id="907"]

一条评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据