2017-02-17 1 views
0

Prestashop에 내 첫 번째 모듈을 쓰고 있습니다. 백 오피스에 데이터를 제출하면 모듈의 구성 페이지가로드됩니다. 그러나 나는 그 형태에 머물고 싶다. 이것을 어떻게 할 수 있습니까?issubmit 후 페이지 정의하기

if (Tools::isSubmit('toggleanswers')) { 
     $id_answer = Tools::getValue('id_answer'); 
     if($this->toggleAnswer($id_answer)) { 
      $this->_html .= $this->displayConfirmation($this->l('Entry status changed')); 
     } 

     else { 
      $this->_html .= $this->displayError(implode($this->_errors, '<br />')); 
     } 
} 

이것은 내 기능의 모습입니다. 구성 페이지로 돌아 안 그것을 토글을 클릭하면 ... 내 양식의 URL은 다음과 같습니다 /index.php?controller=AdminModules & 구성 = 질문 & 모듈 이름 = 질문 & id_question = 1 & updatequestions & 토큰 = ccd237618500f4c18f42d1a4fe971aa9을 당신이 좋은 포스트 프로세스를 관리 한 경우

 
if (Tools::isSubmit('toggleanswers')) { 
    $id_answer = Tools::getValue('id_answer'); 
    if($this->toggleAnswer($id_answer)) { 
     Tools::redirectAdmin($this->context->link->getAdminLink('AdminModules', true).'&conf=6&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name.'&id_question='.$id_question.'&update_questions'); 
    } 
    else 
    { 
     $this->_html .= $this->displayError(implode($this->_errors, '
')); } }

모든 확인을 경우 당신은 당신의 '질문의 양식에 리디렉션해야합니다

+0

어디서 찾을 수 있습니까? – sarcom

+0

_postprocess()라는 함수에서 getContent()에서이 함수를 호출했습니다. –

답변

0

난 당신이 원하는 게 무엇인지 이해한다면, 당신이 당신의 코드를 변경해야 '상태가 변경된 기본 메시지가 표시됩니다. 그렇지 않으면 표시됩니다. 오류.

+0

답변 해 주셔서 감사합니다! 그것은 많은 도움이되었습니다. 그것은 나를 위해 일한 같은 : 도구 : redirectAdmin ($ this-> 상황에> 링크 -> getAdminLink (false '로 AdminModules') \t \t \t \t '& = 구성'$ this-> 이름 \t \t... \t \t '및 모듈 이름 ='. $ this-> 이름. \t \t \t \t '& id_question ='. $ id_question. \t \t \t \t '& updatequestions'. \t \t \t \t '및 토큰 ='. 도구 :: getAdminTokenLite ('AdminModules')); –

+0

나는 그것을 듣게되어 기쁩니다;). 천만에요 – sarcom

관련 문제