array('foreign_key'=>'product_cat_id','far_key'=>'id'), ); protected $_sorting = array( 'name'=>'asc', ); public function description() { // If the user is not logged in, show the site default language // @todo This needs to change to the session language. if (! $ao=Auth::instance()->get_user()) $ao=Config::instance()->so; return ($a=$this->product_category_translate->where('language_id','=',$ao->language_id)->find()->description) ? $a : _('No Description'); } public function list_bylistgroup($cat) { $result = array(); foreach ($this->where('list_group','=',$cat)->find_all() as $pco) $result[$pco->id] = $pco; return $result; } } ?>