Jump to content

Easy way to get Order Details


Chillax86

Recommended Posts

Does any one know how to easily get the order details, i.e is there an object that loads the order details ready to be used in my script.

 

looking for something like

 

$order = new Order((int)$params['id_order']);

 

It needs to hold product name, quantity, unit price, ex vat prices and incl prices. I can code this myself and get it out of the database but I'd thought I'd check if this is already included in the core programming.

Link to comment
Share on other sites

Does any one know how to easily get the order details, i.e is there an object that loads the order details ready to be used in my script.

 

looking for something like

 

$order = new Order((int)$params['id_order']);

 

It needs to hold product name, quantity, unit price, ex vat prices and incl prices. I can code this myself and get it out of the database but I'd thought I'd check if this is already included in the core programming.

that is exactly how you  would do it

Link to comment
Share on other sites

  • 10 months later...
  • 3 years later...
  • 5 years later...

There is $cart object, you can access it in controller

$order = $params['objOrder'];

but to get products info from $order - there is a function:

$products = $order->getProducts();

and then you can loop through products:

foreach ($products as $orderedProduct) {
...
}

 

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