ecshop商品类型标记价格后前台展示凌乱的解决方法

修改之前的展现形式:



修改方法,找到文件:includes/lib_goods.php

找到这个方法:

function get_goods_properties

将里面的这句话:

[代码]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';

修改为:

[代码]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.goods_attr_id';

修改完成后,清理缓存,刷新页面即可看到效果。







一次赞助,终身免费~
欢迎来咨询哦 欢迎来咨询哦