Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2005
    Posts
    286
    Plugin Contributions
    0

    Default 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. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default 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

  3. #3
    Join Date
    Oct 2005
    Posts
    286
    Plugin Contributions
    0

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

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default 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

  5. #5
    Join Date
    Oct 2005
    Posts
    286
    Plugin Contributions
    0

    Default 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?

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default 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

  7. #7
    Join Date
    Oct 2005
    Posts
    286
    Plugin Contributions
    0

    Default 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?

  8. #8
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

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

 

 

Similar Threads

  1. v151 Images deleted when entire category deleted
    By jghogue in forum Customization from the Admin
    Replies: 1
    Last Post: 3 Oct 2013, 04:20 PM
  2. v151 Why are "paypal" table records not deleted when an order is deleted?
    By lat9 in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 14 Apr 2013, 08:44 PM
  3. how to prevent image from being deleted when a product is deleted?
    By denniszc in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 7 Mar 2013, 03:01 PM
  4. New Box Files uploaded - old deleted - now no boxes at all!!
    By Tjekija in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Oct 2011, 12:52 AM
  5. How to delete uploaded files from old orders?
    By benwilliamson in forum General Questions
    Replies: 0
    Last Post: 6 Oct 2009, 05:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg