ECSHOP品牌列表依據貨號排序
2013-02-05
210
相關文章
ECSHOP品牌列表是依據商品ID、排序編號、更新日期排序
如果想依據貨號排序
請編輯 brand.php 67行將
$default_sort_order_type = $_CFG['sort_order_type'] == '0' ? 'goods_id' : ($_CFG['sort_order_type'] == '1' ? 'shop_price' : 'last_update');
改為
$default_sort_order_type = 'goods_sn';//$_CFG['sort_order_type'] == '0' ? 'goods_id' : ($_CFG['sort_order_type'] == '1' ? 'shop_price' : 'last_update');
或將69行的
$sort = (isset($_REQUEST['sort']) && in_array(trim(strtolower($_REQUEST['sort'])), array('goods_id', 'shop_price', 'last_update'))) ? trim($_REQUEST['sort']) : $default_sort_order_type;
改為
$sort = 'goods_sn';//(isset($_REQUEST['sort']) && in_array(trim(strtolower($_REQUEST['sort'])), array('goods_id', 'shop_price', 'last_update'))) ? trim($_REQUEST['sort']) : $default_sort_order_type;
另外ECSHOP品牌列表並沒有貨號可顯示
如果要顯示貨號的話,請在277行的
brand_get_goods 函數 SQL 查詢裡增加
g.goods_sn,
變成
/* 获得商品列表 */
$sql = 'SELECT g.goods_id, g.goods_id, g.goods_name, g.market_price, g.shop_price AS org_price, ' .
將 goods_sn 裝入變數中
$arr[$row['goods_id']]['goods_sn'] = $row['goods_sn'];
然後就可以在 goods_list.lbi 內使用 {$goods.goods_sn} 來調用
如果想依據貨號排序
請編輯 brand.php 67行將
$default_sort_order_type = $_CFG['sort_order_type'] == '0' ? 'goods_id' : ($_CFG['sort_order_type'] == '1' ? 'shop_price' : 'last_update');
改為
$default_sort_order_type = 'goods_sn';//$_CFG['sort_order_type'] == '0' ? 'goods_id' : ($_CFG['sort_order_type'] == '1' ? 'shop_price' : 'last_update');
或將69行的
$sort = (isset($_REQUEST['sort']) && in_array(trim(strtolower($_REQUEST['sort'])), array('goods_id', 'shop_price', 'last_update'))) ? trim($_REQUEST['sort']) : $default_sort_order_type;
改為
$sort = 'goods_sn';//(isset($_REQUEST['sort']) && in_array(trim(strtolower($_REQUEST['sort'])), array('goods_id', 'shop_price', 'last_update'))) ? trim($_REQUEST['sort']) : $default_sort_order_type;
另外ECSHOP品牌列表並沒有貨號可顯示
如果要顯示貨號的話,請在277行的
brand_get_goods 函數 SQL 查詢裡增加
g.goods_sn,
變成
/* 获得商品列表 */
$sql = 'SELECT g.goods_id, g.goods_id, g.goods_name, g.market_price, g.shop_price AS org_price, ' .
將 goods_sn 裝入變數中
$arr[$row['goods_id']]['goods_sn'] = $row['goods_sn'];
然後就可以在 goods_list.lbi 內使用 {$goods.goods_sn} 來調用
如果你對ECSHOP品牌列表依據貨號排序有任何問題請到討論區發帖。