OpenCart v. 1.4.9.3 を使用しており、ステップ 2 をスキップしようとしています ->
index.php?route=checkout/guest_step_2
コントローラを変更する必要がありますか?
p/s: この opencart は、お問い合わせを送信するためのもので、支払いやコメントは必要ありません。すべてのステップを最小限に抑えようとしています。
OpenCart v. 1.4.9.3 を使用しており、ステップ 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]];
}