therealcoyote Posted September 11, 2014 Share Posted September 11, 2014 Hello,I need to create a new module especially for my project. I see it's necessarry to be connected to install a new module. My new simple basic module (see doc) effectively appears in "modules" tab but when i click on install, i must connectd.So is it imperative to share our created module with community ?Another thing please.whats the best way ? ... to create a personnal interactive (php and js) page.is it necessary to create a module?is there another solution ? Best regards Eric Link to comment Share on other sites More sharing options...
hpar Posted September 11, 2014 Share Posted September 11, 2014 Hello, >I need to create a new module especially for my project. I see it's necessarry to be connected to install a new module. My new simple basic module (see doc) effectively appears in "modules" tab but when i click on install, i must connectd. There is no need to be connected to addon.prestashop.com if you want to add your own module. There will be an annoying warning about "not trusted / potential security issue stuff", but you can continue. >whats the best way ? ... to create a personnal interactive (php and js) page.>is it necessary to create a module? It depends of your needs. Link to comment Share on other sites More sharing options...
therealcoyote Posted September 11, 2014 Author Share Posted September 11, 2014 Hello, Thank you for your fast answer. >>whats the best way ? ... to create a personnal interactive (php and js) page.>>is it necessary to create a module? >It depends of your needs i am developper in php, js, css etc.. but i don't know prestashop. Since a few day i m looking in this solution who is a great e-commerce tool i think. I build a new e-commerce website but with only 3-4 products b2b. it's service products. The prestashop platform can give me a lot of tool (monitoring, seo, paiment, etc..) and it's not necessary for me to create them.Anyway, i have a little website in php/js technologies and i ask me how i can integrate it in prestashop or adapt it in ps. it's possible for me to "redeveloppe it" for ps but i want to be sur using the good way.I ask me : how i can give url parameters, integrate my js library, etc.. Bests regards, Eric Link to comment Share on other sites More sharing options...
hpar Posted September 11, 2014 Share Posted September 11, 2014 (edited) Yes a module is the good place to put your code in. Prestashop code is quite monolithic and internals are not well documented, you probably need to adapt your code in order to work within prestashop. Buf, if there is not much business logic in your site, may be you can get a similar result using modules like CMS and use the flexibility of the templates / themes. Include additionnal js will not be a problem. Edited September 11, 2014 by hpar (see edit history) Link to comment Share on other sites More sharing options...
therealcoyote Posted September 11, 2014 Author Share Posted September 11, 2014 In fact my website use an complex ergonomy of screening informations. The services sales are the website usage. So, for the modules, i will study that very close. For module installation, I created a very simple test module (like doc). i want to install it and i can't. show the screenshot please. Link to comment Share on other sites More sharing options...
hpar Posted September 11, 2014 Share Posted September 11, 2014 I had once a similare issue. It was just a wrong error message. As far as I remember it was tied to the name of the module. Try to change the name of module directory, file, class and $this->name to something really simple (with no _ or space, etc.). Link to comment Share on other sites More sharing options...
therealcoyote Posted September 11, 2014 Author Share Posted September 11, 2014 same problem, i m sorry (directory, file and class without "_") Link to comment Share on other sites More sharing options...
hpar Posted September 11, 2014 Share Posted September 11, 2014 code ? Link to comment Share on other sites More sharing options...
therealcoyote Posted September 11, 2014 Author Share Posted September 11, 2014 <?php if (!defined('_PS_VERSION_')) exit;class AtvWorkshop extends Module{ public function __construct() { $this->name = 'AtvWorkshop'; $this->tab = 'atv - Workshop ATV'; $this->version = '1.0.0'; $this->author = 'Eric Le Coyote'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('AtvWorkshop'); $this->description = $this->l('atv - Workshop ATV'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); if (!Configuration::get('AtvWorkshop')) $this->warning = $this->l('No name provided'); } }?> Link to comment Share on other sites More sharing options...
hpar Posted September 11, 2014 Share Posted September 11, 2014 No problem installing it on 1.6.0.10 I'v put your code in modules/AtvWorkshop/AtvWorkshop.php Link to comment Share on other sites More sharing options...
therealcoyote Posted September 11, 2014 Author Share Posted September 11, 2014 my version 1.6.0.9, is it a problem? Link to comment Share on other sites More sharing options...
therealcoyote Posted September 11, 2014 Author Share Posted September 11, 2014 just to be sure. i created a directory AtvWorkshop in Modules directory. i put inside AtvWorkshop.php with previous code. that's all. And in admin website : Modules -> Modules and click on install Link to comment Share on other sites More sharing options...
vekia Posted September 11, 2014 Share Posted September 11, 2014 hello, it should work i also tested it btw. try to remove this: $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); Link to comment Share on other sites More sharing options...
therealcoyote Posted September 12, 2014 Author Share Posted September 12, 2014 Hello, I tried without the version code line. same result. it doesn't work. i don't understand, it's a very simple module..... in the future, when i will modify the code of module (dev step), will i have to use the admin screen ? Or just update the file by FTP and test ? Best regards Link to comment Share on other sites More sharing options...
hpar Posted September 12, 2014 Share Posted September 12, 2014 Most of the time you will have to call install() and therefore use the admin page. Link to comment Share on other sites More sharing options...
therealcoyote Posted September 15, 2014 Author Share Posted September 15, 2014 Hello finaly a installed a local release of prestashop (with easyphp). Before it was on OVH provider platform. And in local, no problem, so i think OVH have a problem ) thank you for your help, see you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now