Jump to content

Help for table of element with HelperList class


hrnsykk

Recommended Posts

Hello Everyone, 

I used to generated a table of element with HelperList class.
I couldn't change category name instead of category id.
So could you please help me out here?


1371189340_Screenshot2021-09-16at11_45_02.thumb.png.603fe32b966b8061cabb68c3877fd377.png

 

      $this->fields_list = [
            'id_poster' => [ 
                'title' => $this->module->l('ID'),
                'align' => 'center',
                'class' => 'fixed-width-xl'
            ],
            'name' => [
                'title' => $this->module->l('NAME'),
                'align' => 'left',
            ],
            'category' => [
                'title' => $this->module->l('CATEGORY'),
                'align' => 'center',
                'type' => 'select',
                'list' => $cat_list,
                'filter_key' => 'ct!category_id'
            ]
        ];


        $this->_select = 'a.* , ct.*';
        $this->_join = ' INNER JOIN `'._DB_PREFIX_.'poster_category` AS ct ON (ct.`category_id` = a.`category`) ';
        $this->_use_found_rows = false;


        $this->addRowAction('edit');
        $this->addRowAction('delete');

  

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