1.打开goods.php 在最后面插入:
~~~
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.在大概153行左右的
`
$goods = get_goods_info($goods_id);
`
下面插入
~~~
$example_url=get_attr_value($goods_id,182);
$goods['attr_value']=$example_url;
~~~
注意:182为后台的商品属性的ID值
3.在goods.dwt 相应的位置加上即可
例如:
~~~
<li class="clearfix">
<dd>
<strong>操作系统:</strong><font class="shop" id="ECS_SHOPPRICE"> {$goods.attr_value}</font><br />
</dd>
</li>
~~~