使用者中心 >> 我的訂單 >> 檢視訂單詳細,要如何加入商品縮圖呢??
1、修改 includes/lib_order.php ,找到 order_goods 函式部分,大概在467行左右
將
$sql
= "SELECT rec_id, goods_id, goods_name, goods_sn, market_price,
goods_number, " ."goods_price, goods_attr, is_real, parent_id, is_gift, "
."goods_price * goods_number AS subtotal, extension_code " ."FROM " .
$GLOBALS['ecs']->table('order_goods') ." WHERE order_id =
'$order_id'";
替換為
$sql = "SELECT og.rec_id, og.goods_id,
og.goods_name, og.goods_sn, og.market_price, og.goods_number, "
."og.goods_price, og.goods_attr, og.is_real, og.parent_id, og.is_gift, "
."og.goods_price * og.goods_number AS subtotal,
og.extension_code,g.goods_thumb " . "FROM " .
$GLOBALS['ecs']->table('order_goods') . " AS og "." LEFT JOIN ".
$GLOBALS['ecs']->table('goods') . " AS g on og.goods_id=g.goods_id "
." WHERE order_id = '$order_id'";
2、修改 user_transaction.dwt 檔案,
在
{$lang.goods_attr}
上面增加一行程式碼
縮圖
緊接著在
{$goods.goods_attr nl2br}
上面增加一行程式碼
3、這樣應該就可以了,以上第2步修改(模板修改)是在官方預設模板下進行的,如果您使用的是其他模板,請對照著新增即可