菜单

echsop购物车、订单提交详细页商品缩略图

2014-10-30 - Developer

ecshop不提供商品缩略图展示功能,

找到include/lib_order.php库文件中的cart_goods()函数

在其中添加红色部分

foreach ($arr as $key => $value)
{
    /* LONGHTML 增加是否在购物车里显示商品图 */
    if (($GLOBALS[‘_CFG’][‘show_goods_in_cart’] == “2” || $GLOBALS[‘_CFG’][‘show_goods_in_cart’] == “3”) && $row[‘extension_code’] != ‘package_buy’)
     {
        $goods_thumb = $GLOBALS[‘db’]->getOne(“SELECT `goods_thumb` FROM ” . $GLOBALS[‘ecs’]->table(‘goods’) . ” WHERE `goods_id`=”.$arr[$key][‘goods_id’]);
          $arr[$key][‘goods_thumb’] = get_image_path($arr[$key][‘goods_id’], $goods_thumb, true);
       } // END

$arr[$key][‘formated_market_price’] = price_format($value[‘market_price’], false);
$arr[$key][‘formated_goods_price’]  = price_format($value[‘goods_price’], false);
$arr[$key][‘formated_subtotal’]     = price_format($value[‘subtotal’], false);

if ($value[‘extension_code’] == ‘package_buy’)
{
$arr[$key][‘package_goods_list’] = get_package_goods($value[‘goods_id’]);
}
}

修改修改themes/defalut/flow.dwt文件

中找到67行左右在{$goods.goods_name}前添加<img width=”100″ height=”100″ src=”{$goods.goods_thumb}” border=”0″ />购物车显示缩略图
中找到564行左右在{$goods.goods_name}前添加<img width=”100″ height=”100″ src=”{$goods.goods_thumb}” border=”0″ />订单提交页面显示缩略图

转载请注明: 转载自—艾瑞可erik

本文链接地址: http://erik.xyz/239.html

标签:,

发表评论