Is your feature request related to a problem? Please describe.
The new method for creating themes and the ability to set everything up with the theme.yml file is great. It has alot of flexibility combined with the new widget based system. However, it would be really great if one could regenerate the theme.yml somehow.
Let's say I start out making a theme. I make my changes, add a few hooks, swap some modules out or change the positioning of modules in the theme.yml file. It all works fine. However, chances are I or a client/customer makes some modifications. Perhaps they change the position of a few modules in the displayTop hook. Perhaps they disable a module, change the layout on some pages.
Here's the issue with this: If they for whatever reason need to reinstall that theme, all those changes will be lost. If they activate another theme which they don't like, maybe they switch hosting provider and need to reinstall/reactivate it etc. All changes will be lost.
Describe alternatives you've considered
Now, generating the entire theme.yml will probably never work. They key area(s) that would be great to either regenerate or simply get a list of somehow, would be the modules section. What modules are active in the current theme, what modules are inactive, and where are they hooked.
This could probably be done manually with some sort of database search/query but it would be really nice to have some sort of button/action for it in the theme controller. Something along the lines of "Export current theme configuration".
It would be a great QoL addition.
Hi @dennispw,
Thanks for your report.
Yes, It could be an improvement issue.
@marionf, @colinegin what do you think?
In my case, after some modifications ( edit layout, edit positions), I tried to export the theme & import this theme to another shop but the changes are not saved.
I attached a video record.
https://drive.google.com/file/d/1y6ha6kynxQ5e1Lo-gJc6LXETDOFZsT3n/view
Thanks!
For clarity, I believe the following parts are the most "crucial":
modules:
to_enable:
...
to_disable:
...
hooks:
customHooks:
...
modules_to_hook:
...
Either way, regenerating the entire theme.yml would be really great but for obvious reasons it's not very realistic. But the above should be the most crucial parts, at least in our case.
@eternoendless @PrestaShop/prestashop-core-developers what do you think ?
Any update?
What about "config/themes/THEME/shop*.json" file?
+1
This is a great idea.
Are there any news?
Hi, if the feature interest a lot of theme developers, it can be done.
Feel free to create a pull request :)
Most helpful comment
For clarity, I believe the following parts are the most "crucial":
Either way, regenerating the entire
theme.ymlwould be really great but for obvious reasons it's not very realistic. But the above should be the most crucial parts, at least in our case.