2013-11-14 2 views
0

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

header.tpl이 코드 여기 뭐가 문제

<?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; 
    } 

모양) (:: 정의되지 않은 메서드의 고객에게 전화 isOwnStudents. 나는 왜 이것이 잘못을 저지른 것인지 모른다. $this->customerCustomer의 인스턴스가 같은 코드에서

+0

isOwnStudents()는 ModelAccountStudents 클래스의 함수입니다. $ this-> customer가 정의되어 있으며 ModelAccountStudents의 인스턴스입니까? –

+0

Customer 클래스를 찾으려고합니다. 쉽지 않습니다. – user2994097

+0

코드 "class customer"를 검색해보십시오. IDE를 사용하고 있습니까? –

답변

0

, 그것은 보인다 - 당신이 ModelAccountStudents 클래스의 isOwnStudents() 방법이 아닌 Customer 클래스를 정의했다.

+0

고객 클래스를 찾으려고합니다. 쉽지 않습니다. – user2994097

+0

고객 클래스를 발견하고 필요한 사항을 변경했습니다. – user2994097