Thread: Creating Popups

Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Mar 2009
    Location
    Cornelius, NC
    Posts
    334
    Plugin Contributions
    0

    Default Re: Creating Popups

    I assume it doesn't matter where I put the pop up files
    if by this you mean the jscript files... you MUST put them in the jscript folder...

    if you mean does it matter where you put the code that has the link and the "=rel console ....." no, you can put that most anywhere...

    Also by {template_directory} do you mean my custom template
    YES! that is correct! :)

  2. #12
    Join Date
    Sep 2007
    Location
    Herne Bay, Kent, England
    Posts
    182
    Plugin Contributions
    0

    Default Re: Creating Popups

    Quote Originally Posted by customk1 View Post
    if by this you mean the jscript files... you MUST put them in the jscript folder...

    if you mean does it matter where you put the code that has the link and the "=rel console ....." no, you can put that most anywhere...


    YES! that is correct! :)
    Excellent, thanks very much. Yep, by popup files I mean the actual content of the popup.

    I'll keep you posted!!

    All the best

    Philip

  3. #13
    Join Date
    Sep 2007
    Location
    Herne Bay, Kent, England
    Posts
    182
    Plugin Contributions
    0

    Default Re: Creating Popups

    Aaah - now I understand!

    Many thanks

    Philip

  4. #14
    Join Date
    Aug 2008
    Posts
    41
    Plugin Contributions
    0

    Default Re: Creating Popups

    Quote Originally Posted by customk1 View Post
    phillip,
    you're still making it too complicated! :)

    i think you're getting confused by trying to combine directions from the perfect popup website, and zencart.

    just follow my directions that i posted as my last post, namely:

    1. DONT put the files in your "main_page" folder, follow the zencart directions here:



    which means, change the two file names from:
    add-event.js
    popup.js

    to:
    jscript_add-event.js
    jscript_popup.js

    and add them to your "includes/templates/{template_directory}/jscript/ " folder

    2. DONT use this on any page: (delete it!)

    it is not needed!

    3. what you wrote as code for the actual link should be correct! just need to put the jscript files in the correct location, and disregard the code you put at the top of the page.

    let me know how it goes!

    This is all correct... but you must also add a custom "tpl_modules_main_product_image.php" file in your custom template directory, so that the anchor link for the product image generates the popup.

    Replace the following line:
    Code:
    document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
    with this line:
    Code:
    document.write('<?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" rel="popup">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
    you may also fix the anchor link between the <noscript> tags, just add rel="popup" after target="_blank".

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. disable popups
    By tcjay in forum General Questions
    Replies: 0
    Last Post: 19 Oct 2010, 12:28 PM
  2. Popups
    By ChrystiLell in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Mar 2010, 03:30 PM
  3. create popups
    By balihr in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Dec 2009, 12:47 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