Post by lnboy » Tue Apr 26, 2011 12:34 pm

Image

請問會員註冊表單中可以把"所在城市"刪除掉嗎?

因為 上面已有"地址"欄位 , 下面還有"地區"選單
這樣重複性太高~請問可以從哪個檔案把"所在城市"完全刪除掉? 謝謝

Newbie

Posts

Joined
Mon Apr 25, 2011 10:30 am

Post by ericli » Thu Apr 28, 2011 9:04 am

在catalog/ view/ theme /default /template /account/ create.tpl里面注释相应代码就行了
下面以城市(city)为例:
<tr>
<td><span class="required">*</span> <?php echo $entry_city; ?></td>
<td><input type="text" name="city" value="<?php echo $city; ?>" />
<?php if ($error_city) { ?>
<span class="error"><?php echo $error_city; ?></span>
<?php } ?></td>
</tr>

还要在catalog/controller/account/create.php文件里面找到与之对应的代码
如你想是要城市成为不是必填项目就把下面这段代码注释掉就行了
if ((strlen(utf8_decode($this->request->post['city'])) < 3) || (strlen(utf8_decode($this->request->post['city'])) > 128)) {
$this->error['city'] = $this->language->get('error_city');
}
不过最好是把有city的代码段都注释,这样不容易出问题

Newbie

Posts

Joined
Wed Apr 27, 2011 4:04 pm

Post by lnboy » Thu May 05, 2011 12:52 am

感谢您的教学~但试了您的方法 会显示
...Cannot modify header information - headers already sent by ...

我这几天不断尝试可能的作法~但都无法正确的完整移除掉!
这支程式真的好严密~ 真的完全不能让人更改吗??

我真的很期待看到opencart这只这么好的购物程式
地址注册表单可以弄简单一点~
(地址1,地址2,所在城市,邮递区号,所在国家,地区...) 多到让人害怕的空格

只要留(地址1,地址2,所在国家) 最好! 这样别人注册时才不会觉得累(懒)!
退却的机率可以大幅缩减!

不知可以帮忙改看看~~~?

Newbie

Posts

Joined
Mon Apr 25, 2011 10:30 am

Post by bj9421 » Wed May 25, 2011 5:52 pm

小弟有修改/catalog/ view/ theme /default /template /account/ create.tpl 目前是OK

要修改相關檔案是
/catalog/controller/account/create.php
/catalog/model/account/customer.php
把相關的欄位代碼消除才可以

但是我目前的問題是卡在
catalog/ view/ theme /default /template /account/ address.tpl
就是注冊完成要回去更新UPDATE 時會出現錯誤
大家有興趣可來試是解決看看
http://tuneup.com.tw/o1495o/

Newbie

Posts

Joined
Wed May 25, 2011 5:29 pm
Location - Taiwan

Post by loring » Fri Jun 10, 2011 1:59 am

這是個煩人的事情!要完全正常,我記得要修改的檔案超過10個以上(前後台),例如shipping頁和payment頁也有加入新地址的選項..........尤其國家和地區這兩個下拉式的資料牽一髮動全身,反正就是煩阿....耐心加細心才是王道 ;)

網路上有人發表過一個script,可以搜尋 "opencart 簡化" 應該可以幫你省下許多時間 :D

OpenCart 中文資源 Blog.Dnono.com


User avatar
New member

Posts

Joined
Mon Jul 26, 2010 2:21 pm

Who is online

Users browsing this forum: No registered users and 2 guests