Jump to content

[SOLVED] thickbox fancybox doesn't work after update 1.5.5.0


Recommended Posts

Same problem here... maybe somebody have solution?

But only i have little another problem. I was maded what popup will apear in product page of clothes sizes chart by code:

<a href="{$base_dir}content/6-dydziu-lentele?content_only=1&TB_iframe=true&width=700&height=470&thickbox=true" class="button thickbox">{l s='Size chart'}</a>

and after update it opens in new window..

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

Same problem here... maybe somebody have solution?

But only i have little another problem. I was maded what popup will apear in product page of clothes sizes chart by code:

<a href="{$base_dir}content/6-dydziu-lentele?content_only=1&TB_iframe=true&width=700&height=470&thickbox=true" class="button thickbox">{l s='Size chart'}</a>

and after update it opens in new window..

any chance to share the url?

Link to comment
Share on other sites

Hi! Here's my site

http://www.wrongpeople.it/shop/en/

 

Try to order a product with this account

[email protected]

Password: testing

 

At the fourth step of checkout you can click on Read the terms of service.

Before the update to prestashop 1.5.5.0 terms and condition appeared in a thickbox popup.

Now it works as a normal link :/

How can I fix it?

 

Thank you

 

it's only related to the SSL pages? can you verify it?

Link to comment
Share on other sites

 

Hi.

 

In file order-carrier.tpl in your theme, change

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

to

<script type="text/javascript">
	$('a.iframe').fancybox({
		'type' : 'iframe',
		'width':600,
		'height':600
	});
</script>

 

looks interesting, you checked it in own store??

Link to comment
Share on other sites

 

Hi.

 

In file order-carrier.tpl in your theme, change

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

to

<script type="text/javascript">
	$('a.iframe').fancybox({
		'type' : 'iframe',
		'width':600,
		'height':600
	});
</script>

Thank you. It worked. Just to know...Why after the update it is needed to add width and height??

Link to comment
Share on other sites

Sorry for my delay.

 

looks interesting, you checked it in own store??

 

Yes I check it.

I had the same problem in my store and I solved with this solution.

 

Thank you. It worked. Just to know...Why after the update it is needed to add width and height??

 

I don't know, maybe something changes in an other file.

 

Glad I could help ;)

Link to comment
Share on other sites

Thank you Hayaliel, I found the solution in your post.

 

 

Hi.

 

In file order-carrier.tpl in your theme, change

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

to

<script type="text/javascript">
	$('a.iframe').fancybox({
		'type' : 'iframe',
		'width':600,
		'height':600
	});
</script>
Link to comment
Share on other sites

  • 3 weeks later...

Hi!! SInce I updated to 1.5.6.0 version, when i click on read terms of service fancybox freezes on loading gif and don't show the content. I'm still using order-carrier.tpl fixed with the solution in this topic :)

 

open browser console, you will see probably some errors, can you paste here error code?

Link to comment
Share on other sites

it's because your store trying to load unsecured content:

r2ymlvf.png

 

this is how modern browsers work (infortunately it's a crap in my opinion). url to tos page looks like

<a href="http://www.wrongpeople.it/shop/en/content/1-about-us?content_only=1" class="iframe">(Read the Terms of Service)</a>

so you have to change it to ssl connection.

 

in addition to this you will have to block also redirection from ssl to ssl

 

then everything will work 

  • Like 1
Link to comment
Share on other sites

 
<a href="{$link_conditions|replace:'http://':'https://'}" class="iframe">{l s='(Read the Terms of Service)'}</a>

+ from file: init.php

 

remove function:

if (Configuration::get('PS_SSL_ENABLED') && ($_SERVER['REQUEST_METHOD'] != 'POST') && $this->ssl != Tools::usingSecureMode())
{	
header('HTTP/1.1 301 Moved Permanently');
header('Cache-Control: no-cache');
if ($this->ssl)	
header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']);
else	
header('Location: '.Tools::getShopDomain(true).$_SERVER['REQUEST_URI']);
exit();
}

(this is redirection)

Link to comment
Share on other sites

my init.php is a little different

$protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
	$protocol_content = (isset($useSSL) AND $useSSL AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
	$link = new Link($protocol_link, $protocol_content);
	$context->link = $link;
	if (!defined('_PS_BASE_URL_'))
		define('_PS_BASE_URL_', Tools::getShopDomain(true));
	if (!defined('_PS_BASE_URL_SSL_'))
		define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true));

