Jump to content

[SOLVED] Thickbox broken after update


Recommended Posts

Prior to version 1.5.5 all my movie links were opened in a thickbox using this code:

<p><a class="thickbox iframe" href="http://www.youtube-nocookie.com/embed/jFtr-uEx_nE?rel=0"><img title="Movie!" src="../img/movie.jpg" alt="Movie!" width="100" height="90" /></a></p>

Only after the upgrade to the latest version (1.5.6) this doesn't work anymore. All my movie files are opened in full screen instead (e.g. http://www.rikxoort.com/potten/asian-thunder-b.html)

 

I presume I must alter my products.tpl to fix this (I don't want to change the code on all products). Only which code must I add?

 

I also red http://www.prestashop.com/forums/topic/271315-solved-thickbox-fancybox-doesnt-work-after-update-1550/ but I can't find the mentioned code (<script type="text/javascript">$('a.iframe').fancybox();</script>) in the products.tpl file.

Edited by vekia (see edit history)
Link to comment
Share on other sites

I have the same problem. After update from 1.5.2 to 1.5.5 or 1.5.6 (i am still trying in test server) fancybox in product details images is not working. Thumbs images are opening in new window and view_full_size (bigger image) is not opening at all. Fancybox library is loaded and jQuery also.

 

I was trying to resolve this by updating one by one version, and it was working to 1.5.4.1.

 

I have try local archive update, and one-click-update module. The same result :( Fancybox (thickbox class in product) is the only thing that is not working and i have no idea why. Any advice?

 

post-714865-0-49914200-1381258026_thumb.png

Link to comment
Share on other sites

okay, so now one more thing.

 

instead of: <script type="text/javascript">$('a.iframe').fancybox();</script>

 

can you use this:

<script type="text/javascript">
{literal}
 $( document ).ready(function() {
  $('a.iframe').fancybox();
 });
{/literal}
</script>
Link to comment
Share on other sites

Nope, I added the following code to my products.tpl in my Themes folder but link still opens in full screen:

<script type="text/javascript" src="/js/jquery/plugins/fancybox/jquery.fancybox.js"></script>
<script type="text/javascript">
{literal}
 $( document ).ready(function() {
  $('a.iframe').fancybox();
 });
{/literal}
</script>
Edited by zeezuiper (see edit history)
Link to comment
Share on other sites

Not sure (Never played with fancybox myself), but can it not be just that the default settings of fancybox are set to width and height :100%?

 

Maybe try this:

$(".iframe").fancybox({
autoSize: false,
autoDimensions: false,
width: 630,
height: 425,

fitToView: false,
padding: 0,
title: this.title,
href: $(this).attr('href'),
type: 'iframe'
});

 

 

My 2 cents,

pascal

  • Like 1
Link to comment
Share on other sites

Not sure (Never played with fancybox myself), but can it not be just that the default settings of fancybox are set to width and height :100%?

 

Maybe try this:

$(".iframe").fancybox({

autoSize: false,

autoDimensions: false,

width: 630,

height: 425,

fitToView: false,

padding: 0,

title: this.title,

href: $(this).attr('href'),

type: 'iframe'

});

 

 

My 2 cents,

pascal

 

When I use this code the screen only flickers, nothing happens further (so the movie is not opened at all).

Link to comment
Share on other sites

O M G.

I have just resolve my problem. After looking into js loaded in many shops on 1.5.5 and 1.5.6 and my not working 1.5.5 and 1.5.6 I found that 2 js are loading from module "med_contactable".(min.js and pack.js) 

After removing "pack.js" all started working correctly!

 

My investigetion shows that it is a module called: 

Add feedback form v 1.0.2. After turning it off thickbox and all fancybox features works fine.

Link to comment
Share on other sites

O M G.

I have just resolve my problem. After looking into js loaded in many shops on 1.5.5 and 1.5.6 and my not working 1.5.5 and 1.5.6 I found that 2 js are loading from module "med_contactable".(min.js and pack.js) 

After removing "pack.js" all started working correctly!

 

My investigetion shows that it is a module called: 

Add feedback form v 1.0.2. After turning it off thickbox and all fancybox features works fine.

 

I can't find pack.js or the mentioned module  :wacko:

Edited by zeezuiper (see edit history)
Link to comment
Share on other sites

code suggested by pascal with document ready function:

 
$( document ).ready(function() {
$(".iframe").fancybox({
autoSize: false,
autoDimensions: false,
width: 630,
height: 425,
fitToView: false,
padding: 0,
title: this.title,
href: $(this).attr('href'),
type: 'iframe'
});});
insert this code AFTER <script> with fancybox library
 
effect:
XI4eCUW.png
  • Like 1
Link to comment
Share on other sites

Super, it is working now. Many thanks for your replies. 

 

Just for the record, the code I have placed in the products.tpl file (under themes\<theme name> directory):

<script type="text/javascript">$('a.iframe').fancybox();
$( document ).ready(function() {
$(".iframe").fancybox({
autoSize: false,
autoDimensions: false,
width: 630,
height: 425,
fitToView: false,
padding: 0,
title: this.title,
href: $(this).attr('href'),
type: 'iframe'
});});
</script>
  • Like 1
Link to comment
Share on other sites

  • 11 months later...

 

Fanceybox does not work properly, although the image larger, but gives it to the background page. 
I happen to know someone with that advice? 

 

cases like that need an inspection of website

so please share url to shop where you've got problem you mentioned

Link to comment
Share on other sites

 

Fanceybox nepracuje správne, aj keď je obraz väčší, ale dá sa na stránku na pozadí. 
Náhodou viem, niekto s tým rady? 

 

prípady, ako že potrebujú kontrolu webových stránok

tak prosím, podeľte url nakupovať, kde ste dostal problém, ktorý spomenul

 

 

 

 

 

http://www.adficie.eu/de/herrenuhren/55-dg-time-sandpiper.html

 

 

 

 

Stránka produktu ukazuje na thicboxe 

bild.jpg

Edited by ms99 (see edit history)
Link to comment
Share on other sites

  • 1 year later...

Hi,

 

I've added this to my header.tpl

 

first these lines in <head>:

 

<script type="text/javascript" src="/js/jquery/plugins/fancybox/jquery.fancybox.js"></script>
<script type="text/javascript">
{literal}
 $( document ).ready(function() {
  $('a.iframe').fancybox();
 });
{/literal}
</script>

 
    <script type="text/javascript">
    $('a.iframe').fancybox();
    $( document ).ready(function() {
    $(".iframe").fancybox({
    autoSize: false,
    autoDimensions: false,
    width: 630,
    height: 425,
    fitToView: false,
    padding: 0,
    title: this.title,
    href: $(this).attr('href'),
    type: 'iframe'
    });});
     
    </script>

 

 

after <head> i've added something like this:

 

<a href="http://mysite.com/content/20-whatsapp?content_only=1" class="iframe">

 

But in result the new page is opened instead of creating a fancy box on current page. What have I done wrong?

I've cleared and disabled all cache but even this did not help. The fancybox library is surely installed as it can be opened by clicking /js/jquery/plugins/fancybox/jquery.fancybox.js link.

 

The strange thing is I've just repeated the same actions as on my another website with other template and there it worked perfectly.

Edited by Vitazzz (see edit history)
Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...