Jump to content

Getting Invoice & Delivery Address From An Order


ianditch
 Share

Recommended Posts

Posted (edited)

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)

Share this post


Link to post
Share on other sites

Hi,

In the orders table you have id_address_delivery and id_address_invoice id's, which you can find in address table.

  • Like 1

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More