Anyway I solved setting ssl on all pages and not just on account and checkout pages. With this there is no need to modify order-carrier.tpl. Anyway thank for your help!

  • Like 1
Link to comment
Share on other sites

my init.php is a little different

$protocol_link = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
	$protocol_content = (isset($useSSL) AND $useSSL AND Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
	$link = new Link($protocol_link, $protocol_content);
	$context->link = $link;
	if (!defined('_PS_BASE_URL_'))
		define('_PS_BASE_URL_', Tools::getShopDomain(true));
	if (!defined('_PS_BASE_URL_SSL_'))
		define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true));

Anyway I solved setting ssl on all pages and not just on account and checkout pages. With this there is no need to modify order-carrier.tpl. Anyway thank for your help!

 

btw. may i know how you activated "ssl on all pages and not just on account and checkout pages" ?

Link to comment
Share on other sites

vekia, thanks for your hint with the init.php. In 1.5.6 the code is placed in the FrontController.php file.

 

Now loading the terms and conditions with an iframe in the carrier page is working again without showing mixed(secure/unsecure) content.

 

Don't know, if this function is really required or could be improved..

Link to comment
Share on other sites

it isn't requred function.

this function creating only redirections from secured to nonsecured which is definitely bad and this will not work in new browsers (yes, this is new feature in browsers :| they automatically block unsecured contents)

Link to comment
Share on other sites

  • 2 months later...

 

Hi.

 

In file order-carrier.tpl in your theme, change

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

to

<script type="text/javascript">
	$('a.iframe').fancybox({
		'type' : 'iframe',
		'width':600,
		'height':600
	});
</script>

 

Cool, this solved my problem on PS 1.5.6.1! Thanks for this post :D

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

I opened a bug report on this, and they immediately closed it down saying 'cannot reproduce' when its obvious many are having this issue. Looks like they just test it on their own personal machines and try to reproduce bugs instead of trying different configurations.

Link to comment
Share on other sites

  • 2 weeks later...

 

Hi.

 

In file order-carrier.tpl in your theme, change

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

to

<script type="text/javascript">
	$('a.iframe').fancybox({
		'type' : 'iframe',
		'width':600,
		'height':600
	});
</script>

Thanks Bro i solved the problem by your helps  :)

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 3 weeks later...

I have 1.5.6.2 version with multishop with different carrier and could be already fixed but i have same error ,my ordercarrier is this:

 

276 <script type="text/javascript">

277 $(document).ready(function() {
278       $("a.iframe").fancybox({
279           'type' : 'iframe',
280          'width':600,
281           'height':600
282       });
283   });
284 </script>
 
do you know reason i continue to have this problem ?
 
Thanks Tiz
Edited by nosnosnos (see edit history)
Link to comment
Share on other sites

  • 11 months later...

Hello! I'm having a similar problem.

 

I've added 

<a href="{$link_conditions|replace:'http://':'https://'}" class="iframe" >{l s='(Read the Terms of Service)'}</a>

Changed the script to 

 

<script type="text/javascript">
$('a.iframe').fancybox({
'type' : 'iframe',
'width':800,
'height':600
});
</script>

But still return
 
Mixed Content: The page at 'https://etniico.com/order?step=2' was loaded over HTTPS, but requested an insecure resource 'http://etniico.com/content/3-terms-of-use?content_only=1'. This request has been blocked; the content must be served over HTTPS.
 
but the link is with ssl
 
<iframe id="fancybox-frame" name="fancybox-frame1425323033574" frameborder="0" hspace="0" scrolling="auto" src="https://etniico.com/content/3-terms-of-use?content_only=1"></iframe>

No idea what's happening. There is no mixed content. it's all in ssl.

Can you help me?

 

Link to comment
Share on other sites

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...