Jump to content
4thbasement

[Resolved] Accepting terms of service Pop Up is blank

Recommended Posts

post-1241385-0-23633900-1462994255_thumb.jpgHi all, 

 

I tried searching for this but no luck in finding anyone with the same problem.

 

At the page where you accept terms and service, the pop up to read the actual terms and service is blank. 

 

Attached the screenshot. 

 

Anyone got any idea how to fix this?

 

Thank you,

Tom

Edited by 4thbasement (see edit history)

Share this post


Link to post
Share on other sites

It's not empty :)

 

I thought it may be too long so I linked it to a different one with just a couple of lines. No changes, pop up is still blank..

Share this post


Link to post
Share on other sites

there is a chance that you browse order process with ssl certificate

and tos page is loaded without ssl - because of this - you dont see it, just blank page.

about 2 years ago it was common problem here :-)

 

case needs inspection directly in your shop.

Share this post


Link to post
Share on other sites

there is a chance that you browse order process with ssl certificate

and tos page is loaded without ssl - because of this - you dont see it, just blank page.

about 2 years ago it was common problem here :-)

 

case needs inspection directly in your shop.

I'm not sure I understand what you mean by that. Either way, how do I fix it? :)

Share this post


Link to post
Share on other sites

most important question:

while you order something - you see https in address bar?

Share this post


Link to post
Share on other sites

can you please now go to preferences and disable ssl connection (for a second, for test purposes only) then go back to order process and try to open tos popup

you see contents now, right?

Share this post


Link to post
Share on other sites

Hi Vekia, I tried disabled SSL, no changes. It's still blank. Do you have any other ideas? Thank you for the help.

 

EDIT: I found a thread from someone before having the same problem. I tried CTRL+SHIFT+J and the pop up shows the text. 

 

EDIT2: Disabling SSL actually works, it needed a second ;p. Obviously this isn't a permanent solution... how do I get it to work with SSL? And it seems like it's a chrome problem only. 

 

The log says:

 

Failed to load resource: net::ERR_NAME_NOT_RESOLVED                                                                                 http://c.jirafe.com/jirafe.js

Edited by 4thbasement (see edit history)

Share this post


Link to post
Share on other sites

i know that this is not a solution, but i decribed these steps for debug purposes. Now i know where the problem is and as i already said: about 2 years ago it was common problem here :-) for example: https://www.prestashop.com/forums/topic/281415-solved-access-cms-pages-using-https/

 

sadly speaking it was a long time ago and i dont remember details of fix well. it was a case of .js scripts and some controller modifications.

 

because of this, can i ask for url where i can test it?

Share this post


Link to post
Share on other sites

i know that this is not a solution, but i decribed these steps for debug purposes. Now i know where the problem is and as i already said: about 2 years ago it was common problem here :-) for example: https://www.prestashop.com/forums/topic/281415-solved-access-cms-pages-using-https/

 

sadly speaking it was a long time ago and i dont remember details of fix well. it was a case of .js scripts and some controller modifications.

 

because of this, can i ask for url where i can test it?

I assumed since it was a 2 year old problem, the solution would be simple :)

 

The site is https://www.gotyourshoes.com, but you'd have to create an account and go through the checkout process up to where you're asked to accept the terms of service. 

 

But how / where can I edit this the first place? When inspect the source :

 

"href="https://www.gotyourshoes.com/content/3-terms-and-conditions-of-use?content_only=1" class="iframe">"

 

I can't find find this file anywhere... If I can get the link that leads to a pop up to simply redirect to the standard terms and conditions page, that's be a decent solution for now..

Share this post


Link to post
Share on other sites

I assumed since it was a 2 year old problem, the solution would be simple :)

 

The site is https://www.gotyourshoes.com, but you'd have to create an account and go through the checkout process up to where you're asked to accept the terms of service. 

 

But how / where can I edit this the first place? When inspect the source :

 

"href="https://www.gotyourshoes.com/content/3-terms-and-conditions-of-use?content_only=1" class="iframe">"

 

I can't find find this file anywhere... If I can get the link that leads to a pop up to simply redirect to the standard terms and conditions page, that's be a decent solution for now..

 

 

thank you for the link

i checked it, one last question before solution

what is the ps version ? (share exact number please like 1.6.1.5)

Share this post


Link to post
Share on other sites

open: controllers/front/CmsController.php
 
there is a code:
 

class CmsControllerCore extends FrontController
{
	public $php_self = 'cms';
	public $assignCase;
	public $cms;
	public $cms_category;

at the end add: public $ssl = true;

class CmsControllerCore extends FrontController
{
	public $php_self = 'cms';
	public $assignCase;
	public $cms;
	public $cms_category;
        public $ssl = true;


and

if (Validate::isLoadedObject($this->cms) && ($canonicalURL = $this->context->link->getCMSLink($this->cms))) 

to:

if (Validate::isLoadedObject($this->cms) && ($canonicalURL = str_replace('http','https',$this->context->link->getCMSLink($this->cms))))

you can find both codes somewhere between 30-40 lines

Share this post


Link to post
Share on other sites

Thank you! That worked. 

 

I'll mark the topic as solved, but if you can tell me (if it's even possible): How would I edit that order page directly at the source file? Or maybe the question should be which file is it? (So, without using prestashop), it be great :)

 

(For example, to modify that pop up Terms of Service link to link to a different page and not a pop up)

 

Thank you again,

Tom

Share this post


Link to post
Share on other sites

of course you can modify this order page, 

files for this page are avaialble in your theme directory: order-carrier.tpl

Share this post


Link to post
Share on other sites

Hello Vekia,

I seem to have the same problem in PrestaShop 1.7 (v. 1.7.4.4), however, the solution above (edits in CmsController.php) does not work for me.

Do you have any suggestions how I could fix the same problem in PS 1.7?

Best,

Daniel

Share this post


Link to post
Share on other sites

Hi.

I have the same problem and none of the changes work. I don't know how to solve it.

Share this post


Link to post
Share on other sites

 

Hello,

I faced the same problem with prestashop 1.7.6.1, however for me it is not related to ssl problem that seems well handled (on docker without https and ssl it doesnt work and on live environment where https and ssl are well handle and activated it does the same an empty popup with just a cross).

Indeed in this case the content is well retrieve without error from the cms page and can be displayed in a new tab easily to check but it is not added to the dom of the popup and then not displayed.

I had no time to fix properly the popup itself and the js code related to it in the front asset build so i made a simple fix by replacing the link that was triggering the popup by null and then i added a simple link that open in a new tab the cms page content above the check box.

To achieve that i made a final override of the class ConditionsToApproveFinderCore because the method i was interested in is private, so in the method getDefaultTermsAndConditions i sent null instead of $link to remove the link auto generated.

Then in the template templates/checkout/_partials/steps/payment.tpl i added after the form the following line

<form id="conditions-to-approve" method="GET">
<a href="{$link->getCMSLink('3')}" target="_blank">{l s='Conditions générales de vente' d='Shop.Theme.Global'}</a><br>

I hope it helps and that we can find a way to fix properly the popup itself.

Best regards,

Capture d’écran 2019-11-17 à 12.53.18.png

term-condition.png

Share this post


Link to post
Share on other sites
Posted (edited)

The problem is the id's that the cms pages do not match the values of the prestashop cms rules table.

The solution is very simple, edit with a database manager, (phpmyadmin or another...) the table cms_role and put the correct id in id_cms field (you can see correct id on the cms pages) in the entries:

LEGAL_CONDITIONS

LEGAL_REVOCATION

 

Edited by yanguel (see edit history)

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More