hostjars 스타터 파일을 사용하여 첫 번째 Opencart (1.5.6) 플러그인을 개발했습니다.Opencart 사용자 정의 모듈이 프론트 엔드에 표시되지 않습니다.
관리 섹션이 아름답게 작동하며 모든 프론트 엔드 코드가 배치되었습니다. 그러나 어떤 이유로 관리자가 위치가 정의되어 있어도 웹 페이지에 모듈이 표시되지 않습니다.
<?php class ControllerModulebevyspecials extends Controller {
protected function index($setting) {
//Load the language file
$this->language->load('module/bevy_specials');
//Load the models
$this->load->model('module/bevy_specials');
//Get the title from the language file
$this->data['heading_title'] = $this->language->get('heading_title');
//Retrieve Checkout Special Products
$products = $this->model_module_bevy_specials->getBevySpecials();
if(Count($products)>0){
foreach ($products as $product) {
$product_info = $this->model_catalog_product->getProduct($product['product_id']);
$this->data['title'] = $product['title'];
if (isset($product_info)) {
$this->data['products'][] = array(
'product_id' => $product_info['product_id'],
'name' => $product_info['name'],
'discount' => $product['discount']
);
}
}
}
else{
$this->data['noRecord'] = true;
}
//Choose which template to display this module with
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/bevy_specials.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/bevy_specials.tpl';
} else {
$this->template = 'default/template/module/bevy_specials.tpl';
}
//Render the page with the chosen template
$this->render();
} } ?>
나는 어떤 특정 코드 표시가 실종 : 아래
은 (내가 아마도 컨트롤러가 호출이나 뭐하고 있지 않은지 생각하게 참고로, 오류가 발생하지 않습니다) 참조 용 프론트 엔드 컨트롤러 코드 웹 페이지의 모듈?모듈 개발과 관련하여 Opencart 설명서는 매우 미비합니다. 웹에서 솔루션을 검색해 보았지만 확실한 답을 찾을 수 없었습니다.
모든 입력 사항을 매우 높이 평가할 것입니다. 미리 감사드립니다!
MORE INFO : 내가 (예 : 연락처 페이지 및 "콘텐츠 탑"에 대한에 "열 왼쪽"을 추가 한 모듈에 대해 2 개 이상의 레이아웃을 추가 할 때 한 가지 문제는 관리자 패널에서 .....하지만 발견 계정 페이지)를 들어, 프론트 엔드는 다음과 같은 오류를 보여줍니다
Warning: Invalid argument supplied for foreach() in D:\xampp171\htdocs\opencart\catalog\controller\common\column_left.php on line 49
관리자 패널을 통해 모듈을 설치 했습니까? – Hassan
@Hassan .... 그렇습니다. 설치, 구성 및 사용 가능합니다. 여기에서 관리자 패널의 스냅을 볼 수 있습니다. http://www.bevysolutions.com/stackoverflow/snap-26jan2014.jpg –
설치/제거 방법은 어디에서 정의 했습니까? 모듈을 설치할 때 opencart 설정에 항목을 삽입한다고 가정합니다. 당신은 그렇게 않았다 방법 ? 출처 : http://docs.opencart.com/pages/page/viewpage.action?pageId=754759 – Hassan