bcsteeve Posted July 13, 2015 Share Posted July 13, 2015 The information found at http://doc.prestashop.com/display/PS16/Creating+a+first+module is simply not complete. I'm sure it seems complete to someone already familiar with the the underworkings of PS, but a person looking to use this guide obviously has zero previous knowledge. The end result of following that tutorial should be a complete, working (albeit simple) module. Even if it just prints "hello world" on the screen. But this is not the case! Call me stupid all you want, but I've been at it for now 2 solid days and I am no closer to having a working module. The problem is really two fold: #1) poor reference of what is meant to be my data. So for example when it says $this->name = 'mymodule'; I presume I'm supposed to put in my own name there, right? Ok, basic enough.. but then I make the same presumption here: if (!Configuration::get('MYMODULE_NAME')) but much later I gather that is supposed to stay hardcoded like that. With no comments or description, how do I know what is what? #2) Vague and incomplete references to "helpers". Obviously they are necessary to get anything out of the "first module", but I see no bridge to get me from A to B! in the end, I'm just frustrated. I'm trying to learn the basics, and it would be exceedingly helpful to have a barebones BUT COMPLETE working example of a "hello world" type module. I see plenty of references when people are trying to do something and the answer is "just make a module"... HOW!?! Link to comment Share on other sites More sharing options...
gabdara Posted July 13, 2015 Share Posted July 13, 2015 Have a look at this starter prestashop module. It doesn't come with a tutorial, but it's a working example. Also consult other tutorials that you find on the web on how to create a module, not only the one from documentation. Others may explain differently and maybe it's easier to grasp. Link to comment Share on other sites More sharing options...
bcsteeve Posted July 13, 2015 Author Share Posted July 13, 2015 Thanks, I'll take a look. Link to comment Share on other sites More sharing options...
razaro Posted July 13, 2015 Share Posted July 13, 2015 Also check https://validator.prestashop.com/generator , while maybe not for absolute beginners you can look at code and learn from it, by adding and removing things. And you will get working module, without front office code. Also check modules that comes by default with Prestashop and easier to look for some piece of code at https://github.com/prestashop . Link to comment Share on other sites More sharing options...
bcsteeve Posted July 13, 2015 Author Share Posted July 13, 2015 Thanks... but its frustrating when you get to page 2 and you read something like, " Should the module's main class be loaded on the back-office "Modules" page?" lol. WTF? sure.. yes? No? maybe? EXPLAIN Link to comment Share on other sites More sharing options...
razaro Posted July 13, 2015 Share Posted July 13, 2015 You set that to NO. If yes it will load module class on that page so will slow it down a bit . If you need to display some message (like upgrade or special configuration) on Modules page then you need to load class and choose YES. Link to comment Share on other sites More sharing options...
bcsteeve Posted July 13, 2015 Author Share Posted July 13, 2015 I didn't mean you had to explain (but thanks) I meant there should be some documentation to that effect so that it is clear and you don't need to resort to scouring a non-authoritative forum for help. Link to comment Share on other sites More sharing options...
Recommended Posts