修改后的效果截图
修改步骤
1.打开ECSHOP网店根目录user.php文件,找到如下代码
/* 订单 支付 配送 状态语言项 */ $order['order_status'] = $_LANG['os'][$order['order_status']];
以上代码的上面加上如下代码
/* 取得区域名 */ $sql = "SELECT concat(IFNULL(c.region_name, ''), ' ', IFNULL(p.region_name, ''), " . "' ', IFNULL(t.region_name, ''), ' ', IFNULL(d.region_name, '')) AS region " . "FROM " . $GLOBALS['ecs']->table('order_info') . " AS o " . "LEFT JOIN " . $GLOBALS['ecs']->table('region') . " AS c ON o.country = c.region_id " . "LEFT JOIN " . $GLOBALS['ecs']->table('region') . " AS p ON o.province = p.region_id " . "LEFT JOIN " . $GLOBALS['ecs']->table('region') . " AS t ON o.city = t.region_id " . "LEFT JOIN " . $GLOBALS['ecs']->table('region') . " AS d ON o.district = d.region_id " . "WHERE o.order_id = '$order[order_id]'"; $res = $GLOBALS['db']->getRow($sql); $smarty->assign('region', $res['region']);
2.打开ECSHOP模板目录user_transaction.dwt文件,找到如下代码
{$order.address}
将以上代码改成如下代码
{$region} {$order.address}
继续找到如下代码
<input name="address" type="text" class="inputBg" value="{$order.address|escape} " size="25" />
将以上代码改成如下代码
{$region}<input name="address" type="text" class="inputBg" value="{$order.address|escape} " size="25" />
暂无评论,来发表一个吧