Jump to content

Webservice -> Linking information for orders


Reshkil

Recommended Posts

Hi Prestashop community,

 

I am trying to retrieve all the orders in PrestaShop using Webservices and link it together on how I need it before populating a database. 

 

Let me give you an example of what I need:

 

From orders i get:

 

  • The id of the order
  • The id_customer
  • Date_add

From there I need:

  • The products associated with this order, (name, quantities).
  • The addreses 1 & 2 of this orders
  • Carrier name

I know that I can see the product names and quantities on the xml displayed in /api/orders under the <associations> tab, but I can't access them. Is there a way to call them?

 

What I am doing right now is using two dimensional arrays and navigating through each and everyone of the parts I need such as order_details. Is there a simpler way to do it?

 

Can someone please explain the $resources = $xml->children()->children(); syntax on the example files? What is the children() calling to and why is it reffered to twice?

 

Any information is appreciated.

 

Thank you

 

 

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