fredohavre76 Posted March 22, 2011 Share Posted March 22, 2011 bonjourje suis a la recherche d'un module de désactivation automatique de produit quand stock = 0 ou le changement dans un fichier merci de me dire la commande ou la mettre merciPrestaShop™ 1.4.0.17 Link to comment Share on other sites More sharing options...
Broceliande Posted March 22, 2011 Share Posted March 22, 2011 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 More sharing options...
fredohavre76 Posted March 23, 2011 Author Share Posted March 23, 2011 vous l'avez pas en fichier ou le nom du module.ou mettre ce code.merci. Link to comment Share on other sites More sharing options...
Broceliande Posted March 23, 2011 Share Posted March 23, 2011 vous l'avez pas en fichier ou le nom du module.ou mettre ce code.merci. Ca non sorry j'ai rien de tout fait. 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