zen cart前台历史订单中显示图片的通用代码


1、找到(23行)
代碼: 全選
<th scope="col" id="myAccountQuantity"><?php echo HEADING_QUANTITY; ?></th>

在前面加一行:
代碼: 全選
<th scope="col" id="myAccountQuantity"><?php echo HEADING_PRODUCTS_IMAGE; ?></th>


2、找到(加過一行後,現在的36行)
代碼: 全選
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

後面加二行:
代碼: 全選
$img_temp_arr=array();
$img_temp_arr=explode(',',uuant_get_products_image($order->products[$i]['id']));


3、找到(加過三行後,現在的41行)
代碼: 全選
<td class="accountQuantityDisplay"><?php echo $order->products[$i]['qty'] . QUANTITY_SUFFIX; ?></td>
前面加一行:
代碼: 全選
<td class="accountQuantityDisplay"><?php echo uuant_info_image($img_temp_arr[0], $order->products[$i]['name'], 50, 50); ?></td>


保存!

以上方案需要在語言文件中定義“HEADING_PRODUCTS_IMAGE”!

爲查看商品的需要,可将訂單商品鏈接到商品,在商品名稱$order->products[$i]['name']前後加上以下代碼:
代碼: 全選
'<a href="'.zen_href_link(FILENAME_PRODUCT_INFO,'products_id='.$order->products[$i]['id']).'">'.$order->products[$i]['name'].'</a>';


注意需要增加文件includes/functions/extra_functions/order_showing_images.php支持,請下載!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值