Forums / All Other Contributions/Addons / Delete Uploaded files when order is deleted

Delete Uploaded files when order is deleted

Locked

Views: 845

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
2 Dec 2010, 12:26 AM
#1
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Delete Uploaded files when order is deleted

Hi,

is there a way to have the customers uploaded files deleted from the server when the order is deleted? We are using the upload attribute but i can see a problem with the files bulding up on the server.

Thanks Zen gurus!

2 Dec 2010, 12:29 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Delete Uploaded files when order is deleted

As you must download these files to fulfill the order, you have them locally

I would save them locally for XX period, but once downloaded they can be removed from the server
Maybe at the same time as when you download them

Zen-Venom Get Bitten

2 Dec 2010, 1:03 AM
#3
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Delete Uploaded files when order is deleted

Thanks,
I am using the mod - "Customer Uploaded Files - List and Download" which lets admin download the file from a link without them needing to use FTP. So i am trying to avoid admin needing to use FTP to delete the images as well. If the order image(s) could be deleted when the order is deleted would solve this problem.

Cheers.

2 Dec 2010, 1:14 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Delete Uploaded files when order is deleted

I am using the mod - "Customer Uploaded Files
If that feature is not builtin to the module, one would have to custom code it to do so

Zen-Venom Get Bitten

2 Dec 2010, 2:11 AM
#5
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Delete Uploaded files when order is deleted

Thats not built into the module but the image upload is part of zencart.
An uploaded image is linked to an order so there must be a way to have the linked image deleted when the order is deleted?

2 Dec 2010, 2:16 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Delete Uploaded files when order is deleted

An uploaded image is linked to an order so there must be a way to have the linked image deleted when the order is deleted?
Yes but as not yest a feature it will require custom code it to do so

Zen-Venom Get Bitten

2 Dec 2010, 2:39 AM
#7
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Delete Uploaded files when order is deleted

Any idea where the delete an order code is? Or where the cusstom code would need to go?

2 Dec 2010, 6:08 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Delete Uploaded files when order is deleted

It would likely be called by /admin/orders.php, since that's the name of the file you see in your browser when the delete button is presented to you.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.