Jump to content

Getting Invoice & Delivery Address From An Order


ianditch

Recommended Posts

Hi All,

We've had a problem recently where a part order was missed... This has happened a couple of times now.

I might write myself a simple CMS system myself which would be totally independent form Prestashop to allow me to monitor orders which have been shipped and which orders still have items which are yet to be shipped.

To do this, i've been looking into the crazy Prestahop database structure and its not simple to understand. I plan to connect to the Prestashop database from a remote website and query this as needed. I'll then pull order details into a totally separate database and use this in my own CMS.

I can see order details in PREFIX_orders and the associated products in PREFIX_order_detail which is fine and i can work with this.

The issue i have is that i can't see how to get the delivery and invoice address which is associated with an order.

 

Customer address details are stored into the PREFIX_address table but i can't see how to correctly grab the correct delivery & invoice address for the order. I hope that makes sense?

 

proposed steps;

1) Goto PREFIX_orders and grab the id_order and id_customer.

2) Get the details from PREFIX_order_detail for which products are included in this sale. These 2 steps are simple enough.

3) Get the delivery and invoice addresses for this sale. <-its this bit i'm struggling with!

 

I know this is all a bit long winded and i'm only looking at options at the moment but i should be able to write something which will really help us out.

Any help or guidence with this would be appricated.

 

Ian

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

  • 1 year later...

@Ress, I tried to find these 

Quote

id_address_delivery and id_address_invoice id's

fields in a v1.6.0.8 Database and unfortunately, I don't find any of these in there. Can you give me an hint into that as well. I am challenged with to separate Billing and Shipping Addresses of the Customers, and only find one 'Alias' field which may well be giving an incite into BUT am not sure and am not able to make any sense out that either?

Any tip?

Thanks

Link to comment
Share on other sites

5 hours ago, tanmalik786 said:

@Ress, I tried to find these 

fields in a v1.6.0.8 Database and unfortunately, I don't find any of these in there. Can you give me an hint into that as well. I am challenged with to separate Billing and Shipping Addresses of the Customers, and only find one 'Alias' field which may well be giving an incite into BUT am not sure and am not able to make any sense out that either?

Any tip?

Thanks

These are fields of the ps_orders table. 

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