FWQ
ecshop产品页面调用商品属性某一值(本站产品演
1.定义函数: function get_attr_value($goods_id,$attr_id) { $sql=”select attr_value from “.$GLOBALS[‘ecs’]->table(‘goods_attr’).” where goods_id=’$goods_id’ and attr_id=’$attr_id'”; $re= $GLOBALS[‘db’]->getOne($sql); if(!empty($re)) { return $re; } else { return false; } } 2.修改goods.php,153行 …