franklinfs Posted November 4, 2013 Share Posted November 4, 2013 Hi I am crating a prestashop module. When the customer click "I confirm my order" in front end, i want the order details in my module. How do i get these details..! Prestshop version is 1.5.4.1 Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted November 4, 2013 Share Posted November 4, 2013 Hi, I think you are looking "actionValidateOrder" hook Regards 1 Link to comment Share on other sites More sharing options...
franklinfs Posted November 4, 2013 Author Share Posted November 4, 2013 (edited) ok i register the hook !$this->registerHook('actionValidateOrder') then how can i get the details in public function hookActionValidateOrder($param) { } Edited November 4, 2013 by franklinfs (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 check $params['order'] variable Link to comment Share on other sites More sharing options...
franklinfs Posted November 5, 2013 Author Share Posted November 5, 2013 (edited) Hi Got it... public function hookActionValidateOrder($params) { $details = $params['order']; echo "<pre>"; print_r($details); echo "<pre>"; } Thank you ! Edited November 5, 2013 by franklinfs (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 5, 2013 Share Posted November 5, 2013 that's correct im going to mark this thread as [solved] with regards, Milos Link to comment Share on other sites More sharing options...
karthiiiiiiiiiik Posted December 5, 2013 Share Posted December 5, 2013 i have tried public function hookActionValidateOrder($params) { $details = $params['order']; echo "<pre>"; print_r($details); echo "<pre>"; } it is not printing out the order details... how to get the details like product name,price etc.. specifically. Link to comment Share on other sites More sharing options...
vekia Posted December 5, 2013 Share Posted December 5, 2013 hello action hooks aren't visible if you want to see output use die(); at the end of the function code then you will see print_r(); command output Link to comment Share on other sites More sharing options...
karthiiiiiiiiiik Posted December 6, 2013 Share Posted December 6, 2013 (edited) Thank you, I have to fetch only reference , and total paid amount how to get these details and i need to assign this values to a variable..? and how to print that array variables whether i can use foreach to print the values.. Edited December 6, 2013 by karthik who_am_i (see edit history) Link to comment Share on other sites More sharing options...
karthiiiiiiiiiik Posted December 9, 2013 Share Posted December 9, 2013 i have got the order details... thank you vekia Link to comment Share on other sites More sharing options...
GeroDolja Posted December 23, 2014 Share Posted December 23, 2014 Could you post the complete solution that you got? I need to assign them to variables too. Link to comment Share on other sites More sharing options...
hirasingh Posted May 17, 2016 Share Posted May 17, 2016 Hi, I am new in prestashop. I am using prestashop version 1.6.1.3. hookActionValidateOrder not working for me. I am giving you an example what I am doing. class demo extends Module { public function install() //actionValidateOrder { if (!parent::install() || !$this->registerHook('updateOrderStatus') || !$this->registerHook('actionValidateOrder')) return false; return true; } public function hookActionValidateOrder($params) //This is not working. { error_log("Order created"); } public function hookUpdateOrderStatus($params) //This is working fine { error_log("Order Status Changes"); } } Link to comment Share on other sites More sharing options...
Recommended Posts