Jump to content

desactiver produit


Recommended Posts

Salut,
Le hook productOutOfStock est là pour ça , un simple module de base souscrivant peut faire ce que tu souhaites :
(voir tutos sur la création de modules)

mais en gros un truc dans le genre

        public function install()
   {
       if (!parent::install() OR !$this->registerHook('productOutOfStock') )
                   return false;
   }

   public function hookProductOutOfStock($params)
   {
       $params['product']->active=0;
       $params['product']->update();
   }

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...