解决搜索页面自定义导航没有currentPage的修改

2016-07-07 15:03 来源:www.chinab4c.com 作者:ecshop专家

打开
lib_main.php

查找

  1. $condition = empty($ctype) ? (strpos($cur_url, $v['url']) === 0) : (strpos($cur_url, $v['url']) === 0 && strlen($cur_url) == strlen($v['url']));
复制代码
修改为
  1. if(!empty($_REQUEST['intro'])){
  2. $intro=explode('intro', $v['url']);
  3. $condition = empty($ctype) ? (strpos($_REQUEST['intro'], substr($intro[1], 1)) === 0) : (strpos($_REQUEST['intro'], substr($intro[1], 1)) === 0 && strlen($_REQUEST['intro']) == strlen(substr($intro[1], 1)));
  4. }else{
  5. $condition = empty($ctype) ? (strpos($cur_url, $v['url']) === 0) : (strpos($cur_url, $v['url']) === 0 && strlen($cur_url) == strlen($v['url']));
  6. }
复制代码
只适合有intro的搜索
也就是.精品.新品/热销.促销

回答:
不错,支持一下楼主