Jump to content

Recommended Posts

Got this peace of code but I can't display the Category Name ...



        $this->bootstrap = true; // use Bootstrap CSS
        $this->table = 'referencegenerator'; // SQL table name, will be prefixed with _DB_PREFIX_
        $this->identifier = 'id'; // SQL column to be used as primary key
        $this->className = 'Shortcode'; // PHP class name
        $this->allow_export = true; // allow export in CSV, XLS..

	       $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_lang` cl
            ON (cl.`id_category` = `id_cat`
            AND cl.`id_lang` = '.(int)$this->context->language->id.')';

        $this->_defaultOrderBy = 'id'; // the table alias is always `a`
        $this->_defaultOrderWay = 'DESC';
        $this->fields_list = [
            'id' => ['title' => 'ID','class' => 'fixed-width-xs'],
            'id_cat' => ['title' => 'Id Cat'],
            'name'=> ['title' => 'Cat Name'],
            'shortcode' => ['title' => 'Shortcode'],


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More