Jump to content

Path to module MVC files PS1.5


Recommended Posts

We have an issue with a new module we created.


We use the standard MVC pattern for PS1.5.

- tpl files in views/templates/...

- css files in views/css...

- controllers in controllers/front...


The module works perfectly on wampp server (local).


The, we moved to a production server.


On the production server :

- PS can't find path to the various files.


Then, we had to add in the module.php file the following :

$this->context->controller->addCSS(($this->_path).'views/css/map.css', 'all');


We suspect a chmod issue with some core files.


Can you please explain how Prestashop is finding files in module and which core file chmod we should pay attention to?

Link to comment
Share on other sites

That's weird. In general all that is required in terms of permissions is read/write access by the php interpreter (Prestashop will try and create a config.xml file in the module directory so needs to be able to write). I know that some servers complain if you use a sledgehammer and set the permissions to 777 and in general 755 is best for directories and 644 for files (if this is sufficient, otherwise you'll need to try 775 and 664 next...). Did you run the installer on the server or did you ftp the entire store and manually import the database? The installer checks the permissions on key directories for you.


One other thing to look out for is that Unix (Linux) is case-sensitive whereas windows isn't, so if you have a filename that's camel-case it MIGHT work on wampp but not a Unix/Linux based server...

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