Custom Column

Custom Column

alexdevalexdev Posts: 2Questions: 1Answers: 0

Hi I modify my server script to add a custom content to my list like this
array(
'db' => 'custom',
'dt' => 2,
'formatter' => function( $d, $row ) {
$order = $this->orders_model->get_order_info($row['id']);
$customer = get_customer_info($order['id_customer']);
return _ucwords($customer['fname'] . ' ' .$customer['lname']) . "<br>" . "<a href='mailto:".$order['email_order']."'>".$order['email_order']."</a>";
}
),
and when inject the columns to the SQL do not count this column, the problem is when I try to perform a search I get
Can not read property length and the search do not work.

Thank you in advance.. here is the modification in ssp.class.php
static function pluck ( $a, $prop )
{
$out = array();

    for ( $i=0, $len=count($a) ; $i<$len ; $i++ ) {
        if($a[$i][$prop] != 'custom'){
            $out[] = $a[$i][$prop];
        }
    }

    return $out;
}

Answers

This discussion has been closed.