kanasaikuat Posted January 6, 2015 Share Posted January 6, 2015 Hi guys, sorry if this is a common question but i can't found any answer via google search. May i know what is the purpose of "$this->active" in most of the module? I saw alot of this lines of code, but i have no idea what is the purpose. if (!$this->active){ ....code here.... } Link to comment Share on other sites More sharing options...
Richard S Posted January 6, 2015 Share Posted January 6, 2015 I think this is left from older version. I would need to double check, but it was used earlier in hooks to execute module hook only if module is active. I think that now PrestaShop checks on their side if module is active and only then executes the hook. $this->active mainly checks if module is enabled in store. Link to comment Share on other sites More sharing options...
CartExpert.net Posted January 6, 2015 Share Posted January 6, 2015 Hi. It is used to check whether the module is enabled or disabled. Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
kanasaikuat Posted January 6, 2015 Author Share Posted January 6, 2015 Thanks alot guys 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