XabierG Posted May 28, 2014 Share Posted May 28, 2014 Hello everyone, I realised Prestashop does not save invoice and delivery data for an order, saving instead id_address_delivey and id_address_invoice. This means a customer could easily change his/her adresses data after making an order, therefore changing the order data and the invoice PDF file. So, I would like to store in the database the adresses data in the moment an order is made, without depending on the data stored in the ps_address table as this could be changed. I thought of overriding the Order object adding the fields for address data, and modifying the invoice template to include the new data. Would this be the best approach? Thanks in advance! Link to comment Share on other sites More sharing options...
tuk66 Posted June 3, 2014 Share Posted June 3, 2014 Addresses have "versions". When you edit an address a copy is created (with new id_address value). This way the old addresses are preserved. See the "deleted" flag in the ps_address table. 1 Link to comment Share on other sites More sharing options...
XabierG Posted June 3, 2014 Author Share Posted June 3, 2014 Exactly, when a customer edits an address is checked to see if it's been used in an order, and if that's the case it creates a copy. Thank you so much for clarifying this!! 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