Jump to content

[Solved] User modules not showing up in modules list


damnated

Recommended Posts

Hello, I've been developing prestashop modules for a few months now, but I have encountered a problem with the new (1.4+) version.
Neither the modules I created for old prestashops (1.3.7 even) or the ones created directly for the newest one show up in the list of modules. I have put every file where it belongs, I even upgraded the old modules (changed the tab etc.). The module filter is set to show every installed or uninstalled module, and they just simply do not show up.

How are new modules supposed to be installed?

PS: I have also created an xml file with basic info

PS2: I've tried archiving the files, with dir structure, and uploading it with the " Add a module from my computer " feature, and although the upload was a success, the module did not appear in the list ...

Link to comment
Share on other sites


AFAIK, it should display as an available / installable module if the following conditions are met:

-- modules/somename/somename.php exists check

-- somename.php contains a classfile declaration myhappyname extends Module check

-- the class constructor contains, at a minimum, declarations for these properties: name, tab, version, displayName, description check

-- within the constructor, $this->name = 'myhappyname'; (matches classname) check


thank you for the long post, but I'm aware of the things you wrote.
I know the xml file is optional, I just added it to be sure that wasn't the problem.

everything you mentioned is there. tab is Front Office Features.
Basically I copy pasted the module's files from the prestashop 1.3.7 directory into the new prestashop dir, changing only the tab/version/etc basic info. the same files/module shows up/works just fine in PS 1.3.x

I asked how modules are supposed to be installed, because I did everything I normally do, (or anything I should do according to the PS 1.4 'manual' ) and the module isn't even visible. I wonder how users (ie. non-developers) get these modules to show up, if I (a developer) have this much problem with them...
Link to comment
Share on other sites

I browsed through the bugtracker, and according to that increasing the memory limit should solve this.
I already had the memory limit set to 128M, but deleted every partner module; the ones I wrote are still missing though.

Link to comment
Share on other sites

For instance. This module skeleton is not visible.


if (!defined('_CAN_LOAD_FILES_'))
   exit;

class MyModule extends Module
{
   private $_html = '';
   private $_postErrors = array();


   function __construct()
   {
       $this->name = 'mymodule';
       $this->tab = 'migration_tools';
       $this->version = '0.1';
       $this->author = 'Me';

       parent::__construct();

       $this->displayName = $this->l('My module');

               $this->description = $this->l('Some text');
   }

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

       return true;
   }

   public function getContent()
   {
       $output = ''.$this->displayName.'';

       return $output.$this->displayForm();
   }

   public function displayForm()
   {
       $output = ''.$this->displayName.'';

       return $output;
   }


}

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 1 year later...
  • 1 year later...
  • 2 years later...
  • 2 weeks later...
  • 3 months later...
  • 5 months later...

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...