jellyMan Posted October 7, 2016 Share Posted October 7, 2016 Hi all, im using prestashop 1.6. I want to edit the markup for the blocktopmenu module. I've looked around and it's clear that I need to look in the blocktopmenu.php file, the makeMenu() method - and go through the switch function and add my classes or whatever there. My question is should I edit the /modules/blocktopmenu.php OR Create a /themes/my-theme/modules/blocktopmenu/blocktopmenu.php file and add a makeMenu() method in that OR Create an override class for the blocktopmenu in /overrides/blocktopmenu/blocktopmenu.php and add a makeMenu() method there? 1 Link to comment Share on other sites More sharing options...
Daniel Patilea Posted October 7, 2016 Share Posted October 7, 2016 Hi all, im using prestashop 1.6. I want to edit the markup for the blocktopmenu module. I've looked around and it's clear that I need to look in the blocktopmenu.php file, the makeMenu() method - and go through the switch function and add my classes or whatever there. My question is should I edit the /modules/blocktopmenu.php OR Create a /themes/my-theme/modules/blocktopmenu/blocktopmenu.php file and add a makeMenu() method in that OR Create an override class for the blocktopmenu in /overrides/blocktopmenu/blocktopmenu.php and add a makeMenu() method there? You should definitely create an override for the module to be sure you will not lose anything in case of updating. Link to comment Share on other sites More sharing options...
jellyMan Posted October 7, 2016 Author Share Posted October 7, 2016 Ok Daniel, thanks for the speedy reply. If I create an override - should I need to reinstall the module, or should the makeMenu() method on my override take priority over the default right away? 1 Link to comment Share on other sites More sharing options...
Daniel Patilea Posted October 7, 2016 Share Posted October 7, 2016 Ok Daniel, thanks for the speedy reply. If I create an override - should I need to reinstall the module, or should the makeMenu() method on my override take priority over the default right away? I don't think it's necessary to reset the module, you just have to flush the class index by deleting /cache/class_index.php 1 Link to comment Share on other sites More sharing options...
jellyMan Posted October 7, 2016 Author Share Posted October 7, 2016 Hey thank for this - all sorted now. 1 Link to comment Share on other sites More sharing options...
Daniel Patilea Posted October 7, 2016 Share Posted October 7, 2016 Hey thank for this - all sorted now. Great! I'm glad I could help 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