Jump to content

Inconsistency in Prestashop's "Overriding default behaviours" mechanism


Recommended Posts

It's nice that Prestashop defines a standard way to override the modules' CSS, JS and .tpl files in a theme. However, it makes little sense to me that the overriding CSS, JS and .tpl files are in different directories.

 

PrestaShop allows you to override or replace certain front-office module files with new ones within the same theme. The override is governed by the theme: once it contains a /modules folder (or more!), PrestaShop will browse its content for files which have the same name and path as those of existing modules, and replace these with the new ones.

This means, for PrestaShop 1.4-compatible modules:

  • /themes/my_theme/modules/my_module/my_module.tpl
  • /themes/my_theme/css/modules/my_module/my_module.css
  • /themes/my_theme/js/modules/my_module/my_module.js

 

 

 

- from http://doc.prestashop.com/display/PS15/Overriding+default+behaviors

 

Wouldn't it be more consistent and convenient to have CSS, JS and .tpl files (whenever present) in 

/themes/my_theme/modules/my_module/

 overriding the ones in 

/modules/my_module/

?

 

Is there any good reason to do it the way Prestashop is doing that I'm missing?

  •  
  • Like 1
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...