Ecshop购物流程 checkout(结算)步骤,不显示商品缩略图;购物是否显示商品缩略图,后台商店设置可以控制。
稍稍改造一下,可以让checkout(结算)步骤,显示商品缩略图。
1、修改include/lib_order.php库文件中的cart_goods()函数。 请做好备份喔!
03
|
* @param int $type 类型:默认普通商品
|
04
|
* @return array 购物车商品数组
|
06
|
function cart_goods($type = CART_GENERAL_GOODS)
|
08
|
$sql = "SELECT rec_id, user_id, goods_id, goods_name, goods_sn, goods_number, " .
|
09
|
"market_price, goods_price, goods_attr, is_real, extension_code, parent_id, is_gift, is_shipping, " .
|
10
|
"goods_price * goods_number AS subtotal " .
|
11
|
"FROM " . $GLOBALS['ecs']->table('cart') .
|
12
|
" WHERE session_id = '" . SESS_ID . "' " .
|
13
|
"AND rec_type = '$type'";
|
15
|
$arr = $GLOBALS['db']->getAll($sql);
|
18
|
foreach ($arr as $key => $value)
|
20
|
/* LONGHTML 增加是否在购物车里显示商品图 */
|
21
|
if (($GLOBALS['_CFG']['show_goods_in_cart'] == "2" || $GLOBALS['_CFG']['show_goods_in_cart'] == "3") && $row['extension_code'] != 'package_buy')
|
23
|
$goods_thumb = $GLOBALS['db']->getOne("SELECT `goods_thumb` FROM " .$GLOBALS['ecs']->table('goods') . " WHERE `goods_id`=".$arr[$key]['goods_id']);
|
24
|
$arr[$key]['goods_thumb'] = get_image_path($arr[$key]['goods_id'], $goods_thumb, true);
|
27
|
$arr[$key]['formated_market_price'] = price_format($value['market_price'], false);
|
28
|
$arr[$key]['formated_goods_price'] = price_format($value['goods_price'], false);
|
29
|
$arr[$key]['formated_subtotal'] = price_format($value['subtotal'], false);
|
31
|
if ($value['extension_code'] == 'package_buy')
|
33
|
$arr[$key]['package_goods_list'] = get_package_goods($value['goods_id']);
|
2、修改themes/XXX/flow.dwt文件; “XXX”为所选择的模板主题。 请做好备份喔!
01
|
<!-- {if $step eq "checkout"} 开始订单确认界面 -->
|
02
|
<form action="flow.php" method="post" name="theForm" id="theForm" onsubmit="return checkOrderForm(this)">
|
03
|
<script type="text/javascript">
|
04
|
var flow_no_payment = "{$lang.flow_no_payment}";
|
05
|
var flow_no_shipping = "{$lang.flow_no_shipping}";
|
08
|
<h6><span>{$lang.goods_list}</span><!--{if $allow_edit_cart} --><a href="flow.php" class="f6">{$lang.modify}</a><!--{/if} --></h6>
|
09
|
<table width="99%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
|
11
|
<th bgcolor="#ffffff">商品图片</th>
|
12
|
<th bgcolor="#ffffff">{$lang.goods_name}</th>
|
13
|
<th bgcolor="#ffffff">{$lang.goods_attr}</th>
|
14
|
<!-- {if $show_marketprice} -->
|
15
|
<th bgcolor="#ffffff">{$lang.market_prices}</th>
|
17
|
<th bgcolor="#ffffff">{if $gb_deposit}{$lang.deposit}{else}{$lang.shop_prices}{/if}</th>
|
18
|
<th bgcolor="#ffffff">{$lang.number}</th>
|
19
|
<th bgcolor="#ffffff">{$lang.subtotal}</th>
|
21
|
<!-- {foreach from=$goods_list item=goods} -->
|
23
|
<td bgcolor="#ffffff" align="center"><img style="width:60px; border:1px solid #e3e3e3" src="{$goods.goods_thumb}" border="1" title="{$goods.goods_name|escape:html}"/></td>
|
24
|
<td bgcolor="#ffffff">
|
25
|
<!-- {if $goods.goods_id gt 0 && $goods.extension_code eq 'package_buy'} -->
|
26
|
<a href="javascript:void(0)" onclick="setSuitShow({$goods.goods_id})" class="f6">{$goods.goods_name}<span style="color:#FF0000;">({$lang.remark_package})</span></a>
|
27
|
<div id="suit_{$goods.goods_id}" style="display:none">
|
28
|
<!-- {foreach from=$goods.package_goods_list item=package_goods_list} -->
|
29
|
<a href="goods.php?id={$package_goods_list.goods_id}" target="_blank" class="f6">{$package_goods_list.goods_name}</a><br />
|
33
|
<a href="goods.php?id={$goods.goods_id}" target="_blank" class="f6">{$goods.goods_name}</a>
|
34
|
<!-- {if $goods.parent_id > 0} -->
|
35
|
<span style="color:#FF0000">({$lang.accessories})</span>
|
36
|
<!-- {elseif $goods.is_gift} -->
|
37
|
<span style="color:#FF0000">({$lang.largess})</span>
|
40
|
<!-- {if $goods.is_shipping} -->(<span style="color:#FF0000">{$lang.free_goods}</span>)<!-- {/if} -->
|
42
|
<td bgcolor="#ffffff">{$goods.goods_attr|nl2br}</td>
|
43
|
<!-- {if $show_marketprice} -->
|
44
|
<td align="right" bgcolor="#ffffff">{$goods.formated_market_price}</td>
|
46
|
<td bgcolor="#ffffff" align="right">{$goods.formated_goods_price}</td>
|
47
|
<td bgcolor="#ffffff" align="right">{$goods.goods_number}</td>
|
48
|
<td bgcolor="#ffffff" align="right">{$goods.formated_subtotal}</td>
|
51
|
<!-- {if !$gb_deposit} 团购且有保证金时不显示 -->
|
53
|
<td bgcolor="#ffffff" colspan="7">
|
54
|
<!-- {if $discount gt 0} -->{$your_discount}<br /><!-- {/if} -->
|
55
|
{$shopping_money}<!-- {if $show_marketprice} -->,{$market_price_desc}<!--{/if}-->
|
3、后台,清除缓存。 刷新一下页面。