STDERR PHP致命错误:调用未定义的方法Customer :: isOwnStudents()

[STDERR] PHP Fatal error: Call to undefined method Customer::isOwnStudents() in /upload/catalog/view/theme/Super_green/template/common/header.tpl on line 62

header.tpl looks like

<?php
if ($this->customer->isLogged()) {
if($this->customer->isOwnStudents()>0) echo $orderfood;
echo $language . $currency . $cart . $konto;`}
?>

class ModelAccountStudents extends Model {  

public function isOwnStudents() {
        $results = $this->getStudentses();
        if(sizeof($results)>0) return true;
        else return false;
    } 

What is wrong here in this code. I do not know why do I get this err.

From your code, it looks like $this->customer is an instance of Customer - you've defined the isOwnStudents() method for the ModelAccountStudents class, not the Customer class.