Jump to content

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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 ❤️

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More