Jump to content

RomsWebDesign

Members
  • Posts

    48
  • Joined

  • Last visited

Community Answers

  1. RomsWebDesign's post in [Solved] Check if module is activate was marked as the answer   
    Exactly.
     
    I have solved my issue.
    I do that and it seems to work.
    /** * Desactivate current module. * * @param bool $forceAll If true, disable module for all shop */ public function disable($forceAll = false) { // Disable module for all shops parent::disable($forceAll); if(!$this->isEnabled()) parent::uninstallOverrides(); } /** * Activate current module. * * @param bool $forceAll If true, enable module for all shop */ public function enable($forceAll = false) { if(parent::enable($forceAll)) parent::installOverrides(); }
  2. RomsWebDesign's post in [Résolu] Verifier si un module est actif avant l'installation des overrides controller was marked as the answer   
    Merci pour tes réponses.
     
    En cherchant un peu dans la classe Module j'ai enfin trouvé comment faire.
    Dans la classe de mon module j'ai fait ceci.
    /** * Desactivate current module. * * @param bool $forceAll If true, disable module for all shop */ public function disable($forceAll = false) { // Disable module for all shops parent::disable($forceAll); if(!$this->isEnabled()) parent::uninstallOverrides(); } /** * Activate current module. * * @param bool $forceAll If true, enable module for all shop */ public function enable($forceAll = false) { if(parent::enable($forceAll)) parent::installOverrides(); } Je sais pas si c'est la meilleure façon de le faire mais ça fonctionne.
×
×
  • Create New...

Important Information

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