Update all previous orders with new attributes for new download links
Hi,
I am running 1.39h. I have a webstore that sells ebooks. Previously we sold each product in 5 different formats, and customers chose which to download. Now with the new EU VAT laws, however, we zipped all the formats into one file.
I want to delete the old files off my server and only keep the new zip files up. All the ebooks have been updated with new attributes linking to the new files.
What I want to know is if there is a way to maybe go into phpMyAdmin and change the existing orders so they link to the new zip file instead of to the old individual ebook files. I tried to do it on a few orders through the orders_product_download table, but there was no download link in the customer's order history. I don't know if the orders_products_download_id or orders_product_id has to match something else? The numbers all look unique to me.
I also tried using the Edit Orders plugin, but it didn't work. It will let me edit the line items on the order but not the actual attributes.
Any help would be nice.
Thanks!
Re: Update all previous orders with new attributes for new download links
Quote:
Originally Posted by
jmsnyder23
... I want to delete the old files off my server and only keep the new zip files up. All the ebooks have been updated with new attributes linking to the new files.
What I want to know is if there is a way to maybe go into phpMyAdmin and change the existing orders so they link to the new zip file instead of to the old individual ebook files. I tried to do it on a few orders through the orders_product_download table, but there was no download link in the customer's order history. I don't know if the orders_products_download_id or orders_product_id has to match something else? The numbers all look unique to me. ...
You will probably need to adjust "orders_products_attributes" replacing the old attribute / option / option value id's with the new ones. Could probably craft some SQL statements to change these en masse.
Just a friendly reminder: make a backup of the database before attempting to modify the database directly!
Quote:
... I also tried using the Edit Orders plugin, but it didn't work. It will let me edit the line items on the order but not the actual attributes. ...
The current version of Edit Orders (4.1+) does support changing the product attributes (as long as BOTH the old and new attributes still exist). Edit Orders 4.1+ does require Zen Cart 1.5+ (so would require an upgrade
). Although with the new version editing old orders is not recommended (as order totals are recalculated - so if the order totals have changed... Or shipping modules have changed... etc).