Jump to content

[1.5.4] Problem ovverriding a module


stratboy

Recommended Posts

Hi! I copied blocktopmenu in themes/[mytheme]/modules and changed code so that it can be placed in my custom displayHeaderMainMenuBox hook. It doesn't work. Instead, if I edit the same way the main (root) blocktopmenu, it works all fine. So, I guess the module override doesn't happen. Why?

Edited by stratboy (see edit history)
Link to comment
Share on other sites

Sorry I misunderstood when first reading I was thinking about something else :)

 

Did You put module CSS files in themes/[mytheme]/css/modules/blocktopmenu and JS themes/[mytheme]/js/modules/

 

Hi, thank you. I don't need to change css/js files. Is still necessary correct the paths?

I've only modified (added a line to install()) php code simply to add my custom hook:

 

$this->registerHook('displayHeaderMainMenuBox')

 

And of course the relative uninstall code. displayHeaderMainMenuBox is the new hook, already used with other modules.

Edited by stratboy (see edit history)
Link to comment
Share on other sites

Wait a minute:

 

http://doc.prestashop.com/display/PS15/Overriding+default+behaviors#Overridingdefaultbehaviors-Overridingamodule%27sbehavior

 

They speak about tpl, css and js. NOT php. Maybe in a theme folder I can override ONLY a modules tpl/css/js?

 

And in that case, maybe I can override the php file in the /override folder just like classes and controllers?

 

OR maybe i CANNOT override module's php files?

 

Effectively, on the top of the link, they write:

 

1. Overriding PrestaShop's own behavior (class files and controller files) in order to target a specific section of the required components.

 

2. Overriding the VISIBLE PARTS of modules (Templates, JavaScript, style sheet language...) so that the themes can adapt better to them.

 

 

mmmmm :P

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