Jump to content

View the selected carrier in BackOffice order tab


levviking

Recommended Posts

 

You will need to override the AdminOrdersController class in order to do this. Try creating a new file, "/override/controllers/admin/AdminOrdersController.php" and paste the following code into it:

 

<?php

class AdminOrdersController extends AdminOrdersControllerCore

{

public function __construct()

{

parent::__construct();

 

$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'carrier` crr ON (crr.`id_carrier` = a.`id_carrier`)';

$this->_select = 'crr.`name` AS `carrier_name`,'.$this->_select;

 

$this->fields_list['carrier_name'] = array(

'title' => $this->l('Carrier '),

'width' => 100,

'havingFilter' => true,

);

}

}

Reorder the "fields_list" array to position the carrier name in the table.

You might have to delete the class index (/cache/class_index.php) to get the override running.

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

  • 1 month later...

 

 

You will need to override the AdminOrdersController class in order to do this. Try creating a new file, "/override/controllers/admin/AdminOrdersController.php" and paste the following code into it:

 

<?php

class AdminOrdersController extends AdminOrdersControllerCore

{

public function __construct()

{

parent::__construct();

 

$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'carrier` crr ON (crr.`id_carrier` = a.`id_carrier`)';

$this->_select = 'crr.`name` AS `carrier_name`,'.$this->_select;

 

$this->fields_list['carrier_name'] = array(

'title' => $this->l('Carrier '),

'width' => 100,

'havingFilter' => true,

);

}

}

Reorder the "fields_list" array to position the carrier name in the table.

You might have to delete the class index (/cache/class_index.php) to get the override running.

 

Worked like a charm for me! PS 1.6.0.5

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...
  • 1 month later...

post-705830-0-00346400-1449654013_thumb.png

vekia, on 12 Mar 2014 - 3:55 PM, said:

 

Quote
 
You will need to override the AdminOrdersController class in order to do this. Try creating a new file, "/override/controllers/admin/AdminOrdersController.php" and paste the following code into it:

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

$this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'carrier` crr ON (crr.`id_carrier` = a.`id_carrier`)';
$this->_select = 'crr.`name` AS `carrier_name`,'.$this->_select;

$this->fields_list['carrier_name'] = array(
'title' => $this->l('Carrier '),
'width' => 100,
'havingFilter' => true,
);
}
}
Reorder the "fields_list" array to position the carrier name in the table.
You might have to delete the class index (/cache/class_index.php) to get the override running.

 

 

Hi Vekia,
 
I need to put carrier selection while generating all the pdf file invoices from/to date in back office so that we can only print the particular invoices as per carrier selection..any advice on that...

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

Hello,

I need help for my BO.

I correctly add a new column with the tracking number (cf ModifBO Commande.png).

Now I would like to recover the link of the tracking number in the order (cf CommandeNumSuivi) to put it directly in my column.

Like that I don't need to go inside each order to see the link of the tracking number.

Please help.

ModifBOCommande.png

CommandeNumSuivi.png

Link to comment
Share on other sites

  • 4 weeks later...
  • 5 months later...
  • 1 year later...

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