Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default eBook 'Look Inside' feature?

    We have an eBook store under development. Our default template of course has the 'view larger image' pop up window in the upper left corner of the info display pages... but it's not really enough.

    Most other eBook sites have, in it's place, a 'Look Inside' feature, where one could click on either a thumbnail or text link, and a window would pop up that had some kind of display where one could look at the cover, table of contents, and a couple of sample pages.

    Does anyone have any ideas of how to make something like this work using Zen Cart? Any contributions or Add-ons that might make a difference?

    -KismetDesign

  2. #2
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: eBook 'Look Inside' feature?

    I created a pdf file of the ebook pages I want to display. and then used a popup window in the description to show the pdf file. Using a pdf was the easiest for me because it controlled the formatting and images plus the pages.

    If you can not find any popup code that you like I can supply the one I use.

    Skip
    • 446F63746F722057686F •

  3. #3
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default Re: eBook 'Look Inside' feature?

    Skip, do you by chance have a link that I could look at? Sounds like this might be the simplest solution.

  4. #4
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: eBook 'Look Inside' feature?

    Quote Originally Posted by KismetDesign View Post
    Skip, do you by chance have a link that I could look at? Sounds like this might be the simplest solution.
    I found a place to show you an example. It is only there for the holiday season.
    Code:
    http://www.ccssinc.com/index.php?main_page=product_info&cPath=75&products_id=427
    Skip
    • 446F63746F722057686F •

  5. #5
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default Re: eBook 'Look Inside' feature?

    This would definately be better than what we have now, that's for sure!

    Can you send me what you did? I would super appreciate it.

  6. #6
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: eBook 'Look Inside' feature?

    I just needed a fast and easy way to add a popup window. Any where that I could place a link.

    Just for easy setup I place this file in includes/templates/YOUR_TEMPLATE/common/popup.php
    But you can place it anywhere you want you just have to add the path to the include statment.
    Just copy the code below and save it as popup.php
    PHP Code:

    <?php
    /**
    * popup.php
    * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
    *
    * Standards Compliant Popup Script
    * Author : Kevin Cannon
    * http://www.multiblah.com
    * Last Edited: 12.12.2004
    * Version 1.0
    *
    * SkipWater adapted for zen cart 10.15.09
    *
    * Searches through a document for links with the class popup.
    * When clicked, this link will open in a popup window.
    * This means you don't have to add javascript to your code, 
    * and means the links continue to work, for search engines, 
    * and browsers without javascript.
    *
    */
    ?>

    <script type="text/javascript">

    function initPopups() {

        if (!document.getElementById) return
        var aLinks = document.getElementsByTagName('a');
        for (var i = 0; i < aLinks.length; i++) {        
            if (aLinks[i].className == 'popup') {
                
                aLinks[i].onclick = function() {
                    var url = this.href;
                    openPopup(url);
                    return false;
                }    
            }
        }
    }

    // popupWindow function
    // This is where you set your specific height & width etc... for your popups.

    function openPopup(url) {    
        window.open(url, 'popupwindow', 'width=640,height=500,scrollbars,resizable'); 
        return false;
    }

    // Piggy-back fucntion onto onLoad event
    function addLoadEvent(func) {
      var oldonload = window.onload;
      if (typeof window.onload != 'function') {
        window.onload = func;
      } else {
        window.onload = function() {
          oldonload();
          func();
        }
      }
    }

    addLoadEvent(initPopups);

    </script>
    Add this include link to your includes/templates/YOUR_TEMPLATE/common/html_header.php just before </head> tag.
    PHP Code:
    <?php include("popup.php"); ?>
    To call the popup with a link
    PHP Code:
    <class="popup" href="path_to_it/pdf_file.pdf">A PDF File or any file you want in the popup window</a
    That's it

    Skip
    • 446F63746F722057686F •

  7. #7
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default Re: eBook 'Look Inside' feature?

    Thanks alot!

  8. #8
    Join Date
    Jul 2009
    Location
    Prague, Czech Republic
    Posts
    530
    Plugin Contributions
    0

    Default Re: eBook 'Look Inside' feature?

    Quote Originally Posted by skipwater View Post
    I just needed a fast and easy way to add a popup window. Any where that I could place a link.

    That's it

    Skip
    Hi Skip,

    That works perfectly, thanks for that, you came up with that at just the right time I needed it - very clean and simple too :)

    Is it possible do you (or anyone else) know to have the window resize automatically to the size of the image? That would make this little mod 100% perfect

  9. #9
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: eBook 'Look Inside' feature?

    Is it possible do you (or anyone else) know to have the window resize automatically to the size of the image? That would make this little mod 100% perfect
    Have not needed so have not done. You might find the lightbox mod a better solution to deal with images.

    Skip
    • 446F63746F722057686F •

  10. #10
    Join Date
    Jul 2009
    Location
    Prague, Czech Republic
    Posts
    530
    Plugin Contributions
    0

    Default Re: eBook 'Look Inside' feature?

    Quote Originally Posted by skipwater View Post
    Have not needed so have not done. You might find the lightbox mod a better solution to deal with images.

    Skip
    Okay, thanks for the tip, for future installations I'll bear it in mind, but for this present site I am doing yours is just fine, so thanks again

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v150 ebook download?
    By cyberbaffled in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 4 Apr 2012, 06:59 AM
  2. Ebook Downloads
    By SusanB in forum General Questions
    Replies: 1
    Last Post: 8 Feb 2011, 06:47 AM
  3. How do I change the search feature to look through custom product-type fields?
    By ssmith.cp in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 May 2010, 07:28 PM
  4. Changing look of Specials and Feature Products
    By kevinmc3 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 19 Oct 2007, 05:26 AM

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