close
我下載
http://freedom.funny.net.tw/opencart.2.2.0.0.tw
裡面的 OpenCart_2.2.0.0_TW_patch-2016-0411.zip
發現安裝後 .....會員的地址無法編輯
裝官網的 .... 2.2.0.0-compiled.zip 也一樣
apache error 有
error: syntax error, unexpected T_BOOLEAN_AND, expecting ')' in catalog/controller/account/address.php on line 522 改
到這是 bug..... https://forum.opencart.com/viewtopic.php?t=159242
將 catalog/controller/account/address.php 522 行 刪除改成
} elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation']) && $custom_field['location'] == 'address') && !filter_var($this->request->post['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
我將 firstname & lastname 改成 "姓名" 與 "別名"
當然 "別名" 可不填
grep -r 姓氏 * grep -r 大名 *
這樣就可以找到 "姓氏" ....將改成 "別名"
這樣就可以找到 "大名" ....將改成 "姓名"
(應該找到的是 /language/zh-TW 下面的 php)
找 control 資訊
grep -r lastname |grep utf8_strlen |grep -v "//"
找到檔名加上註解 ....不給予執行
// // if ((utf8_strlen(trim($this->request->post['lastname'])) < 1) || (utf8_strlen(trim($this->request->post['lastname'])) > 32)) { // $this->error['lastname'] = $this->language->get('error_lastname'); // }
找 view
grep -r input-lastname |grep control-label
找到檔名(都是 tpl 檔)
將 lastname 上面的 <div class="form-group required">
變成 <div class="form-group required">
就是將 required 拿掉
<div class="form-group"> <label class="col-sm-2 control-label" for="input-lastname"><?php echo $entry_lastname; ?></label>
全站熱搜