Jump to content

Add Invoice Number Column In Orders List


WqkO

Recommended Posts

Hi,

 

I would like to add an extra column in my orders list so that I can see the invoice number of an order without having to download the pdf.

So far, I've found a simple solution that seems to work just fine with my version of Prestashop, but it displays the address and the city instead. Here it is:

<?php

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

		$this->_select .= ', address.`address1` as saddress,
		CONCAT(address.`postcode`, \' \', address.`city`) as sville';

		$this->fields_list['saddress'] = array(
			'title' => $this->l('Address')
		);
		
		$this->fields_list['sville'] = array(
			'title' => $this->l('City')
		);
	}
}

Would it be possible to adjust it so it displays the invoice number instead?

 

Thanks a lot!  :)

Link to comment
Share on other sites

Try

    <?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'
            );
        }
    }
Link to comment
Share on other sites

  • 4 years later...
On 1/13/2016 at 6:16 PM, tuk66 said:

Try


    <?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'
            );
        }
    }

Hello, which file and where exactly do i need to add this to make it work, my prestashop is on 1.7.6.4

 

Thank you.

Link to comment
Share on other sites

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...