opencart - 如何在管理员 opencart 3 中创建自定义页面
问题描述
我正在尝试在 opencart 管理部分下创建一个自定义管理页面。但是由于任何原因它不起作用,任何人都可以帮忙吗?
我在 admin/controller/catalog/filterproducts.php 下创建了控制器文件,代码是:
<?php
class ControllerCatalogFilterProducts extends Controller {
public function index() {
$this->load->language('catalog/filterproducts');
$data['heading_title'] = $this->language->get('heading_title');
return $this->load->view('catalog/filter_products.tpl', $data);
}
}
在 admin/view/template/catalog/filter_products.tpl 我有如下代码:
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-users"></i> <?php echo $heading_title; ?></h3>
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<td class="text-right">SrNo</td>
<td>Product Name</td>
<td>Quantity</td>
<td>Price</td>
</tr>
</thead>
<tbody>
<tr>
<td class="text-right">1</td>
<td>Test Product</td>
<td>1</td>
<td>$1.00</td>
</tr>
</tbody>
</table>
</div>
</div>
以及我在 admin/language/en-gb/catalog/filterproducts.php 中的最后一个文件,其中包含代码:
<?php
// Heading
$_['heading_title'] = 'Filter Products';
解决方案
推荐阅读
- ios - CVCalendar - 更改圆形背景颜色
- python - 从 CSV 创建一个新列表
- excel - VBA Excel 创建带有时间戳的运行列表
- reactjs - 绑定 ListView 时出错
- c++ - 结构时间;与 tm 时间 = {}。输出相同但不一样?
- javascript - Ajax 调用返回 HTML 页面作为响应而不是呈现页面(Rails)
- python - Pandas 使用 Group By 和当前行日期之前扩展平均值
- r - 基于另一个数据集复制粘贴行
- vim - 代码中的 Vim 拼写检查
- javascript - 查询外部 django 视图时如何刷新部分 DOM HTML