jd440 Posted March 28, 2014 Share Posted March 28, 2014 (edited) Hi everyone. I'm looking a way to pass a variable from module to controler. I got in my module public function hookactionValidateOrder($params) { $message_denvoie = array("a" => "orange", "b" => "banana", "c" => "apple"); echo "<hr>print_r module"; print_r($message_denvoie); return $message_denvoie; } I have in the class // Hook validate order $yo = Hook::exec('actionValidateOrder', array( 'cart' => $this->context->cart, 'order' => $order, 'customer' => $this->context->customer, 'currency' => $this->context->currency, 'orderStatus' => $order_status )); echo "<hr>print_r hors-module ==>"; print_r($yo); But The result is: Quote print_r moduleArray ( [a] => orange => banana [c] => apple )print_r hors-module ==>Array Why the second one doesn't print the array but only the word "Array" How Could I get it? Edited March 29, 2014 by jd440 (see edit history) 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