Jump to content

Show label "Update available" and "upgrade" module function


venditdevs

Recommended Posts

For our module we want to show the users that there is an update available of our module.

 

I've made a function that returns me the version number if there is an update available. So far so good...but..

 

What i want to display in the module list is in the attachment and a warning that the modue needs to be updated . $this->warning currently only displays the warning occasionally.

 

Thanks in advance

post-790762-0-37289400-1403086138_thumb.jpg

Link to comment
Share on other sites

I wanted to bypass that :) It should be possible to flag.

 

But i still have the problem that sometimes the warning i've set shows up...and then refreshing the page the warning on the module disappears ...to re-appear  whenever it wants to, it's no cache issue.

Link to comment
Share on other sites

If i change something in the __construct of the module then the values set in the __construct are set and placed in the config.xml. The warning is displayed to in the top of the page.

$this->warning is passed to be displayed

 

If i refresh the module page it seems the data is loaded from the config.xml and $this->warning is not passed to be displayed even though it's set in the __construct part of the module

 

example what is in my module for testing

__construct(){

      $this->warning = $this->l('Test warning'); //set first or last , it doesn't matter

      parent::__construct();

}

 

First time i call the module list when i've changed something it's set. Every page visit after that ..it's not.

 

Hopefully it's clear

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