Zen Cart Logo
Forums / All Other Contributions/Addons / Simple Popup 1.0

Simple Popup 1.0

Views: 22,083

Results 1 to 20 of 50
22 Aug 2010, 7:08 AM
#1
llynix avatar

llynix

Zen Follower

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

Simple Popup 1.0

A module I've been working on. Got it to a workable state tonight.

This adds a simple popup to your website. The popup is configurable to go on and off at any interval and is unobtrusive as possible to users. The popup implements a modal dialog box.

Will be uploading to the add-ons section in a moment, but you can get it hot off the presses at:
compupair.com/simplepopup/simplepopup_1.0.zip

A demo is set up at:
http://www.compupair.com/simplepopup

This popup utilizes jquery and may cause problems if you are already using jquery on your site. You can remove the jquery from the javascript directory to avoid double loading.

Hope it's helpful
Anthony

13 Sep 2010, 3:42 PM
#3
ladyrose avatar

ladyrose

New Zenner

Join Date:
Sep 2010
Posts:
2
Plugin Contributions:
0

Re: Simple Popup 1.0

Hello, I can not get the popup to work for me. I am using version1.39d and I have a zenflavor template on my page. I do not have a file called html_header in my template common file it is a tpl_header page?

13 Sep 2010, 4:19 PM
#4
ladyrose avatar

ladyrose

New Zenner

Join Date:
Sep 2010
Posts:
2
Plugin Contributions:
0

Re: Simple Popup 1.0

ok nevermind, I found it! It was in the default template/common file! One more question can the popup be customised to be used on any other page besides the main? I dont really want to greet my guests with a popup. An exit pop would also be great!

14 Sep 2010, 2:04 PM
#5
yonghs avatar

yonghs

New Zenner

Join Date:
Jun 2008
Posts:
62
Plugin Contributions:
1

Re: Simple Popup 1.0

ladyrose:

ok nevermind, I found it! It was in the default template/common file! One more question can the popup be customised to be used on any other page besides the main? I dont really want to greet my guests with a popup. An exit pop would also be great!

Don't edit the original file in "default template/common" ... copy that file to your custom template's folder.... *\includes\templates\YOUR_TEMPLATE\common*

Templates only come with the files that have been modified by the creator, all other files need not be provided, as Zen Cart will automatically use the default template's files.

If you want to edit any template file, you should copy the original Zen Cart template file to your custom template's corresponding folder first.

20 Oct 2010, 10:10 PM
#6
stanislawl avatar

stanislawl

New Zenner

Join Date:
Sep 2010
Posts:
29
Plugin Contributions:
1

Re: Simple Popup 1.0

Hi,

Thank you for this ad-on.

I have noticed a strange thing: the pop-up window displays once (during the first load of the main page) in all browsers except Internet Explorer - there it displayes on each load of the main page. Why?

Best regards,
Stan

21 Oct 2010, 3:03 PM
#7
llynix avatar

llynix

Zen Follower

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

Re: Simple Popup 1.0

stanislawl:

Hi,

Thank you for this ad-on.

I have noticed a strange thing: the pop-up window displays once (during the first load of the main page) in all browsers except Internet Explorer - there it displayes on each load of the main page. Why?

Best regards,
Stan

The popup window utilizes session variables to determine if it has been seen or not. It should work on all browsers. I've just tested with IE 6 and 7 with no problems.

Perhaps you have cookie support turned off or some security settings set to where the session variable is not being set properly on IE?

If you find anything out please let us know. I'd hate to think my users are getting hit with it on every page.

Anthony

21 Oct 2010, 6:27 PM
#8
stanislawl avatar

stanislawl

New Zenner

Join Date:
Sep 2010
Posts:
29
Plugin Contributions:
1

Re: Simple Popup 1.0

Hello Anthony,

Thank you for the quick response.

I have made some tests and... the problem is not in a browser, but in domain(s). My website is http://www.olaf.legnica.pl. If a user types an address with the letters 'www' everything is OK, the popup window is displayed once. But if he/she types only http://olaf.legnica.pl the popup is displayed every time the page is refreshed. So it seems to me it is not an error in the code, but something wrong with my website (domain?) configuration.

Best regards,
Stan

22 Oct 2010, 4:15 AM
#9
llynix avatar

llynix

Zen Follower

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

Re: Simple Popup 1.0

stanislawl:

Hello Anthony,
I have made some tests and... the problem is not in a browser, but in domain(s).
<snip>
So it seems to me it is not an error in the code, but something wrong with my website (domain?) configuration.

Best regards,
Stan

Thank you for your tests. I would say the error is on both our ends. When I have time I will look into the code and see if I can make it work correctly in this case.

In the meantime however the general consensus is that is it better to serve all your links off either www or non-www but not both to avoid duplicate content with the search engines. This can be achieved easily by modifying your .htaccess file.

