Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2019
    Location
    UK
    Posts
    70
    Plugin Contributions
    0

    Default Checking if a download file exists

    Hi All

    We have had a lot of trouble with various web hosts and so have been migrating our data to one that works well.

    The problem I forsee is that if we get the data named incorrectly then it will show as unavailable to our end users. I would like to be able to go through the products table and display (print) anything that does not appear on the new server's download folder. For instance if we named a download file as BOOK_AB.epub but the original file on the old server was BOOK_AB.zip then that is what would be recorded in the table.

    We have already overcome finding data by modifying the products display script by checking does the download field say zip - yes - then on old server and we get an email saying it needs to be migrated. If not then it displays the download link to the new server - nothing to be done.

    Is there an addon or a simple script that can go through the database - take the download link and see if it exists on the new server?

    Thanks in advance

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Checking if a download file exists

    There's something similar for images, I can recall what it's name is, but it seems like changing the field/table information and associated filepath would support obtaining the same/necessary information. Not sure if it is a missing images plugin or extra images or something like that.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Checking if a download file exists

    Just go to Admin > Catalog > Downloads Manager. Files that have a green icon are ok; files that have a red icon are missing.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Oct 2019
    Location
    UK
    Posts
    70
    Plugin Contributions
    0

    Default Re: Checking if a download file exists

    Quote Originally Posted by swguy View Post
    Just go to Admin > Catalog > Downloads Manager. Files that have a green icon are ok; files that have a red icon are missing.

    Ah right. So that will still point to the original server so I guess I need to modify that script to take the book name - add in .epub and .mobi pointing to the new server.

    Will give that a try

    Thanks

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Checking if a download file exists

    Since you are already moving things, you may wish to consider moving your download folder out of public_html (for security):

    https://docs.zen-cart.com/user/secur...wnload_folder/
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. v151 No Download Links Provided to Customers When Checking Out
    By Besters in forum PayPal Express Checkout support
    Replies: 7
    Last Post: 30 Jul 2014, 02:59 PM
  2. v151 Target File Already Exists:\includes\modules\pages\payer_auth_verifier\header_php.php
    By EdsGoodStuff in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 21 Dec 2012, 04:27 PM
  3. checking out , then reciving download links?
    By Candice in forum Managing Customers and Orders
    Replies: 1
    Last Post: 4 Jun 2006, 10:46 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR