错误消息:“订单子句”中的未知列“ a.id_configuration”

时间:2019-06-27 23:02:46

标签: prestashop

使用此代码,我想在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',
          ],
        ];

      }

          ?>
```

1 个答案:

答案 0 :(得分:1)

由于它声明order子句(ORDER BY中存在错误,因此我们将像这样编辑orderBy变量:

$this->_orderBy = 'id_order_invoice';

您还可以编辑标识符,因为它似乎使用了错误的标识符开头:

$this->identifier = 'id_order_invoice';

希望这会有所帮助。