Ok so I forgot to add the hooks
public function install()
{
return (
parent::install()
&& $this->registerHook('actionCustomerGridDefinitionModifier')
&& $this->registerHook('actionCustomerGridQueryBuilderModifier')
&& $this->registerHook('actionOrderGridDefinitionModifier')
&& $this->registerHook('actionOrderGridQueryBuilderModifier')
);
}
It is now showing the new field, just not filling data yet.
After some thought, I'm thinking this one does now need the leftJoin 😕
So I tried this
// join the customer table to get the pass details $searchQueryBuilder->leftJoin( 'c', '`' . pSQL( _DB_PREFIX_ ) . 'customer`', 'pa', 'pa.`id_customer` = c.`id_customer` AND pa.`id_customer` = ( SELECT pa2.`id_customer` FROM `' . pSQL( _DB_PREFIX_ ) . 'customer` pa2 WHERE pa2.`id_customer` = pa.`id_customer` ORDER BY LENGTH(pa2.`agecheck`) DESC LIMIT 1 )' );
and get the error "Call to a member function leftJoin() on null"