Сообщение об ошибке: неизвестный столбец «a.id_configuration» в «заказе» - PullRequest
0 голосов
/ 28 июня 2019

С этим кодом я хотел бы напечатать вкладку с некоторыми полями в бэк-офисе prestashop. Но я получил сообщение об ошибке:: неизвестный столбец «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 Ответ

1 голос
/ 09 июля 2019

Поскольку указывается, что это ошибка в предложении порядка (ORDER BY), мы бы отредактировали переменную orderBy следующим образом:

$this->_orderBy = 'id_order_invoice';

Вы также можете отредактировать идентификатор, поскольку он, кажется, использует неправильный идентификатор для начала:

$this->identifier = 'id_order_invoice';

Надеюсь, это поможет.

...