G_Angel 0 Posted March 4, 2012 Bonjour, j'aimerais faire appel a un webservice lorsqu'une commande est validée dans prestashop mais je ne trouve pas l'endroit pour le faire. (OrderController.php ?) Est-ce que quelqu'un aurait une idée ? Complément : Pour y faire appel, j'ai besoin des informations du customer, de l'entête de la commande et du détail. Merci d'avance pour votre réponse. Share this post Link to post Share on other sites
G_Angel 0 Posted March 4, 2012 Peut-être une solution ? Utilisation du hook Neworder ? http://www.prestashop.com/forums/topic/141036-hook-neworder-vs-orderconfirmation/ Share this post Link to post Share on other sites
G_Angel 0 Posted March 4, 2012 suite... <!--?php if ( !defined( '_PS_VERSION_' ) ) exit; class logistics extends Module { public function __construct() { $this--->name = 'logistics'; $this->tab = 'Logistics'; $this->version = 1.0; $this->author = 'Fauquet Geoffrey'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l( 'Logistics' ); $this->description = $this->l( 'Gere l\'importation a partir de Logistics.' ); } public function install() { if (!parent::install() OR !$this->installDB() OR !$this->registerHook('newOrder') OR !$this->registerHook('paymentConfirm') OR !$this->registerHook('OrderDetail') ) { return false; } return true; } public function hookNewOrder($params) { $fp = fopen('c:\\temp\\test.txt', "w+"); fwrite($fp, 'test'); fclose($fp); } } ?> J'ai essayé ceci mais sans succès... Share this post Link to post Share on other sites
luci1 9 Posted March 6, 2012 Bonjour, L'installation de ton module s'est bien passée ? Car tu n'as pas de fonction installDB() dans ton module donc tu aurais du avoir un message d'erreur normalement. Share this post Link to post Share on other sites
G_Angel 0 Posted March 6, 2012 Oui, il est bien installé... en fait, j'ai eu un écran blanc puis j'ai fait un refresh et là, j'ai vu que c'était bien installé. Share this post Link to post Share on other sites
G_Angel 0 Posted March 7, 2012 MAlheureusement, j'en suis toujours au même stade... Si quelqu'un a une idée Share this post Link to post Share on other sites