欢迎光临
我们一直在努力

ecshop按货号排序

方法来自网络:

方法如下,默认显示就为货号排序

一、目录排序:
1)language/zh_cn/common.php  加
$_LANG[‘sort’][‘goods_sn’] = ‘按货号排序’;

2) category.php 行 60 左右

/* 排序、显示方式以及类型 */
$default_display_type = $_CFG[‘show_order_type’] == ‘0’ ? ‘list’ : ($_CFG[‘show_order_type’] == ‘1’ ? ‘grid’ : ‘text’);
$default_sort_order_method = $_CFG[‘sort_order_method’] == ‘0’ ? ‘DESC’ : ‘ASC’;
$default_sort_order_type   = $_CFG[‘sort_order_type’] == ‘0’ ? ‘goods_sn’ : ($_CFG[‘sort_order_type’] == ‘1’ ? ‘shop_price’ : ‘goods_sn’);$sort  = (isset($_REQUEST[‘sort’])  && in_array(trim(strtolower($_REQUEST[‘sort’])), array(‘goods_id’, ‘shop_price’, ‘last_update’,‘goods_sn’))) ? trim($_REQUEST[‘sort’])  : $default_sort_order_type;

二、搜索页面

search.php,232行左右

    /* 排序、显示方式以及类型 */
    $default_display_type = $_CFG[‘show_order_type’] == ‘0’ ? ‘list’ : ($_CFG[‘show_order_type’] == ‘1’ ? ‘grid’ : ‘text’);
    $default_sort_order_method = $_CFG[‘sort_order_method’] == ‘0’ ? ‘DESC’ : ‘ASC’;
    $default_sort_order_type   = $_CFG[‘sort_order_type’] == ‘0’ ? ‘goods_sn’ : ($_CFG[‘sort_order_type’] == ‘1’ ? ‘shop_price’ : ‘goods_sn’);
   $sort  = (isset($_REQUEST[‘sort’])  && in_array(trim(strtolower($_REQUEST[‘sort’])), array(‘goods_id’, ‘shop_price’, ‘last_update’,‘goods_sn’))) ? trim($_REQUEST[‘sort’])  : $default_sort_order_type;

历史上的今天
1月
2
    哇哦~~~,历史上的今天没发表过文章哦
赞(0) 打赏
未经允许不得转载:刘旭的人个博客 » ecshop按货号排序
分享到: 更多 (0)
标签:

评论 抢沙发

评论前必须登录!

 

QQ :13945502电话:13913571631

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

×
订阅图标按钮