ecshop {insert name='cart_info'}修改位置
更新时间:2013-03-05 点击量:8192
{insert name='cart_info'}是调用的函数,函数位置在 includes/lib_insert.php 文件里的 insert_cart_info 函数部分
找到文件及函数,能够看到如下内容:
[代码]php代码:
/** * 调用购物车信息 * * @access public * @return string */ function insert_cart_info() { $sql = 'SELECT SUM(goods_number) AS number, SUM(goods_price * goods_number) AS amount' . ' FROM ' . $GLOBALS['ecs']->table('cart') . " WHERE session_id = '" . SESS_ID . "' AND rec_type = '" . CART_GENERAL_GOODS . "'"; $row = $GLOBALS['db']->GetRow($sql); if ($row) { $number = intval($row['number']); $amount = floatval($row['amount']); } else { $number = 0; $amount = 0; } $str = sprintf($GLOBALS['_LANG']['cart_info'], $number, price_format($amount, false)); return '<a href="flow.php" title="' . $GLOBALS['_LANG']['view_cart'] . '" >' . $str . '</a>'; }
其文字修改对应的语句是: return '<a href="flow.php" title="' . $GLOBALS['_LANG']['view_cart'] . '" >' . $str . '</a>';
修改为自己需要的即可。
如果文章对您有帮助,就打赏一个吧