This is the how you redirect all non www to www:

RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]

Thanks again for troubleshooting. I will try to fix the domain problems in the code as soon as possible.

Anthony

25 Oct 2010, 9:15 AM
#10
stanislawl avatar

stanislawl

New Zenner

Join Date:
Sep 2010
Posts:
29
Plugin Contributions:
1

Re: Simple Popup 1.0

Thank you, that's it!

24 Nov 2010, 12:14 PM
#11
bonnit avatar

bonnit

Zen Follower

Join Date:
Jun 2009
Location:
Kent, UK
Posts:
350
Plugin Contributions:
0

Re: Simple Popup 1.0

is it possible to assign this to a specific button, the add to cart button in particular, to give users an option to goto cart (redirect to cart) or continue shopping(close dialogue)?

10 Dec 2010, 5:22 PM
#12
3dperuna avatar

3dperuna

New Zenner

Join Date:
Nov 2007
Posts:
33
Plugin Contributions:
0

Re: Simple Popup 1.0

First: THANKS! Very useful.

How tough would it be to do the following:

  1. Change it so that it comes up under certain conditions (example: certain products, or products in certain categories)?

  2. Change it so that instead of an image, it opens/reads a different page?

10 Dec 2010, 5:45 PM
#13
3dperuna avatar

3dperuna

New Zenner

Join Date:
Nov 2007
Posts:
33
Plugin Contributions:
0

Re: Simple Popup 1.0

Also, I just discovered an error in Opera. The following shows at the top of the screen:

//><!-- $(document).ready(function () { $.modal("<a href=\"http://www.lightsource-sf.com/\"><img src=\"includes/templates/mytheme/images/popupimages/LS_Soon.png\" alt=\"Popup\" width=\"353\" height=\"219\" /></a>",{containerCss:{width:353,height:219}}); }); //--><!

And, in IE it doesn't pop-up at all...

13 Dec 2010, 3:48 PM
#14
3dperuna avatar

3dperuna

New Zenner

Join Date:
Nov 2007
Posts:
33
Plugin Contributions:
0

Re: Simple Popup 1.0

A quick edit: It works in Safari & Chrome just fine...

17 Feb 2011, 4:42 PM
#15
kernheimer avatar

kernheimer

Zen Follower

Join Date:
Jul 2009
Posts:
126
Plugin Contributions:
0

Re: Simple Popup 1.0

As much as i would love to, i can't get this to work. my webshop is at diamondfx-faceart.eu/shop and i don't see it.
i did what the instructions told me to, put js out and in.. but no popup.. HELP please??:smartalec:

24 Feb 2011, 5:57 PM
#16
llynix avatar

llynix

Zen Follower

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

Re: Simple Popup 1.0

kernheimer:

As much as i would love to, i can't get this to work. my webshop is at diamondfx-faceart.eu/shop and i don't see it.
i did what the instructions told me to, put js out and in.. but no popup.. HELP please??:smartalec:

It would appear the code is showing up before the jquery library is loaded.

When you pasted the code into html_header.php did you paste it at the bottom of the page???

  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

Put it right before the </head>

28 Feb 2011, 5:14 AM
#17
llynix avatar

llynix

Zen Follower

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

Re: Simple Popup 1.0

Version History:

v 1.1

Fixed timezone bug

removed need for height and width

added campaign hiding

5 Mar 2011, 1:36 PM
#18
solidrock avatar

solidrock

New Zenner

Join Date:
Nov 2009
Location:
Aurora, IN
Posts:
37
Plugin Contributions:
0

Re: Simple Popup 1.0

I have the popup working on my site, and it is exactly what I was looking for. :clap:

However, the close box image is not showing (it looks like that is x.png). All the files are where they should be - any ideas why this might happen?:blink:

5 Mar 2011, 2:31 PM
#19
llynix avatar

llynix

Zen Follower

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

Re: Simple Popup 1.0

solidrock:

I have the popup working on my site, and it is exactly what I was looking for. :clap:

However, the close box image is not showing (it looks like that is x.png). All the files are where they should be - any ideas why this might happen?:blink:

Strange.. some ideas..

check that x.png is present in YOUR_TEMPLATE/simplepopup/

check that basic.css is present in YOUR_TEMPLATE/css

Llynix

5 Mar 2011, 6:05 PM
#20
solidrock avatar

solidrock

New Zenner

Join Date:
Nov 2009
Location:
Aurora, IN
Posts:
37
Plugin Contributions:
0

Re: Simple Popup 1.0

Yes, they are all in the right place. I am running 1.3.8a - would that make a difference how this module works or how it handles images?

llynix:

Strange.. some ideas..

check that x.png is present in YOUR_TEMPLATE/simplepopup/

check that basic.css is present in YOUR_TEMPLATE/css

Llynix