Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to popup a window on main page?

How to popup a window on main page?

Views: 3,679

Results 1 to 12 of 12
24 Jan 2012, 1:55 AM
#1
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

How to popup a window on main page?

I know many people have done this before, unfortuntely I am not familar with php and I know I have to use javascript to do this, but I don't know where to put it and which file.

What I need is quite simple, when my user open my website, I want to show a popup that shows a piece of html code including some text and image - basically my on sale information.

Can someone tell me very clearly in 1,2,3 on how to and where to write my code?

Thank you so much in advance.

24 Jan 2012, 3:40 AM
#3
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to popup a window on main page?

charmedbytina2:

Are you looking for something like what is on this site?

digitaldelightsbyloubyloo.com

I installed a module from the Free Add Ons section for this.

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1734

Hope this helps.

Tina

Thank you very much Tina. That's what I am looking for, I will try it out tomorrow.

27 Jan 2012, 7:51 PM
#4
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to popup a window on main page?

Just can't get it working!:no::no:

I just installed a new zencart.

From the instruction:
Installation Instructions:

  1. Modify /includes/templates/YOURTEMPLATE to refer to your template name
  2. Upload the includes and popupimages folders into your zencart store
  3. ** WILL NOT WORK WITHOUT THIS STEP **
    modify /includes/templates/YOURTEMPLATE/common/html_header.php to include this line:
<?php require(DIR_WS_TEMPLATE . '/simplepopup/simplepopup.php'); ?>
  1. Run the install.sql patch via Tools -> Install SQL Patch, I did it

  2. Images must be uploaded via FTP or your hosts cpanel to /popupimages-----I uploaded it to the root: /public_html/test

  3. I did this

  4. I did it

  5. I did it.

  6. I did it

  7. I uploaded it to the root: /public_html/test

The site is up but no popup.

I ran the upgrade sql, it returns me:
1062 Duplicate entry 'SIMPLE_POPUP_CAMPAIGN' for key 'unq_config_key_zen'
in:
[INSERT INTO znc_configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Campaign', 'SIMPLE_POPUP_CAMPAIGN','weekzen','If this utm_campaign value is set, ignore popup.', @t4, 20, NOW(), NOW(), NULL, NULL);]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Can you tell me where I am missing?

Thank you very much.

27 Jan 2012, 10:26 PM
#5
charmedbytina2 avatar

charmedbytina2

Totally Zenned

Join Date:
Mar 2007
Location:
AZ
Posts:
1,890
Plugin Contributions:
0

Re: How to popup a window on main page?

Images must be uploaded via FTP or your hosts cpanel to /popupimages-----I uploaded it to the root: /public_html/test

path should be root/public_html/popupimages

or if you have your cart in a folder

root/public_html/folder_name/popupimages

Tina

28 Jan 2012, 4:25 AM
#6
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to popup a window on main page?

charmedbytina2:

path should be root/public_html/popupimages

or if you have your cart in a folder

root/public_html/folder_name/popupimages

Tina

Thanks.

That is what I put there, my site is: xiexianhui.com/test
test is the sub domain name.

28 Jan 2012, 5:29 PM
#7
charmedbytina2 avatar

charmedbytina2

Totally Zenned

Join Date:
Mar 2007
Location:
AZ
Posts:
1,890
Plugin Contributions:
0

Re: How to popup a window on main page?

I just took at look at your install, one file was missing and another was not in the folder it should have been.

Popup is working ~ enjoy!

Tina

5 Feb 2012, 3:15 AM
#8
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to popup a window on main page?

I was able to create a website with popup when the home page is loaded using a mod called Simple Popup, in this website, I am using the default template comes with zencart installation.

I want to use this popup mod on my other sites like this one, I believe I already followed the instruction, just like what I did in the working website, however, the popup doesn't show up.:no::no:

Can someone take a look at my site and tell me what's wrong with it?

Thank you very much.:hug::hug:

6 Feb 2012, 7:59 PM
#9
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Re: How to popup a window on main page?

Did you do this step?

  1. ** WILL NOT WORK WITHOUT THIS STEP **
    modify /includes/templates/YOURTEMPLATE/common/html_header.php to include this line:
<?php require(DIR_WS_TEMPLATE . '/simplepopup/simplepopup.php'); ?>

This should go before the </head> at the end of the file
If this file does not exist please copy it from template_default into your template.

It appears the code isn't being loaded at all. I see the jquery loading up but that also could be for your slideshow.

8 Feb 2012, 3:17 AM
#10
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to popup a window on main page?

llynix:

Did you do this step?

  1. ** WILL NOT WORK WITHOUT THIS STEP **
    modify /includes/templates/YOURTEMPLATE/common/html_header.php to include this line:
<?php require(DIR_WS_TEMPLATE . '/simplepopup/simplepopup.php'); ?>

This should go before the </head> at the end of the file
If this file does not exist please copy it from template_default into your template.

It appears the code isn't being loaded at all. I see the jquery loading up but that also could be for your slideshow.

I did the step 3.

Could you tell me how to put your jquery and my original jquery together so it is enough to load only one file?

My jquery is attached here.

Thank you.

8 Feb 2012, 4:22 PM
#11
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Re: How to popup a window on main page?

Just delete one of them.. The jquery file is automatically loaded by zen cart because of it being renamed to jscript_filename. All jscript_ files are loaded by zen cart.

Just make sure you only have one jquery loading up in YOURTEMPLATE/jscript

8 Feb 2012, 9:14 PM
#12
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to popup a window on main page?

llynix:

Just delete one of them.. The jquery file is automatically loaded by zen cart because of it being renamed to jscript_filename. All jscript_ files are loaded by zen cart.

Just make sure you only have one jquery loading up in YOURTEMPLATE/jscript

Deleting the other one makes the existing slides stop working. Can I put the two files together? How? The js looks so messy. Thanks.