renaud2263 Posted June 24, 2016 Share Posted June 24, 2016 Hi All, I created my own module with action hooks to execute some functions after order validation (from / back). Here there the concerned hook : public function hookOrderConfirmation($params){ $order = new Order(); $id_order = $order->getOrderByCartId($params['objOrder']['id_cart']); $titre1 = "Test Status ORDER CONFIRMATION order ".$id_order."\n"; $tete1 .= "Content-Type: text/html;charset=\"utf-8\""; mail("[email protected]", $titre1, print_r($params, true), $tete1); } But the call of the Order class gives a 500 error on the confirmation page. If I don't call this class, all is OK. my personnal module extends Module. Is it wrong ? Link to comment Share on other sites More sharing options...
NemoPS Posted June 25, 2016 Share Posted June 25, 2016 In any case, just to understand what was wrong, turn on dev mode (always do when you develop) Link to comment Share on other sites More sharing options...
renaud2263 Posted June 25, 2016 Author Share Posted June 25, 2016 Thanks a lot for your answers. As the id_order is not returned in $params I get it with the id_cart...but I did not know the$context->cookie. Nice ! 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