2017-03-01 4 views
0

Prestashopモジュール開発の新機能です。 私は最初のprestashopモジュール[ref:http://doc.prestashop.com/display/PS16/Creating+a+first+module]]をビルドしようとしています。私はバックオフィスからのmymoduleをインストールしようとしていたときにここに が私のコードモジュールmymoduleをインストールできません。残念ながら、モジュールは追加の詳細を返しませんでした

<?php 
    if(!defined('_PS_VERSION_')) 
     exit(); 
    class MyModule extends Module 
    { 
     public function _construct() 
     { 
      $this->name = 'mymodule'; 
      $this->tab = 'front_office_features'; 
      $this->version = '1.0.0'; 
      $this->author = 'Rohit Prakash'; 
      $this->need_instance = 0; 
      $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); 
      $this->bootstrap = true; 

      parent::__construct(); 

      $this->displayName = $this->l('My module'); 
      $this->description = $this->l('Description of my module.'); 

      $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); 

      if (!Configuration::get('MYMODULE_NAME'))  
       $this->warning = $this->l('No name provided'); 
     } 

     public function install() 
     { 
      if (!parent::install()) 
      return false; 
      return true; 
     } 

     public function uninstall() 
     { 
      if (!parent::uninstall()) 
      return false; 
      return true; 
     } 
    } 

あるエラーメッセージ

「エラーを得た! はmymoduleモジュールをインストールすることはできません。残念ながら、モジュールは追加の詳細を返しませんでした。 "

お願いします!

答えて

0

あなたはエラーがあります。 _construct()の代わりに__construct()にする必要があります。

関連する問題