找到ecshop文件,打开所在的goods.dwt模板,搜索购物那个按钮(提示:图片另存就知道文件名),之后看到以下代码
<li id="itemBtnList" class="item_img">
<a href="javascript:addToCart({$goods.goods_id})"><img src="images/add_cart.gif" alt="" /></a>
<a href="javascript:collect({$goods.goods_id})"><img src="images/collect.gif" alt="加入收藏" /></a>
修改成一下代码就可以了:
<li id="itemBtnList" class="item_img">
<!-- {if $goods.goods_number neq 0} -->
<a href="javascript:addToCart({$goods.goods_id})"><img src="images/add_cart.gif" alt="" /></a>
<!-- {else} -->
<img src="images/wuhuo.gif" alt="库存暂时无货,等有货再购买,谢谢" />
<!-- {/if} -->
<a href="javascript:collect({$goods.goods_id})"><img src="images/collect.gif" alt="加入收藏" /></a>
这个wuhuo.gif自己做个,放到images文件夹,如果想增加缺货登记,那么,再wuhuo.gif所在的位置增加一个连接
<a href="user.php?act=add_booking&id={$goods.goods_id}"><img src="images/wuhuo.gif" alt="库存暂时无货,等有货再购买,谢谢" />
</a>
|