Jump to content

[Résolu] View the shipping_number in BackOffice order tab


julianbaros

Recommended Posts

Hello,

I need help for my BO. I'm not a developper

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.

I know know what I need to put in my new function in order to recover the tracking number link.

This is my AdminOrdersController.php :

 

<?php

class AdminOrdersController extends AdminOrdersControllerCore
{
    public function __construct()
    {
        parent::__construct();
        // Add tracking number column on BO order's page list
        $this->_select .= ', a.`shipping_number` as otracking';
        $this->fields_list['otracking'] = array(
            'title' => $this->l('Numéro de suivi'),
            'search' => false,
            'callback' => 'printNumSuivi'
        );
    }
    public function printNumSuivi($id_order, $tr)
    {
        
    }    
    public function renderList()
    {
        if(Tools::getValue('iriumExport_order')){
            require_once _PS_MODULE_DIR_.'iwebshop/classes/iwebOrder.php';
            $this->getList($this->context->language->id, null, null, 0, false);
            
            foreach ($this->_list as $i => $row)
            {                
                iweb\iwebOrder::exportToIrium($row['id_order']);
            }                        
        }
        
        $this->toolbar_btn['irium'] = array(
                'href' => self::$currentIndex.'&iriumExport_'.$this->table.'=1&token='.$this->token,
                'desc' => $this->l('Export to Irium'),
                'imgclass' => 'export'
        );        
        return parent::renderList();
    }
}

Please help.

CommandeNumSuivi.png

ModifBOCommande.png

Edited by julianbaros (see edit history)
Link to comment
Share on other sites

  • 6 months later...
  • 5 months 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...