Jump to content

Override Module Controller?


marhor.hr

Recommended Posts

I have made some changes in productcomments controllers/front/default.php. (beacuse error messages are not being displayed in correct language - only in english, which is a bug in my opinion; but being relativly new to prestashop, forums, github, etc., i don't know how to report it yet...)

 

I would like to override the file, so the original can stay unchanged.

Is this even possible?

I've tried to place the new, overriden file in different locations:

 

- \root\modules\productcomments\override\controllers\front\default.php

- \root\override\modules\productomments\controllers\front\default.php (i created the override\modules folder myself, hoping that it would behave like override\controllers folder...)

- root\themes\mytheme\modules\productomments\controllers\front\default.php

 

but none of these worked.

 

Can anybody help, please?

Link to comment
Share on other sites

Hi,

 

It is not obligatory to use the override as the translation option is provided. In Localization-> Translations - > Modify translations choose Installed module translations and press the flag.

If you still need override the controller, as it is merged by Prestashop during module installation, it is necessary to uninstall Productcomments and then install again, otherwise the controller rewrite won't be processed.

 

Best regards.

Link to comment
Share on other sites

Hello,

thanks for Your advice, but translations for productcomments are not displayed correctly (PS 1.5.2), this is why i said it's a bug. So i wan't to override the module with my code that displays the translations. You can see my original topic about translating comments here:

http://www.prestashop.com/forums/topic/215467-solved-problem-with-translating-product-comments-module/page__p__1064147#entry1064147

 

thanks again, bye.

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