Jump to content

"Module not found" when trying to install my own module


jazerix

Recommended Posts

Hey

I've been trying to make my own basic module, using http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module . 

public function install()
	{
	  return (parent::install());
	}

	public function uninstall()
	{
	  return parent::uninstall() && Configuration::deleteByName('pandisigneconomicmod');
	}

	public function hookPaymentConfirmation($params)
	{
		mail("[email protected]", "jazerix", var_dump($params));
	}

First of all, my icon (which is a png file, the size of 32x32 pixels, named logo.png), doesn't show on the installer page. Furthermore when I press the install button i'm getting the error "Module not found". Does any of you have any idea why this is happening? :)

Link to comment
Share on other sites

Did you make the name of the module exactly the same as your folder name?

 
For example, if your module is called:
$this->name = 'myownmodule';
 
you should have your files in /modules/myownmodule/ so you should have things like:
 
/modules/myownmodule/myownmodule.php
/modules/myownmodule/myownmodule.tpl
/modules/myownmodule/logo.png
 
etc.
 
make sure that both the folder name and the module name are all lower case (or at the least, both the sAmE case, but all lower case is preferred)
 
 
Hope this helps. If not, please post your whole < your module name>.php file contents
 
pascal.
Link to comment
Share on other sites

P.S. you did add the full class name code etc, not only the install, uninstall and hook function code to the <your module>.php file, didn't you?

<?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';
    $this->author = 'Firstname Lastname';
    $this->need_instance = 0;
    $this->ps_versions_compliancy = array('min' => '1.5', 'max' => '1.5');
    $this->dependencies = array('blockcart');
 
    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');
  }


/* Add here your install, uninstall, hook functions etc.

}
?>

just checking...

pascal.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...