1th Step: Modify the goods.php file
Find the following code
$prev _gid = $db->getone ("SELECT goods_id from". $ecs->table ('Goods')."WHERE cat_id=". $goods ['cat_id'] ."> goods_id". $goods ['goods_id'] ."and Is_on_sale = 1 and Is_alone_sale = 1 and is_delete = 0 LIMIT 1"); if(!empty ($prev _gid)) {$prev _good['URL'] = Build_uri ('Goods', Array ('GID'= = $prev _gid), $goods ['Goods_name']); $smarty->assign ('Prev_good', $prev _good);//Previous Item} $next _gid= $db->getone ("SELECT Max (goods_id) from". $ecs->table ('Goods') ."WHERE cat_id=". $goods ['cat_id']."< goods_id". $goods ['goods_id'] ."and Is_on_sale = 1 and Is_alone_sale = 1 and is_delete = 0"); if(!empty ($next _gid)) {$next _good['URL'] = Build_uri ('Goods', Array ('GID'= = $next _gid), $goods ['Goods_name']); $smarty->assign ('Next_good', $next _good);//Next Product}
Then modify it to the following code (note the red part)
$prev _gid = $dbGetRow("SELECT goods_id,goods_name from". $ecs->table ('Goods')."WHERE cat_id=". $goods ['cat_id'] ."> goods_id". $goods ['goods_id'] ."and Is_on_sale = 1 and Is_alone_sale = 1 and is_delete = 0 LIMIT 1"); if(!empty ($prev _gid)) {$prev _good['URL'] = Build_uri ('Goods', Array ('GID'=$prev _gid[' goods_id '), $goods [' Goods_name ']); $prev _good[ ' goods_name '] = $prev _gid[' goods_name ']; $smarty->assign ('Prev_good', $prev _good);//Previous Item} $next _gid= $dbGetRow("SELECT goods_id,goods_name from". $ecs->table ('Goods') ."WHERE cat_id=". $goods ['cat_id']."< goods_id". $goods ['goods_id'] ."and Is_on_sale = 1 and Is_alone_sale = 1 and Is_delete = 0 ORDER BY goods_id desc LIMIT 1"); if(!empty ($next _gid)) {$next _good['URL'] = Build_uri ('Goods', Array ('GID'= $next _gid['goods_id']), $goods ['Goods_name']); $next _good[ ' goods_name '] = $next _gid[' goods_name ']; $smarty->assign ('Next_good', $next _good);//Next Product}
2nd Step: Modify the template file/themes/default/goods.dwt
Will
<a href="{$prev _good.url}"><img alt="prev " src= " ./images/up.gif " /></a>
Modified to:
<a href="{$prev _good.url}">{$prev _good.goods_name}"</a >
Then the
<a href="{$next _good.url}"><img alt="next" src= " ./images/down.gif " /></a>
Revision changed to
<a href="{$next _good.url}">{$next _good.goods_name}"</a >
Ecshop Tutorial Product Page _ Change the previous next picture to the product name