Jump to content

Call of a Prestashop class in my own module


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...