Thebas57 Posted September 21, 2020 Share Posted September 21, 2020 Hi everyone. I want to develop a system to compare the version of my module with the one already installed on presta. If this one is higher, I want to display an update pop-up to replace the old module with the new one. I specify, this is not an Addon module .... I found no doc ... Thanks have a good day. Link to comment Share on other sites More sharing options...
Kogkalidis Posted September 22, 2020 Share Posted September 22, 2020 Whatever your module may be, distributed by addons.prestashop or not, if you have installed v.1.0.0 and you replace your module files with the respective v.1.0.1 ones, an upgrade button will be displayed next to your module. This is the official procedure. If you want to track and log the updates instances, this is not covered by the core code. 1 Link to comment Share on other sites More sharing options...
Thebas57 Posted September 22, 2020 Author Share Posted September 22, 2020 Super thank you. I need an folder "upgrade" anyway in my pluggin ? Link to comment Share on other sites More sharing options...
Kogkalidis Posted September 22, 2020 Share Posted September 22, 2020 Yeap. And inside files named [whatever]-[version separated with dots].php So lets say upgrade-0.0.2.php function upgrade_module_0_0_2(Module $module) { $module->someReallyCoolStuff(); // Code today, thank me tomorrow, let us become a stronger community the day after tomorrow } Regards, Konstantinos A. Kogkalidis - a PrestaShop g(r)eek ❤️ 1 Link to comment Share on other sites More sharing options...
Thebas57 Posted September 23, 2020 Author Share Posted September 23, 2020 Ok I think I understand it ! Thank you very much have a nice day chief Link to comment Share on other sites More sharing options...
Kogkalidis Posted September 23, 2020 Share Posted September 23, 2020 Please mark the topic as solved (edit the title and add [SOLVED] in the beginning). Check the preferred answer as "the solution" and when any comment helps you - if you like - push the like button. This way you help the helpful content spread around the world. 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