在ECSHOP用戶中心的訂單詳情頁,用戶可以查看自己的訂單,但是沒有縮略圖,可能用戶忘記了自己購買的產(chǎn)品了,那么這里如何想商品列表頁那樣顯示縮略圖呢?
修改 includes/lib_order.php ,找到 order_goods 函數(shù)部分,大概在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'";
修改 user_transaction.dwt 文件在
{$lang.goods_attr}
上面增加一行代碼
縮略圖
緊接著在
{$goods.goods_attr|nl2br}
上面增加一行代碼文章來源:http://www.zghlxwxcb.cn/news/detail-414761.html
這樣應(yīng)該就可以了,以上第2步修改(模板修改)是在官方默認(rèn)模板下進(jìn)行的,如果您使用的是其他模板,請對照著添加即可!文章來源地址http://www.zghlxwxcb.cn/news/detail-414761.html
到了這里,關(guān)于ECSHOP用戶中心的訂單詳情頁顯示商品縮略圖的方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!