Jump to content

[HELP] How to Get order id and Customer mobile number in OrderConfirmationController.php


anishjmc

Recommended Posts

Hi Team,

 

Is there any way to get order id and customer mobile number and assign it to different variables?.

 

Currently am trying to add an sms api which triggers whenever an order is placed.

 

I am able to assign the order total using below code:-

 

$amt = $params['total_to_pay'];

 

but am unable to assign order id and customer mobile number.

 

Please help in sorting this out

Edited by anishjmc (see edit history)
Link to comment
Share on other sites

Is there anyone who knows about this?

 

 

try to deal with:

 

$order = new Order ($params['id_order']);
$customer = new Customer ($order->id_customer);

the you will have $customer object to deal with :-) (address,phone, etc)

  • Like 1
Link to comment
Share on other sites

Hi Vekia,

 

Thanks a lot for your help. But When ever i try adding $order = new Order ($params['id_order']); in order confirmation controller page, am getting a blank page when a user clicks on "I Confirm my Order" button

Link to comment
Share on other sites

where you use that code? can you show an example please?

i use always the same method for my solutions and it works well 

so i suppose that in your case something is wrong

 

don't worry

i will help :-)

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...