Jump to content

Get Boxes click button initPageHeaderToolbar


Recommended Posts

Good afternoon, I wanted to make a query which I am quite lost. Is it possible to get boxes selected from helper list in module controller admin? That is, perform the same function that performs a bulk_actions but using the buttons on page_header_toolbar_btn. Thanks for your help. Attached image to clarify this a bit.

 

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

I am also having the related question which seniors of prestashop maybe could solve my problem. How can I add button or a box of text to create that when I clicked on that button or text then it deliver to the web service in custom admin menu page of prestashop.

I am trying to create a admin module in which I created a menu bar and able to create a grid with pagination the default prestashop grid in that specific page. Moreover, I also want that specific button on the upper side of the grid, so can you guys help me in that which is on prestashop 1.6.

Controller codes:

class QueryController extends ModuleAdminController
{

public $module;
public function __construct()
{
    $this->module = new querydr();     
    $this->addRowAction('view');
    //$this->removeButton('add'); //  this code to remove the add button
    $this->explicitSelect = false;
    $this->context = Context::getContext();
    $this->id_lang = $this->context->language->id;
    $this->lang = false;
    $this->ajax = 1;
    $this->path = _MODULE_DIR_.'querydr';
    $this->default_form_language = $this->context->language->id;
    $dormant_filter_days= Configuration::get('DORMANTUSERS_DORMANT_FILTER_DAYS');
    $this->table = 'query_dr';
    $this->className = 'QueryDr';
    $this->identifier = 'id_query_dr';
    $this->allow_export = true;
    $this->_select = " id_query_dr,order_no,ni_online_ref_id,transaction_type,response,status,error_code,error_msg,date_add,date_upd    
            ";
    $this->name = 'Query';
    //d( $this->select);
    $this->bootstrap = true;
    $this->fields_list = array(

    'id_query_dr' => array(
    'title' => $this->l('Id'),
    'align' => 'text-center',
    'remove_onclick' => true,
    'search' => false,
    ),

    'order_no' => array(
    'title' => $this->l('Order Number'),
    'align' => 'text-center',
    'remove_onclick' => true,
    //'search' => false,
    ),
    'ni_online_ref_id' => array(
    'title' => $this->l('Online Reference ID '),
    'align' => 'text-center',
    'remove_onclick' => true,
    //'search' => false,
    ),        
    'transaction_type' => array(
    'title' => $this->l('Transaction type'),
    'align' => 'text-center',
    'remove_onclick' => true
    ), 
     'status' => array(
    'title' => $this->l('Status'),
    'align' => 'text-center',
    'remove_onclick' => true
    ),  
             'error_code' => array(
    'title' => $this->l('Error Code'),
    'align' => 'text-center',
    'remove_onclick' => true
    ), 
             'error_msg' => array(
    'title' => $this->l('Error Message'),
    'align' => 'text-center',
    'remove_onclick' => true
    ), 
             'date_add' => array(
    'title' => $this->l('Date Added'),
    'align' => 'text-center',
    'remove_onclick' => true
    ), 
             'date_upd' => array(
    'title' => $this->l('date_upd'),
    'align' => 'text-center',
    'remove_onclick' => true
    ),     
    );


    parent::__construct();
}




public function initPageHeaderToolbar()
{
    $this->page_header_toolbar_title = $this->l('Query Dr Logs');
    parent::initPageHeaderToolbar();
}

public function initToolbar()
{
    parent::initToolbar();
    $this->context->smarty->assign('toolbar_scroll', 1);
    $this->context->smarty->assign('show_toolbar', 1);
    $this->context->smarty->assign('toolbar_btn', $this->toolbar_btn);
}

}

Hopefully any senior member can assist me,

Regards 

Wilson Jayson 

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