Andrej Stas Posted September 20, 2016 Share Posted September 20, 2016 (edited) I wanted to override /override/controllers/admin/templates/ folder, but it doesn't seem to be overridden after the module installation, this was working with PS 1.6.x fine Any comment please? Edited September 21, 2016 by Andrej Stas (see edit history) 1 Link to comment Share on other sites More sharing options...
eleazar Posted September 21, 2016 Share Posted September 21, 2016 Depends on the part of the BO where you want to make this work. Maybe this helps: http://build.prestashop.com/news/prestashop-1-7-faq/#can-developers-still-use-overrides-in-17 1 Link to comment Share on other sites More sharing options...
Andrej Stas Posted September 21, 2016 Author Share Posted September 21, 2016 (edited) Let me explain the situation in more details: I created a new item in the menu in the back office using Tab class, everything seems to work correctly. But as I'm developing a module for PS 1.7, I'd like the templates to be within my module views (if that's possible), I found out that I could do it with override easily. All I need is to create some folders and files in this path /override/controllers/admin/templates/ to be working fine. So I created the same path in my module with needed folders/files as we do actually in any module that uses overrides. But when I install the module I can't see those folders/files there, as PS couldn't copy/paste them. What do you think? Edited September 21, 2016 by Andrej Stas (see edit history) 1 Link to comment Share on other sites More sharing options...
eleazar Posted September 21, 2016 Share Posted September 21, 2016 As far as I know from 1.6 on just creating the same path in your module doesn't work any longer. I'm afraid you have to copy and paste the overrides directly to the standard override folder, in this case /override/controllers/admin/templates/... to make it work. Link to comment Share on other sites More sharing options...
Andrej Stas Posted September 21, 2016 Author Share Posted September 21, 2016 As far as I know from 1.6 on just creating the same path in your module doesn't work any longer. I'm afraid you have to copy and paste the overrides directly to the standard override folder, in this case /override/controllers/admin/templates/... to make it work. I see, so is it already a normal procedure in Prestashop to ask users to copy overrides of modules manually? Link to comment Share on other sites More sharing options...
Andrej Stas Posted October 20, 2016 Author Share Posted October 20, 2016 Could somebody from developers drop a short comment on this, please? If this functionality will not be included in Prestashop, we will need to add it manually anyway. Link to comment Share on other sites More sharing options...
Andrej Stas Posted October 30, 2016 Author Share Posted October 30, 2016 Could anyone please confirm, that I cannot use /override/ folder in my modules, so that the files would be copied to the PS /override/ automatically during installation? Link to comment Share on other sites More sharing options...
eleazar Posted October 30, 2016 Share Posted October 30, 2016 Could anyone please confirm, that I cannot use /override/ folder in my modules, so that the files would be copied to the PS /override/ automatically during installation? Hello Andrej, there's no separate confirmation by the developers necessary, if you just read carefully: http://build.prestashop.com/news/module-development-changes-in-17/#overrides-and-namespaces "overrides are currently forbidden in the Symfony-based pages (namely, the Product page and the Modules page) [...] that the developer team would integrate your needs for overrides in the next version of PrestaShop – kind of what polyfills do for HTML5 features In short, you tell us what you need, and while we include it in the next version, you can use an override." Which means: Currently it's not allowed, but ... perhaps ... if the protest is loud enough ... the developers will ... maybe ... reintegrate it. 1 Link to comment Share on other sites More sharing options...
Andrej Stas Posted October 30, 2016 Author Share Posted October 30, 2016 Hello Andrej, there's no separate confirmation by the developers necessary, if you just read carefully: http://build.prestashop.com/news/module-development-changes-in-17/#overrides-and-namespaces Which means: Currently it's not allowed, but ... perhaps ... if the protest is loud enough ... the developers will ... maybe ... reintegrate it. Ah, I see! Thank you Eleazar, I didn't realize it Link to comment Share on other sites More sharing options...
Andrej Stas Posted October 31, 2016 Author Share Posted October 31, 2016 The problem seems to be ONLY WITH TPL files, PHP files are copied to override folder correctly. TPL files are ignored. 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