您现在的位置是:首页 > 教程 > ecshop商城教程ecshop商城教程

ecshop商品页显示供货商名称的方法

半梦2023-12-12 19:20:37ecshop商城教程已有人查阅

导读goods.php查找:在他上方加上下面这句话:goods.dwt:想要显示位置加上:

goods.php查找:
$smarty->assign('goods', $goods);
在他上方加上下面这句话:
if($goods['suppliers_id'])
{
$goods['suppliers_name']=$db->getOne("select suppliers_name from "
.$ecs->table('suppliers')." where suppliers_id=".$goods['suppliers_id']);
$goods['suppliers_desc']=$db->getOne("select suppliers_desc from "
.$ecs->table('suppliers')." where suppliers_id=".$goods['suppliers_id']);
}
goods.dwt:想要显示位置加上:
<!--{if $goods.suppliers_name } 供货商-->
<li class="padd" >
<strong>供货商:</strong><font color="#cc0000">{$goods.suppliers_name}</font>
<!--{/if}-->

本文标签:

很赞哦! ()

留言与评论 (共有 条评论)
验证码:

本栏推荐

相关标签