dsuoedtom207012191 2016-03-28 14:46
浏览 34
已采纳

在OpenCart 2中创建第二个(单独的)注册表单?

I know this has been asked once before but that question did not seem to have an answer within the thread. So I am posting a separate question.

Anyway so I am using OC version 2.1.0.2 . I need to create a second customer registration page which simple will ask them for a email address and password. (no other fields)

So I copied the below files

- catalog/controller/account/register.php
- catalog/model/account/customer.php
- template/account/register.tpl

I renamed the copied files to

- catalog/controller/account/registerb.php
- catalog/model/account/customerb.php
- template/account/registerb.tpl

I then edited the file in public_html/catalog/controller/account/registerb.php with the below to point to my new file

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/account/registerb.tpl')) {
        $this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/account/registerb.tpl', $data));
    } else {
        $this->response->setOutput($this->load->view('default/template/account/registerb.tpl', $data));
    }

I then go to my newly created file at www.fake.com/index.php?route=account/registerb However I get a error code 500 in my google chrome and the page will not load.

So what am I missing?

  • 写回答

1条回答 默认 最新

  • dqd54099 2016-03-29 21:53
    关注

    The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site's server but the server could not be more specific on what the exact problem is.

    But I created files for you. At mine server it is working when i run like index.php?route=account/registerb then it is shown like the following images:

    Different Register Form

    Download code from following sites: Download code for separate register page in OpenCart eCommerce

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端