Jump to content

Update old orders product's reference


juanmlg

Recommended Posts

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

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

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