juanmlg Posted April 9, 2019 Share Posted April 9, 2019 Hello, I have a question. We have been using our store without producs references, now we have update all the products with a reference, but we have noticed that the old orders dont have the reference (when we download the delivery slip the reference loks --- ) so seems that $order_detail.product_reference is empty. How we can update the $order_detail.product_reference with all the references for all old orders? Regards Link to comment Share on other sites More sharing options...
musicmaster Posted April 9, 2019 Share Posted April 9, 2019 The only way is to write your own php/mysql routine. In pseudo code that would be something like: select * from ps_product foreach(product) update ps_order_detail set reference = product.reference where id_product=product.id_product Link to comment Share on other sites More sharing options...
juanmlg Posted April 9, 2019 Author Share Posted April 9, 2019 1 hour ago, musicmaster said: The only way is to write your own php/mysql routine. In pseudo code that would be something like: select * from ps_product foreach(product) update ps_order_detail set reference = product.reference where id_product=product.id_product Thanks for your reply! That sound so good, my sql skills are limited so would be amazing if someone can give me the exact sql sentence. Regards! 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