If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Creating a popup page like info_shopping_cart

Creating a popup page like info_shopping_cart

Started by kamion on 29 Jan 2012, 1:38 PM · Views: 760

Results 1 to 4 of 4
29 Jan 2012, 1:38 PM
#1
kamion avatar

kamion

New Zenner

Join Date:
Mar 2011
Posts:
93
Plugin Contributions:
0

Creating a popup page like info_shopping_cart

ZenCart: v1.3.9h

I've been trying to create a new popup page like info_shopping_cart. Unfortunately, I got a page not found error when I click on the link, and there's no error log in the cache directory.

I found this old thread:
http://www.zen-cart.com/forum/showthread.php?t=110065

But the attachment with the example files on the locked thread is no longer available.

Here's what I've added:

The filename define to my new popup page:
**includes/extra_datafiles/<my_popup>_filename.php **

All the text defines for the popup:
includes/languages/english/<my_template>/<my_popup>.php

The actual popup page itself:
includes/templates/<my_template>/<my_popup>/tpl_main_page.php

I then added the following into the relevant module page where I want to display the new popup page link:
includes/modules/pages/<my_relevant_page>/jscript_main.php

<script language="javascript" type="text/javascript"><!--
function session_win() {
  window.open("<?php echo zen_href_link(FILENAME_<MY_POPUP>); ?>","<my_popup>","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus();
}
//--></script>

And I added the call to session_win to
includes/templates/<my_template>/templates/tpl_<my_relevant_page>_defaul.php.

The link appears correctly on <my_relevant_page>, and when I click on the link, a popup window appears with the address:

http://<my_website>/index.php?main_page=<my_popup>

but it's a Page Not Found.

What have I missed? :cry:

30 Jan 2012, 2:01 AM
#4
kamion avatar

kamion

New Zenner

Join Date:
Mar 2011
Posts:
93
Plugin Contributions:
0

Re: Creating a popup page like info_shopping_cart

Thanks, usernamenone.

I've just found out what I was missing! A good night's sleep does help.

includes/modules/pages/<my_popup>/header_php.php

It's now working.

:clap::clap: