Jump to content

Terms & Conditions pop up


babyewok

Recommended Posts

Hi,

I have an SSL certificate so the whole checkout process is secure. I have two issues with the way that the terms and conditions pop up on the shipping page. One is that it takes ages (everything seems to on the secure pages) and secondly I get the annoying "you are viewing secure and unsecure items" pop up. How do I change the link so that it does not open the terms as a thick box, just a new window.

Technically, I'm not asking how to do it, but wha tthe link should be. If I put in

{$base_dir}cms.php?id_cms=3



then I get the whole page, header and all. I want just the content in the same way that the thick box shows. What do I put as the href?

Link to comment
Share on other sites

  • 3 months later...

I also have a similar problem so I am posting here. Basically I have secured the whole checkout with SSL, however there is a problem when the customer clicks to read the terms and conditions it causes the current page to be insecure - I have traced this to two things one is the favicon and the second is the background image (which is secure normally but not on the popup). This might have something to do with Firefox 3.5 as I did not notice it on the previous build.

Link to comment
Share on other sites

Terms and Conditions Pop up is created via the following.

Locate order-carrier.tpl

replace

href="{$base_dir}cms.php?id_cms=3&content_only=1&TB_iframe=true&width=450&height=500&thickbox=true" class="thickbox">{l s='(read)'}


with

Read

Link to comment
Share on other sites

  • 4 months later...

I had the same problem with the Terms of Service pop up in shipping step of the cart check out.

What I found was causing the pop up div to cause SSL Security Warnings is the BlockSearch header.tpl file.
The solution I found was to replace the $content_dir var with https:// if the base dir contained https://

Step-by-Step:
Go to folder:
siteroot -> modules -> blocksearch -> header.tpl

On the top of the page put the following block of code:
{if $base_dir_ssl|substr:0:8 == 'https://'}
{assign var="content_dir" value=$content_dir|replace:"http://":"https://"}
{/if}

And now your read terms pop up should appear without any security warnings.

I've attached my copy just in case.

header.zip

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Hi! Rocky

Thanks! very much for that....but you know I did that, but it's still knocking out the SSL? That's why I thought it may be calling from another file. The whole checkout process works under SSL, no glitches, until you read the pop up? and then it knocks it out.....

Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...

I fixed this by changing code on line 379 of order.php :

$link_conditions = $link->getCMSLink($cms, $cms->link_rewrite);



to:

$link_conditions = ("https://www.yoursite.com/shop/content/3-terms-and-conditions-of-use");



Change accordingly for your own site :]

hope this helps

tm

Link to comment
Share on other sites

I have done this fix on my site:

In the opc-order.tpl (I use the onepage checkout module) I have added this code to the top:

<script>{literal}
// <![CDATA[
function MM_openBrWindow(theURL,winName,features) { //v2.0
 window.open(theURL,winName,features);
}
//]]>
{/literal}<script>



And then I replaced the link to Terms and conditions with this:

<a href="#" onclick="[removed]window.open('{$link_conditions}','RptWin','left=1,top=1,width=450,height=550,toolbar=0,location=0,directories=0,resizable=0,status=0,menubar=0,scrollbars=1');return false;">Read more</a>



This will produce a popup page with the Terms and conditions without the secure warning.

Hopefully someone can use this fix on their site :)

Link to comment
Share on other sites

  • 3 months later...
I fixed this by changing code on line 379 of order.php :
$link_conditions = $link->getCMSLink($cms, $cms->link_rewrite);



to:

$link_conditions = ("https://www.yoursite.com/shop/content/3-terms-and-conditions-of-use");



Change accordingly for your own site :]

hope this helps

tm



That worked for me with PS 1.3.1, thank you tmocide.

However in IE the text box/window pops up too high up the page and is not immediately visible. You have to scroll up to see it and it took me a while to figure out it's there at all. I can see this confusing customers. How should the code be changed to make the popup a separate window? target= about blank or some such thing?

My order.php now looks like this
    // added in Prestashop 1.3 final
   $cms = new CMS(3, intval($cookie->id_lang));
   $link_conditions = ("https://mydomain.com/content/3-terms-and-conditions-of-use");
   if (!strpos($link_conditions, '?'))
       $link_conditions .= '?content_only=1&TB_iframe=true&width=600&height=500&thickbox=true';
   else
       $link_conditions .= '&content_only=1&TB_iframe=true&width=600&height=500&thickbox=true';

Link to comment
Share on other sites

$link_conditions = ("https://www.yoursite.com/shop/content/3-terms-and-conditions-of-use");

This worked for me in 1.3.5

@Dan1...........I got:

$cms = new CMS); $link_conditions = (“https://www.yoursite.com/shop/content/3-terms-and-conditions-of-use”); if (!strpos($link_conditions, ‘?’)) $link_conditions .= ‘?content_only=1&TB_iframe=true&width=450&height=500&thickbox=true’; else $link_conditions .= ‘&content_only=1&TB_iframe=true&width=450&height=500&thickbox=true’; if (!isset($checked) OR intval($checked) == 0) $checked = intval(Configuration::get(‘PS_CARRIER_DEFAULT’));

Link to comment
Share on other sites

  • 3 years later...

I have the same problem as yanc

 

The terms and conditions pop up is blank (i use one page checkout) PS 1.5.4.1 and I have SSL enabled with certificate

 

in my browser console it says:

 

[blocked] The page at 'https://www.----.com/quick-order' was loaded over HTTPS, but ran insecure content from 'http://www.----.com/content/3-terms-and-conditions?content_only=1': this content should also be loaded over HTTPS.

 

does anyone know how to load cms content over HTTPS??

 

thanks for any thoughts!

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

  • 5 months later...

i've got one idea in my head.

try to change file:

controllers/front/CmsController.php

 

change there this line: (~33 line)

public $ssl = false;

 

to:

 

if (isset($_GET['id_cms'])){

if ($_GET['id_cms']=="3"){

public $ssl = true;

} else {

public $ssl = false;

}

}

Link to comment
Share on other sites

i've got one idea in my head.

try to change file:

controllers/front/CmsController.php

 

change there this line: (~33 line)

public $ssl = false;

 

to:

 

if (isset($_GET['id_cms'])){

if ($_GET['id_cms']=="3"){

public $ssl = true;

} else {

public $ssl = false;

}

}

Thanks for your reply vekia. I can't find that line in my cmscontroller.php file, there is nothing with ssl mentioned. I have attached the file from PS 1.5.4.1 that I am using. Can you see where I should put your code?

 

Many thanks friend

CmsController.php

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