add Tab in admin and hookDisplayAdminOrder - prestashop 1.7

Hook

hookDisplayAdminOrderTabOrder //display tab name

hookDisplayAdminOrderContentOrder //display tab content

public function hookDisplayAdminOrderContentOrder($params)
    {
        if (!$this->active)
        return;
               
        return $this->display(__FILE__, 'views/templates/hook/tabname.tpl');
    }

public function hookDisplayAdminOrderTabOrder($params) {
        if (!$this->active)
        return;
   
        return $this->display(__FILE__, 'views/templates/hook/tabcontent.tpl');
    }

tabcontent.tpl

<div class="tab-pane" id="pp-label">
add content code here
</div>

tabname.tpl

<li>
    <a href="#pp-label">
        <i class="icon-info"></i>
        {l s='Tabname Label' mod='xyz' }
    </a>
</li>

hookDisplayAdminOrder - you can display your sumary or detail


 public function hookDisplayAdminOrder($params)
    {

$this->context->smarty->assign(array(
          'data' => $data
           ));

return $this->display(__FILE__, 'views/templates/hook/your-content.tpl');
   }



Comments

Popular Posts