Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Posts
    22
    Plugin Contributions
    0

    Default I want to add a popup window code in zencart

    I'm trying to build a popup window link on products in Zencart without having adding a bunch new code to handle it. What I really like to do is duplicate the behavior of admin/popup_image.php page, but from a link on main product page.

    Here is how I planning to make this work.
    Use a "read only" Attribute assigned to product. (DONE)
    The value will determine which popup page to display. (DONE)
    Customize the tpl_modules_attributes.php page to have different behavior if detects special read only attribute. (DONE)

    How to utilize the existing javascript popup window code added to a product page for custom popup window. This is the part I don't understand how it works. Today if you have large images on a product Zencart automatically adds links for popup window of the Larger image. In the admin section on the banner tools page there is a popup icon to preview the banners. I've looked at the code for both popup larger images and popup banners. I'm fairly certain the admin/popup_image.php is what I'm wanting to duplicate.

    After I duplicate/create my own popup_image.php page under includes I'm lost as to how to make Zencart existing javascript on the product pages to tell it to link to custom URL page of my own.

    I know this isn't a great post but please forgive.

    Here is the test page I'm trying this on. The link if for the "View Gloves Size Chart".

    http://www.weekend-racer.com/index.p...products_id=83

    Thanks,
    Steven

  2. #2
    Join Date
    Sep 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: I want to add a popup window code in zencart

    Creating a popup looks like creating a new page in zencart (just copy and rename the popup_image directory in the module directory and in your template directory - you can copy it from the default template into your own, then copy and rename the tpl_popup_image_default.php file from the template default directory into your own template directory -- renaming all the 'popup_image's to 'popup_glove_sizes' for example).

    Once all that is done (if anything was unclear, there is a page on the zencart wiki describing how to do this exactly, I'm just assuming you know more or less...), then you can navigate to this popup by 'index.php?main_page=popup_glove_sizes' , this is exactly the address you will want to use for conjuring the popup with javascript or an <a href="..." target="_blank"> tag.

    Good luck!
    Last edited by dave08; 18 Sep 2008 at 10:07 PM.

  3. #3
    Join Date
    Sep 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: I want to add a popup window code in zencart

    P.S. If you want to make this and all the other zencart popups accessible for those that don't have javascript, you can look at this article:
    http://www.zen-cart.com/wiki/index.p..._popup_windows

 

 

Similar Threads

  1. v139a I want a popup window when opening site for first time
    By marko123 in forum General Questions
    Replies: 5
    Last Post: 31 May 2014, 11:21 PM
  2. Replies: 5
    Last Post: 20 May 2014, 07:51 AM
  3. Show Popup window when Press Add to Cart Button
    By ntestinfo11 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 29 Mar 2011, 05:35 PM
  4. Code for popup window
    By avjungle in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 20 Oct 2010, 09:44 PM
  5. How to add New popup window in product description?
    By jeba in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 24 Jun 2009, 05:59 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