Muhammad Hamza Posted June 17, 2019 Posted June 17, 2019 I am developing a module in PrestaShop, I have to call an API, I have achieved call on new/update/delete product, but now I want to have new order call. I am using 1.6 so I just need to fields. This is my module code public function hookNewOrder($order){ $data=[ 'shipping_data'=>'', 'shipping_time'=>'', 'greetings'=>'', 'recipient_name'=>'', 'phone'=>'' ]; $response = Requests::post('https://izer.co.il/crm/product_api.php',[],json_encode($data)); file_put_contents(_PS_MODULE_DIR_ . $this->name .'/log.json',json_encode($response,JSON_PRETTY_PRINT)); } I just want to correctly filled order details in data array. Everything else is working fine, I do not exactly know what will be the nature of $order object passed to this method. Share this post Link to post 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