Jump to content
thirty bees forum

Recommended Posts

Posted

A must have for my shops.

A customer has a question about his order and only gives the invoice number.

First look for the customer, then look in his orders what he means. Search and check.

Better and faster search in the order list for the invoice number. Either integrated as an override or as a basiscode.

override/controllers/admin/ -> create new file "AdminOrdersController.php"

``` <?php

class AdminOrdersController extends AdminOrdersControllerCore
{
    public function __construct()
    {
        parent::__construct();

        $this->fields_list['invoice_number'] = array(
            'title' => $this->l('invoice'),
            'align' => 'text-center',
            'class' => 'fixed-width-xs'
        );
    }
}

``` 0_1514214318135_10.png0_1514214324275_11.png

  • 4 months later...
  • 4 weeks later...
Posted

<?php

class AdminOrdersController extends AdminOrdersControllerCore
{
    public function __construct()
    {
        parent::__construct();

        $this->fields_list['invoice_number'] = array(
            'title' => $this->l('invoice'),
            'align' => 'text-center',
            'class' => 'fixed-width-xs'

        $this->fields_list['postcode'] = array(
'title' => $this->l('Postcode'),
'align' => 'text-center',
'class' => 'fixed-width-xs'

); } }

And after adding this I see this message.

FatalErrorException in AdminOrdersController.php line 14: Parse Error: syntax error, unexpected '$this' (T_VARIABLE), expecting ')'

Posted

Your code is not correct... Try this: ``` <?php

class AdminOrdersController extends AdminOrdersControllerCore
{
    public function __construct()
    {
        parent::__construct();

        $this->fields_list['invoice_number'] = array(
            'title' => $this->l('invoice'),
            'align' => 'text-center',
            'class' => 'fixed-width-xs'
        );
       $this->fields_list['postcode'] = array(
          'title' => $this->l('Postcode'),
          'align' => 'text-center',
          'class' => 'fixed-width-xs'
       );
    }
}

```

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...