Forums / Setting Up Categories, Products, Attributes / Update all previous orders with new attributes for new download links

Update all previous orders with new attributes for new download links

Views: 772

Results 1 to 2 of 2
22 Jan 2015, 3:51 AM
#1
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

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!

22 Jan 2015, 10:45 PM
#2
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Update all previous orders with new attributes for new download links

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!

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

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker