SELECT modx_garpproducts.title, modx_garpproducts.alias, modx_garpcategories.type, modx_garpcategories.parent FROM modx_garpproducts INNER JOIN modx_garpcategories ON modx_garpproducts.category = modx_garpcategories.catId ORDER BY modx_garpproducts.title
$query = $xpdo->newQuery('Garpproducts');
$query->select('Garpproducts.id, Garpproducts.title, Garpproducts.alias, Cat.id, Cat.type, Cat.parent ');
$query->innerJoin('Cat','Garpcategories','Garpproducts.category = Cat.catId');
$query->sortby('Garpproducts.title','ASC');
$query = $modx->newQuery('Product');
$query->select($modx->getSelectColumns('Product','Product'));
$query->select($modx->getSelectColumns('Category','Category', '', array('catId', 'catName', 'type', 'parent')));
$query->innerJoin('Category','Category','Product.category = Category.catId');
$query->where($where);
$query->sortby('title','ASC');
$products = $modx->getCollection('Product',$query);