1、在goods.php中找到以下代码

$smarty->display('goods.dwt',      $cache_id);

改为下面的代码

switch ($goods['cat_id']){
case 1:
$smarty->display('goods1.dwt', $cache_id);
break;
case 2:
$smarty->display('goods2.dwt', $cache_id);
break;
case 3:
$smarty->display('goods3.dwt', $cache_id);
break;
case 4:
$smarty->display('goods4.dwt', $cache_id);
break;
default:
$smarty->display('goods.dwt', $cache_id);
break;
}

这里的goods1.dwt后面的1应该是分类商品的id未测试

05-08 08:12