Andrej Stas Posted November 9, 2016 Share Posted November 9, 2016 Hi, I'm struggling with this situation: I would like to pack theme + my custom modules into one theme ZIP. Is it even possible? I know it's possible to rewrite .tpl files of native modules in the theme ZIP, but how about importing new modules? Should I ask user to install each module separately? Thank you Link to comment Share on other sites More sharing options...
Daniel Patilea Posted November 9, 2016 Share Posted November 9, 2016 Hi, I'm struggling with this situation: I would like to pack theme + my custom modules into one theme ZIP. Is it even possible? I know it's possible to rewrite .tpl files of native modules in the theme ZIP, but how about importing new modules? Should I ask user to install each module separately? Thank you Yes, you can create a zip file with two folders: modules and themes. The zip should file also contain a xml file with instructions. You can export a theme from your website to see how it looks. Export the theme with some modules checked. When you will install the zip file on a shop you will be prompted to install the included modules in that pack. 1 Link to comment Share on other sites More sharing options...
Andrej Stas Posted November 9, 2016 Author Share Posted November 9, 2016 Yes, you can create a zip file with two folders: modules and themes. The zip should file also contain a xml file with instructions. You can export a theme from your website to see how it looks. Export the theme with some modules checked. When you will install the zip file on a shop you will be prompted to install the included modules in that pack. Thank you Daniel, I will test it soon and update this thread. Have a great day Link to comment Share on other sites More sharing options...
Andrej Stas Posted December 12, 2016 Author Share Posted December 12, 2016 It's not available for Prestashop 1.7 version. It is possible, but Daniel's response was related to Prestashop 1.6, not Prestashop 1.7 Put your modules to this folder: dependencies > modules And define your modules also in "theme.yml" Works very well! 1 Link to comment Share on other sites More sharing options...
Andrej Stas Posted December 13, 2016 Author Share Posted December 13, 2016 Now we can do it. Thank you! Good job! For others: Yes, in theme.yml, you have to add the name of your module under: - dependencies - to_enable and eventually also add your module to appropriate hooks Example: dependencies: modules: - my_module .... global_settings: modules: to_enable: - my_module ... hooks: modules_to_hook: displayTop: - my_module displayHome: - my_module .... 4 Link to comment Share on other sites More sharing options...
roo10 Posted January 7, 2017 Share Posted January 7, 2017 I have a question about translations relating to this subject. I edited few translations related to my theme and module which were saved successfully. How to include those translations within theme package? After editing translations, a folder (fr-FR) was created but its empty. Path: /themes/MyTheme/translations/fr-FR/ Link to comment Share on other sites More sharing options...
roo10 Posted January 9, 2017 Share Posted January 9, 2017 You can translate it in Back Office > Translations. (do not in file) I know about doing translations from Back-office. In fact, I have already done the translations from Back-office. My question is how to include those edited translations within theme package? I want to provide complete theme package to my client along with its translations. As I said earlier, a folder named "fr-FR" is created (Path: /themes/MyTheme/translations/fr-FR/) while editing translations from Back-office, but its empty or doesn't contain any translation file. Taking example of PS 1.6, theme package includes its translations file here: /themes/MyTheme/lang/fr.php 1 Link to comment Share on other sites More sharing options...
ohpasic Posted January 22, 2017 Share Posted January 22, 2017 I know about doing translations from Back-office. In fact, I have already done the translations from Back-office. My question is how to include those edited translations within theme package? I want to provide complete theme package to my client along with its translations. As I said earlier, a folder named "fr-FR" is created (Path: /themes/MyTheme/translations/fr-FR/) while editing translations from Back-office, but its empty or doesn't contain any translation file. Taking example of PS 1.6, theme package includes its translations file here: /themes/MyTheme/lang/fr.php Hi, I also would like to know, how to export already done translations ... Link to comment Share on other sites More sharing options...
Abu Joury Posted July 27, 2023 Share Posted July 27, 2023 The official documentation (and the internet) is void when trying to understand the concept of theme-specific modules. The theme's modules folder is dedicated to overriding the templates and assets of any module. You want to add your theme-specific module in the dependencies/modules folder, then declare it in your theme's configuration (config/theme.yml): dependencies: modules: - yourmodule global_settings: modules: to_enable: - yourmodule When installing your theme from a ZIP file, Prestashop will move the modules contained in this folder. They won't be installed and enabled, this is done when enabling the theme (given that you specified to enable it in your theme's configuration as seen above). Source: https://stackoverflow.com/questions/60773538/cant-get-theme-specific-modules-to-work-in-prestashop-1-7-x 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