請注意:如果您已經是本站虛擬主機的用戶,請直接來信【註明主機帳號】免費索取,如果你是20201024以後的虛擬主機用戶,此功能已經內建無須下載安裝

安裝說明:
1.把ecshop根目錄下的 mobile 資料夾(如果有)更名為 mobile_old 備份起來,然後將壓縮檔解壓縮出來的 mobile 複製到 ecshop 根目錄下
2、登入 ECSHOP 後台【資料庫管理】【資料備份】【SQL查詢】輸入下列語句
INSERT INTO `ecs_shop_config` (`id` ,`parent_id` ,`code` ,`type` ,`store_range` ,`store_dir` ,`value` , `sort_order`)VALUES(NULL , '9', 'mobile_search_page_size', 'text', '', '', '6', '1'),(NULL , '9', 'mobile_goods_page_size', 'text', '', '', '6', '1');然後按【提交查詢】 【ecs】必須和資料表前綴一樣,如果不知道資料表前綴,請打開 data/config.php 約第1][5行 $prefix = "???_"; 核對一下 3、到後台的【商店設置】【wap設置】裡,把wap功能 [開啟]。 4、如果你曾經把網頁版的 index.php 的 wap 判斷式
$ua = strtolower($_SERVER['HTTP_USER_AGENT']); $uachar = "/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile)/i"; if(($ua == '' || preg_match($uachar, $ua))&& !strpos(strtolower($_SERVER['REQUEST_URI']),'wap')) { $Loaction = 'mobile/'; if (!empty($Loaction)) { ecs_header("Location: $Loaction\n"); exit; } }改為
$user_agent = $_SERVER['HTTP_USER_AGENT']; $mobile_browser = Array( "mqqbrowser", //手機QQ瀏覽器 "opera mobi", //手機opera "juc","iuc",//uc瀏覽器 "fennec","ios","applewebKit/420","applewebkit/525","applewebkit/532","ipad","iphone","ipaq","ipod", "iemobile", "windows ce",//windows phone "240×320","480×640","acer","android","anywhereyougo.com","asus","audio","blackberry","blazer","coolpad" ,"dopod", "etouch", "hitachi","htc","huawei", "jbrowser", "lenovo","lg","lg-","lge-","lge", "mobi","moto","nokia","phone","samsung","sony","symbian","tablet","tianyu","wap","xda","xde","zte" ); $is_mobile = false; foreach ($mobile_browser as $device) { if (stristr($user_agent, $device)) { $is_mobile = true; break; } } if($is_mobile) ecs_header("Location: mobile/\n");exit;5、編輯 includes/lib_article.php 約 42~57 行
//增加搜索条件,如果有搜索内容就进行搜索 if ($requirement != '') { $sql = 'SELECT article_id, title, author, add_time, file_url, open_type' . ' FROM ' .$GLOBALS['ecs']->table('article') . ' WHERE is_open = 1 AND title like \'%' . $requirement . '%\' ' . ' ORDER BY article_type DESC, article_id DESC'; } else { $sql = 'SELECT article_id, title, author, add_time, file_url, open_type' . ' FROM ' .$GLOBALS['ecs']->table('article') . ' WHERE is_open = 1 AND ' . $cat_str . ' ORDER BY article_type DESC, article_id DESC'; }改為
//增加搜索条件,如果有搜索内容就进行搜索 if ($requirement != '') { $sql = 'SELECT article_id, cat_id, title, author, add_time, file_url, open_type' . ' FROM ' .$GLOBALS['ecs']->table('article') . ' WHERE is_open = 1 AND title like \'%' . $requirement . '%\' ' . ' ORDER BY article_type DESC, article_id DESC'; } else { $sql = 'SELECT article_id, cat_id, title, author, add_time, file_url, open_type' . ' FROM ' .$GLOBALS['ecs']->table('article') . ' WHERE is_open = 1 AND ' . $cat_str . ' ORDER BY article_type DESC, article_id DESC'; }
$arr[$article_id]['id'] = $article_id; 後面新增 $arr[$article_id]['cat_id'] = $row['cat_id'];6、編輯 languages/zh_tw/admin/shop_config.php 約 430 行開始將
$_LANG['cfg_name']['wap'] = 'WAP設置'; 改為 $_LANG['cfg_name']['wap'] = '手機版功能設定'; 將 $_LANG['cfg_name']['wap_config'] = '是否開啟WAP功能'; 改為 $_LANG['cfg_name']['wap_config'] = '是否開啟手機版功能'; 新增 $_LANG['cfg_name']['mobile_search_page_size'] = '商品搜尋結果-每頁筆數'; $_LANG['cfg_name']['mobile_goods_page_size'] = '商品列表頁面-每頁筆數';【商店設置】【手機版功能設定】多了【商品搜尋結果-每頁筆數】與【商品列表頁面-每頁筆數】,可以設置這2個頁面的每頁顯示筆數。 7、編輯 languages/zh_tw/user.php 約 358 行將
$_LANG['detail_order_sn'] = '訂單號'; 改為 $_LANG['detail_order_sn'] = '訂單編號'; 362 行重複定義,刪除 $_LANG['detail_order_sn'] = '訂單號';8、編輯 languages/zh_tw/common.php ,新增以下手機版使用的語系設定
//手機版 $_LANG['label_mobile_category_title'] = '商品分類'; $_LANG['label_mobile_button_search'] = '商品搜尋'; $_LANG['label_mobile_promotion_title'] = '本 月 促 銷'; $_LANG['label_mobile_new_title'] = '最 新 上 架'; $_LANG['label_mobile_hot_title'] = '熱 銷 商 品'; $_LANG['label_mobile_best_title'] = '本 月 主 打'; $_LANG['label_mobile_user_center'] = '會員中心'; $_LANG['label_mobile_user_register'] = '加入會員'; $_LANG['label_mobile_user_login'] = '登入'; $_LANG['label_mobile_user_logout'] = '登出'; $_LANG['message_board_js']['msg_username_empty'] = '請填寫會員帳號'; $_LANG['message_board_js']['msg_username_length'] = '會員帳號需大於3個字元'; $_LANG['message_board_js']['msg_password_empty'] = '請填寫會員密碼'; $_LANG['message_board_js']['msg_password_length'] = '會員密碼需大於6個字元'; $_LANG['message_board_js']['msg_password_notmatch'] = '會員密碼兩次輸入不一致'; $_LANG['message_board_js']['msg_sel_question_empty'] = '請選擇一個密碼提示問題'; $_LANG['message_board_js']['msg_passwd_answer_empty'] = '請填寫密碼提示解答'; $_LANG['message_board_js']['msg_extend_field5i_empty'] = '請填寫手機號碼'; $_LANG['message_board_js']['msg_extend_field5i_error'] = '手機號碼只能是數字或連字號(-)';關於首頁的三個框架:【大圖主廣告輪播】【本月促銷】【本月主打】的部份稍做說明:
【大圖主廣告輪播】:
會抓取後台的【系統設置】->【首頁主廣告設置】裡的設置內容,但這些設置的內容會放置於網站根目錄下的data/flash_data.xml內。
【本月促銷】:
這個框架會抓取有設定促銷價,以及設定促銷起始日與結束日,以及結束日大於目前日期的商品來顯示。
【本月主打】
這個框架會抓取有設定為【新品】的商品來顯示。