hi mate thank you for your fast reply i tested and it still does not work.
it's like this:
$db =& JFactory::getDBO();
$query = 'UPDATE '.hikashop::table('order').' SET referencia ='.$db->Quote($referencia2).' WHERE order_id ='.(int)$order->order_id;
$db->setQuery($query);
$result = $db->query();
i dont know if my file multibanco.php on the payment plugins should include some kind of joomla file.
im using joomla 1.5.22
at least i have phpmyadmin opened and i refresh the databse and i see the new product on the order tables but the "referencia" field is still empty.
also "referencia" is set as text to avoid problems once we just need it to check manually and know wich person bought what and when, and also to put it on the invoice on the details field.