使用此代码,我想在prestashop后台打印带有某些字段的选项卡。但是我收到一条错误消息::'order子句'
中的未知列'a.id_configuration' <?php
public function __construct()
{
parent::__construct();
$this->table = 'order_invoice'; // SQL table name, will be prefixed with _DB_PREFIX_
$this->className = 'OrderInvoice'; // PHP class name
$this->allow_export = true; // allow export in CSV, XLS..
$this->fields_list = [
'id_order_invoice' => ['title' => $this->trans('ID', [], 'Admin.Global'),'class' => 'fixed-width-xs'],
'number' => ['title' => $this->trans('Number', [], 'Admin.Global'),'class' => 'fixed-width-xs'],
'date_add' => ['title' => $this->trans('Date', [], 'Admin.Global'), 'type'=>'datetime'],
'total_products_wt' => ['title' => $this->trans('Total products', [], 'Admin.Global'),
'align' => 'text-right',
'type' => 'price',
],
'total_shipping_tax_incl' => ['title' => $this->trans('Total shipping', [], 'Admin.Global'),
'align' => 'text-right',
'type' => 'price',
],
'total_paid_tax_incl' => ['title' => $this->trans('Total paid', [], 'Admin.Global'),
'align' => 'text-right',
'type' => 'price',
],
];
}
?>
```
答案 0 :(得分:1)
由于它声明order子句(ORDER BY
中存在错误,因此我们将像这样编辑orderBy
变量:
$this->_orderBy = 'id_order_invoice';
您还可以编辑标识符,因为它似乎使用了错误的标识符开头:
$this->identifier = 'id_order_invoice';
希望这会有所帮助。