Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2010
    Posts
    117
    Plugin Contributions
    0

    Default Open Downloads in new window

    HI,

    I have successfully been able to add (free) Digital downloads to my Webshop.

    Everything works great, except that I would like the downloads to open in a new window, so that when a customer closes the download window, it doesn't close my store as well.

    Am I missing something in the set up of downloads, or is this option not available?

    I have searched the forum for recent posts to my question and haven't been able to find any, so hope someone can help me, or at least point me in the right direction.

    I am using version 1.3.9h.

    Thank you in advance for your help.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Open Downloads in new window

    I think you're seeing something that the rest of us don't see.

    What exactly is on the "download window" screen that makes you think they'll want to "close" it?
    Normally, in a properly running shop, there is no "download window" that would tempt them to close it. The screen doesn't change ... it just starts the download while leaving your store fully intact, and obviously looking like your store.

    Please click Reply below and answer all the questions in the Posting Tips section on that page.
    .

    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.

  3. #3
    Join Date
    Nov 2010
    Posts
    117
    Plugin Contributions
    0

    Default Re: Open Downloads in new window

    Hallo,

    Thank you for replying.

    As I have never seen or done a digital download with Zencart, I had no way of knowing how it should work.

    I don't really understand the technical side of this, and so not really sure what other info to give

    I set up the download as per instructions with a video. The downloads are PDF files.

    After placing order for the DL, there is a text that says:

    To download your files click the download button and choose "Save to Disk" from the popup menu.

    I think this is where my downloads go wrong??

    If I click on the *Download* button then I don't get a pop up window that prompts to Save to Disk.. it simply opens a whole new window (link), which shows the PDF download.

    This is what the new link looks like...

    ww.REMOVED/webshop/pub/.zjbgvmyhjcnpiwlkuyi/a725_free.pdf

    As I said in my first post, if we close this window, it also closes my site. The only way of going back is using the back button or logging back into the shop.

    I hope this makes sense, as I don't really know what other info to give, or explain it differently.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Open Downloads in new window

    I'm guessing you don't have this problem when downloading .zip or other file formats.

    Your computer has been set up to open PDF files directly in the browser, hence the behavior you're experiencing.

    You might be able to get around this by editing your /pub/.htaccess file, changing the following:
    Code:
    # but now allow just *certain* necessary files:
    <FilesMatch ".*\.(zip|ZIP|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV)$">
      Order Allow,Deny
      Allow from all
      
      # tell all downloads to automatically be treated as "save as" instead of launching in an application directly
      # (just uncomment the next 2 lines by removing the '#'):
    #  ForceType application/octet-stream
    #  Header set Content-Disposition attachment
    </FilesMatch>
    to this instead:
    Code:
    <FilesMatch ".*\.(zip|ZIP|gzip|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV|wav|epub)$">
      Order Allow,Deny
      Allow from all
    </FilesMatch>
    
    <IfModule mod_headers.c>
      <FilesMatch ".*\.(zip|ZIP|gzip|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV|wav|epub)$">
        # tell all downloads to automatically be treated as "save as" instead of launching in an application directly
        # ALERT: ForceType requires Apache2 or later. If using older version of Apache, it will need mod_mime installed. Or just comment out the ForceType line below
        # (to disable, just comment the next 2 lines by adding a '#' at the beginning of each):
        ForceType application/octet-stream
        Header set Content-Disposition attachment
      </FilesMatch>
    </IfModule>
    .

    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.

  5. #5
    Join Date
    Nov 2010
    Posts
    117
    Plugin Contributions
    0

    Default Re: Open Downloads in new window

    THANK YOU.... problem solved :)

    For now I have just saved the files as ZIP and it now works as described.

    I will also try by editing the text you have given me, but for now I am happy it works as is :)

    Thank you once more :)

 

 

Similar Threads

  1. v154 Can I make my image links open in the same window rather than a new window?
    By cpmacg in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 15 Apr 2015, 08:59 PM
  2. privacy to open in a new window
    By karen in forum General Questions
    Replies: 1
    Last Post: 16 May 2008, 02:38 PM
  3. Open file in a new window (PDF)
    By nanosafeguard in forum General Questions
    Replies: 1
    Last Post: 6 Jul 2007, 03:02 AM
  4. Open file in a new window (PDF)
    By nanosafeguard in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 6 Jul 2007, 02:58 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