广州传奇网络
地址:广州市天河区东圃大马路富华楼C座
电话:13808825895
QQ:1564443073
ecshop的属性排名列混乱,如何调整呢?
属性的排序有三个方式:sort_order、attr_price、goods_attr_id
如果要修改的话,打开includes/lib_goods.php文件的搜索如下代码:
/* 获得商品的规格 */
$sql = "SELECT a.attr_id, a.attr_name, a.attr_group, a.is_linked, a.attr_type, ".
"g.goods_attr_id, g.attr_value, g.attr_price " .
'FROM ' . $GLOBALS['ecs']->table('goods_attr') . ' AS g ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('attribute') . ' AS a ON a.attr_id = g.attr_id ' .
"WHERE g.goods_id = '$goods_id' " .
'ORDER BY a.sort_order, g.attr_price, g.goods_attr_id';
将以上代码中的如下代码:
ORDER BY a.sort_order, g.attr_price, g.goods_attr_id
修过为如下代码:
ORDER BY g.goods_attr_id
这样就是以你的输入顺序来显示了。