0
我使用Opencart的v 1.4.9.3我試圖跳過第2步 - >Opencart的 - 跳過步驟2
index.php?route=checkout/guest_step_2
我是否需要修改控制器?
p/s:這個opencart只是爲了發送查詢不需要付款或評論,我儘量減少所有步驟。
我使用Opencart的v 1.4.9.3我試圖跳過第2步 - >Opencart的 - 跳過步驟2
index.php?route=checkout/guest_step_2
我是否需要修改控制器?
p/s:這個opencart只是爲了發送查詢不需要付款或評論,我儘量減少所有步驟。
雖然可以跳過運費,但跳過付款完全是另一回事。您將不得不使用「付款交貨」之類的付款方式,然後在guest_step_2中設置會話付款類型。 這裏是爲後該頁面的代碼,所以你只需要刪除的帖子,並設置支付密碼(在交付方式現金,它的「鱈魚」) 所以
if (($this->request->server['REQUEST_METHOD'] == 'POST') && !isset($this->request->post['coupon']) && $this->validate()) {
if (isset($this->request->post['shipping_method'])) {
$shipping = explode('.', $this->request->post['shipping_method']);
$this->session->data['shipping_method'] = $this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]];
}
$this->session->data['payment_method'] = $this->session->data['payment_methods'][$this->request->post['payment_method']];
$this->session->data['comment'] = $this->request->post['comment'];
$this->redirect(HTTPS_SERVER . 'index.php?route=checkout/guest_step_3');
}
變得
if (isset($this->request->post['shipping_method'])) {
$shipping = explode('.', $this->request->post['shipping_method']);
$this->session->data['shipping_method'] = $this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]];
}
$this->session->data['payment_method'] = $this->session->data['payment_methods']['cod'];
$this->session->data['comment'] = ''; // Make comment empty
$this->redirect(HTTPS_SERVER . 'index.php?route=checkout/guest_step_3');
您還需要移動這此線以下
$this->session->data['payment_methods'] = $method_data;
注意這是隻是一個概念,我一直沒有機會來測試它爲你卜理論上它會起作用。你也可能也可以擺脫這一點的代碼,雖然我已經把它留在上面
if (isset($this->request->post['shipping_method'])) {
$shipping = explode('.', $this->request->post['shipping_method']);
$this->session->data['shipping_method'] = $this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]];
}
謝謝@Jay..so現在我們可以跳過這一步(步驟2) – ruslyrossi