나는 컨트롤러라는 이름의 abandonedCarts을 만들어 :Prestashop 모듈 개발 - 모듈 설치시 컨트롤러 initMethod를 어떻게 호출 할 수 있습니까? 컨트롤러/앞
store_debug 단지 (단지 확인 용) DB를 뭔가에 기록하는 기능입니다class <moduleName>AbandonedCartsModuleFrontController extends ModuleFrontController
{
public function __construct()
{
parent::__construct();
$this->context = Context::getContext();
$this->store_debug('Controller - __construct');
}
public function initContent()
{
parent::initContent();
$this->store_debug('Controller - init');
}
}
. 덕분에 여기에 나는이 방법
site/index.php?fc=module&module=olyo&controller=abandonedCarts
에 URL에서 컨트롤러를 호출 할 때 구조와 초기화 방법 호출되고 있다는 것을 알고 있지만, 내가 필요한 것은 모듈이 설치 될 때 호출되는 컨트롤러 (또는 처음 시작). 주 파일에서
나는 또한 생성자에서이 줄을 넣어 :
$this->controllers = array('abandonedCarts');
을하지만 나는 심지어
어떤 prestashop 버전입니까? – sarcom
모듈 설치시 init 메소드를 호출해야하는 이유는 무엇입니까? – shagshag
@sarcom 버전은 1.6입니다. – frabis