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 武汉岩海低应变分析软件,导数据库里不显示波形图
  • ¥15 CreateBitmapFromWicBitmap内存释放问题。
  • ¥30 win c++ socket
  • ¥30 CanMv K210开发板实现功能
  • ¥15 C# datagridview 栏位进度
  • ¥15 vue3页面el-table页面数据过多
  • ¥100 vue3中融入gRPC-web
  • ¥15 kali环境运行volatility分析android内存文件,缺profile
  • ¥15 写uniapp时遇到的问题
  • ¥15 vs 2008 安装遇到问题