我不建議你直接編輯訂單
你可以用顧客會員帳戶登入前台 (免顧客密碼)
用顧客帳戶幫他建立一張新訂單
而不是改他的訂單
如果你還是需要後台直接改訂單
opencart 後台修改訂單的時候會去跑 api
修改這兩個 php
public_html/catalog/controller/api/shipping.php
public_html/catalog/controller/api/payment.php
把你不要驗證的欄位拿掉
不知道怎麼改可以請 AI 代勞
if ((utf8_strlen(trim($this->request->post['firstname'])) < 1) || (utf8_strlen(trim($this->request->post['firstname'])) > 32)) {
$json['error']['firstname'] = $this->language->get('error_firstname');
}
if ((utf8_strlen(trim($this->request->post['lastname'])) < 1) || (utf8_strlen(trim($this->request->post['lastname'])) > 32)) {
$json['error']['lastname'] = $this->language->get('error_lastname');
}
if ((utf8_strlen(trim($this->request->post['address_1'])) < 3) || (utf8_strlen(trim($this->request->post['address_1'])) > 128)) {
$json['error']['address_1'] = $this->language->get('error_address_1');
}
這是廣告
OpenCart 安裝不用學
從版型到模組,我免費幫你裝
立即加我 LINE 好友 👇
https://linlihsin.com/line