ecshop报价单显示商品图片

2010-08-09 15:20 来源:www.chinab4c.com 作者:admin

     ecshop系统给前台用户,提供了一个很好的ecshop报价单显示。在这里你可以通过分类和品牌筛选,也可以通过按扭直接打印所有商品的报价单

1:quotation.php

$sql = "SELECT g.goods_id, g.goods_thumb,g.goods_name, g.shop_price, g.goods_number, c.cat_name AS goods_category".
    " FROM " . $ecs->table('goods') . " AS g LEFT JOIN " . $ecs->table('category') . " AS c ON g.cat_id = c.cat_id " . $where . " AND is_on_sale = 1 AND is_alone_sale = 1";
    $goods_list = $db->getAll($sql);  $goods_list = $db->getAll($sql);
 if($goods_list){
  foreach($goods_list as  $k => $v){
   $goods_list[$k]['thumb'] =   get_image_path($v['goods_id'], $v['goods_thumb'],true);
   
  }
 }

2:data/quotation_print.html
<th>图片地址</th><td style="text-align:center"><a href=goods.php?id={$goods.goods_id} target='_blank'><img src="{$goods.thumb}" border=0 width=50 height=50></a></td>

来源:http://www.chinab4c.com