Jump to content

View icon note in order list, and text in alt for mouse hover


giorinsrl

Recommended Posts

Hi Guys,

 

 

i want to show an icon if in the order there is a NOTE, how can i do?!

I found this in "tpl" and i have think that i have to do like this..

 

$this->fields_list['herewhatdoIput?!'] = array(
            'title' => $this->l('herewhatdoIput?!'),
            'width' => 40
                        
        
);

 

But i'm not sure that it's ok.

 

What do you think!?

 

Thank you

Link to comment
Share on other sites

i have found all, but I can't able to solve it..

 

 

in table ps_message i have 'id_order' and 'message', and my message is in 'message'

 

this is the select:

 

$this->_select = '
a.id_currency,
a.id_order AS id_pdf,
CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
osl.`name` AS `osname`,
os.`color`,
IF((SELECT COUNT(so.id_order) FROM `' . _DB_PREFIX_ . 'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new,
GROUP_CONCAT(od.product_name separator \', \') as products';

        $this->_join = '
LEFT JOIN `' . _DB_PREFIX_ . 'customer` c ON (c.`id_customer` = a.`id_customer`)
LEFT JOIN `' . _DB_PREFIX_ . 'order_state` os ON (os.`id_order_state` = a.`current_state`)
LEFT JOIN `' . _DB_PREFIX_ . 'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = ' . (int)$this->context->language->id . ')
LEFT JOIN `'._DB_PREFIX_. 'order_detail` od ON (od.id_order = a.id_order )';
        $this->_orderBy = 'id_order';
        $this->_orderWay = 'DESC';
        $this->_group = 'GROUP BY a.id_order';

and i think that this fields_list is correct

'message' => array(
                'title' => $this->l('Message'),
                'havingFilter' => true,
                'align' => 'center',
                'icon' => array(
                    0 => 'blank.gif',
                    1 => array(
                        'src' => 'note.png',
                        'alt' => $this->l('#heretextofmessage'),
                    )
                ),
                
                'width' => 35
            ),

but i don't have the JOIN!:(
 

Please help me

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