ianditch Posted March 6, 2022 Share Posted March 6, 2022 (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 March 6, 2022 by ianditch (see edit history) Link to comment Share on other sites More sharing options...
Ress Posted March 6, 2022 Share Posted March 6, 2022 Hi, In the orders table you have id_address_delivery and id_address_invoice id's, which you can find in address table. 1 Link to comment Share on other sites More sharing options...
ianditch Posted March 6, 2022 Author Share Posted March 6, 2022 Thanks Ress, I've looked for that for hours and its right there in front of me! Thanks for your help. Top Man 😉 1 Link to comment Share on other sites More sharing options...
tanmalik786 Posted April 15, 2023 Share Posted April 15, 2023 @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 More sharing options...
musicmaster Posted April 15, 2023 Share Posted April 15, 2023 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now