Post by Yozla » Wed Jun 23, 2010 10:53 pm

I need to display a lightox popup window with an image when the frontpage is loaded for the first time.
Any help?

Newbie

Posts

Joined
Mon Jun 21, 2010 4:22 am

Post by alanbernard » Thu Jun 24, 2010 5:53 pm

Hi Guys,

What I am basically trying to achieve is this, on the front page product images, upon clicking, will trigger the fancybox iframe and display the individual product page within the iframe. Here's what I've done so far:-

javascripts: stored the javascripts
\xampp\htdocs\store\catalog\view\javascript\jquery\fancybox

header: edited header to point to javascripts
\xampp\htdocs\store\catalog\view\theme\mytheme\template\common\header.tpl
pointed to the javascripts in the folder above.


Home

\xampp\htdocs\store\catalog\view\theme\mytheme\template\common\home.tpl

<a class="various5" href="<?php echo str_replace('&', '&', $products[$j]['href']); ?>"><img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>" /></a>

Footer- before the close body tag.
\xampp\htdocs\store\catalog\view\theme\mytheme\template\common\footer.tpl

<?php echo $google_analytics; ?>

<script type="text/javascript">
$(document).ready(function() {
$("a.various5").fancybox({
'width': '75%',
'height': '75%',
'autoScale' : false,
'transitionIn': 'none',
'transitionOut': 'none',
'type' : 'iframe'
});

However, things are not quite working for me. Did I get some step wrong, or is there a step missing? Thanks in advance guys! :)

Newbie

Posts

Joined
Thu Jun 10, 2010 1:58 pm

Post by alanbernard » Thu Jun 24, 2010 9:55 pm

Did I post this in the wrong place? Should this be in some other section of the forum instead?

Newbie

Posts

Joined
Thu Jun 10, 2010 1:58 pm

Post by JAY6390 » Thu Jun 24, 2010 10:43 pm

Following this is pretty straightforward
http://fancybox.net/howto
Also make sure you have the stylesheet included in your head section as well, otherwise it won't work

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Thu Jun 24, 2010 11:59 pm

I have this on my site with fancybox. I've been meaning to make it a mod but haven't had a chance. I'll see if I can get to it.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by alanbernard » Fri Jun 25, 2010 1:17 am

Thanks Qphoria. I'm still playing around but have not managed to find the issue.

Stylesheet's been added in the head as well, and I think I more or less followed the documentation as per described. Thing is, when I view my generated source, i get some weird <!-- --> characters after the doctype. Is this normal?

Newbie

Posts

Joined
Thu Jun 10, 2010 1:58 pm

Post by JAY6390 » Fri Jun 25, 2010 7:11 pm

<!-- COMMENT HERE -->
that is a html comment, they have no effect on your content. They basically set everything inside them to be "invisible" to the page
http://www.w3schools.com/tags/tag_comment.asp

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by deeve » Tue Feb 08, 2011 4:58 pm

Hi,
has anyone posted a solution to this? I'd be very interested in learning how to implement a splash Thickbox message which only loads once per user session - maybe to include a tick-box which registers the user has read the notice & will not show again..

Found something similar for Wordpress here:
http://cochinoman.com/2009/12/04/splash ... rsion-030/

Thanks.

Active Member

Posts

Joined
Tue Oct 20, 2009 4:31 pm
Who is online

Users browsing this forum: No registered users and 4 guests