請問 奪寶奇兵 如何將縮圖置換成大圖呢?
2016-07-07 16:23 来源:www.chinab4c.com 作者:ecshop专家
最近再改樣版碰到一個問題,特來請教高手! 奪寶奇兵 商品圖片 是秀 產品縮圖,想把他換成 大一點的圖,於是將 $goods.goods_thumb 改成 $goods.goods_img 結果,圖片找不到?修改的方式如下: 原始: <img src="{$goods.goods_thumb}" alt="{$goods.goods_name|escape:html}" class="thumb" /> 改成: <img src="{$goods.goods_img}" alt="{$goods.goods_name|escape:html}" class="thumb" /> 請高手指正!感謝了! |
回答:
自己推喔!沒人知道嗎?這下頭暈了! |
還是沒人喔!哀!這問題問的太差了嗎?真是太沒人緣了.... |
snatch.php页面中把 /** * 取得当前活动信息 * * @accesspublic * * @return 活动名称 */ function get_snatch($id) { $sql = "SELECT g.goods_id, g.goods_sn, g.is_real, g.goods_name, g.extension_code, g.market_price, g.shop_price AS org_price, " . "IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, " . "g.promote_price, g.promote_start_date, g.promote_end_date, g.goods_brief, g.goods_thumb, " . "ga.act_name AS snatch_name, ga.start_time, ga.end_time, ga.ext_info, ga.act_desc AS `desc` ". "FROM " .$GLOBALS['ecs']->table('goods_activity'). " AS ga " . "LEFT JOIN " . $GLOBALS['ecs']->table('goods')." AS g " . "ON g.goods_id = ga.goods_id " . "LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp " . "ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' " . "WHERE ga.act_id = '$id' AND g.is_delete = 0"; $goods = $GLOBALS['db']->GetRow($sql); if ($goods) { $promote_price = bargain_price($goods['promote_price'], $goods['promote_start_date'], $goods['promote_end_date']); $goods['formated_market_price']= price_format($goods['market_price']); $goods['formated_shop_price'] = price_format($goods['shop_price']); $goods['formated_promote_price'] = ($promote_price > 0) ? price_format($promote_price) : ''; $goods['goods_thumb']= get_image_path($goods['goods_id'], $goods['goods_thumb'], true); $goods['url']= build_uri('goods', array('gid'=>$goods['goods_id']), $goods['goods_name']); $goods['start_time'] = local_date($GLOBALS['_CFG']['time_format'], $goods['start_time']); $info = unserialize($goods['ext_info']); if ($info) { foreach ($info as $key => $val) { $goods[$key] = $val; } $goods['is_end'] = gmtime() > $goods['end_time']; $goods['formated_start_price'] = price_format($goods['start_price']); $goods['formated_end_price'] = price_format($goods['end_price']); $goods['formated_max_price'] = price_format($goods['max_price']); } /* 将结束日期格式化为格林威治标准时间时间戳 */ $goods['gmt_end_time']= $goods['end_time']; $goods['end_time']= local_date($GLOBALS['_CFG']['time_format'], $goods['end_time']); $goods['snatch_time']= sprintf($GLOBALS['_LANG']['snatch_start_time'], $goods['start_time'], $goods['end_time']); return $goods; } else { return false; } } 改为 /** * 取得当前活动信息 * * @accesspublic * * @return 活动名称 */ function get_snatch($id) { $sql = "SELECT g.goods_id, g.goods_sn, g.is_real, g.goods_name, g.extension_code, g.market_price, g.shop_price AS org_price, " . "IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, " . "g.promote_price, g.promote_start_date, g.promote_end_date, g.goods_brief, g.goods_img, " . "ga.act_name AS snatch_name, ga.start_time, ga.end_time, ga.ext_info, ga.act_desc AS `desc` ". "FROM " .$GLOBALS['ecs']->table('goods_activity'). " AS ga " . "LEFT JOIN " . $GLOBALS['ecs']->table('goods')." AS g " . "ON g.goods_id = ga.goods_id " . "LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp " . "ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' " . "WHERE ga.act_id = '$id' AND g.is_delete = 0"; $goods = $GLOBALS['db']->GetRow($sql); if ($goods) { $promote_price = bargain_price($goods['promote_price'], $goods['promote_start_date'], $goods['promote_end_date']); $goods['formated_market_price']= price_format($goods['market_price']); $goods['formated_shop_price'] = price_format($goods['shop_price']); $goods['formated_promote_price'] = ($promote_price > 0) ? price_format($promote_price) : ''; $goods['goods_img']= get_image_path($goods['goods_id'], $goods['goods_img'], true); $goods['url']= build_uri('goods', array('gid'=>$goods['goods_id']), $goods['goods_name']); $goods['start_time'] = local_date($GLOBALS['_CFG']['time_format'], $goods['start_time']); $info = unserialize($goods['ext_info']); if ($info) { foreach ($info as $key => $val) { $goods[$key] = $val; } $goods['is_end'] = gmtime() > $goods['end_time']; $goods['formated_start_price'] = price_format($goods['start_price']); $goods['formated_end_price'] = price_format($goods['end_price']); $goods['formated_max_price'] = price_format($goods['max_price']); } /* 将结束日期格式化为格林威治标准时间时间戳 */ $goods['gmt_end_time']= $goods['end_time']; $goods['end_time']= local_date($GLOBALS['_CFG']['time_format'], $goods['end_time']); $goods['snatch_time']= sprintf($GLOBALS['_LANG']['snatch_start_time'], $goods['start_time'], $goods['end_time']); return $goods; } else { return false; } } |
/** 说明: snatch.php 只需在原来的函数中增加红色部分代码 |
难怪了!没有人愿意讲,还要改到官方的程式喔! 真的太感谢了!试用看看喔! |
最近更新
常用插件
- ecshop没登陆情况下订单查
ecshop没登陆情况下订单查询插件,主要是针对ecshop在没有登陆的情况下...
- ecshop注册审核插件
ecshop插件介绍:ecshop会员注册审核插件,主要是在前台提供给注册的时候...
- ecshop的oss插件
ecshop的oss插件免费共享了,oss,ecshoposs...
- ecshop订单聚合插件
ecshop订单聚合插件,主要是为了方便ecshop中订单产品到货情况的分析和...
- ecshop虚拟发货插件
ecshop虚拟发货插件介绍: ecshop虚拟发货插件,主要为了通过后台手动录...
ecshop热门问答
ecshop热门资料
ecshopFree
ecshop登出
ecshop959
ecshop温度
ecshop地理
ecshop美化
ecshopwestern
ecmall函数手册
ecshop鸡肋
ecshop进出
ecshop分页的页数怎么改啊
ecshop内存
ecshop好好的
ecshop商品重量
ecshop增加必填信息
ecshop品牌列表
ecshopXSS
ecshop一窍不通
ecshop底部广告
ecshop分页
ecshop签订
ecshop登陆
ecshop拍砖
ecshop导航站
ecshop时尚安全套
ecshop滑块
ecshop筛选
ecshopE淘
ecshop联盟
ecshop下载链接