PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

[SOLVED] How do I put the term and condition in a thickbox in the authentication.php

9 replies to this topic
#1
metta

    PrestaShop Apprentice

  • Members
  • PipPip
  • 116 posts
I want to put the term and condition (CMS3) in a thick box in the authentication.php under the creat an account block. I copied the codes from the order page as follow:


{l s='(read)'}


But I don't get the thickbox pop up effect, I only got a page that use up the whole screen. What am I missing?


Do I need to add something to it?

Thank you for the help.

#2
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
I think you need to add the following before including header.php on line 207 of authentication.php:


$css_files = array(__PS_BASE_URI__.'css/thickbox.css' => 'all');
$js_files = array(__PS_BASE_URI__.'js/jquery/thickbox-modified.js');

Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

#3
metta

    PrestaShop Apprentice

  • Members
  • PipPip
  • 116 posts
Hi Rocky,

I put the codes and I only got a full back screen. The pop up effect and the cms3 are not loaded.

Thank you ssooooo much for the help.

#4
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
Sorry, forgot that you also need to add the following to the top of authentication.tpl in your theme's directory:


{include file=$tpl_dir./thickbox.tpl}

Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

#5
metta

    PrestaShop Apprentice

  • Members
  • PipPip
  • 116 posts
I finally got a chance to test it. It works great. Thank you very much.

#6
Octahedron

    PrestaShop Apprentice

  • Members
  • PipPip
  • 38 posts
Hi there,

I am trying to do the same with my identity.tpl (to display Privacy Policy in a thickbox) but I don't really understand where to put the code:

$css_files = array(__PS_BASE_URI__.'css/thickbox.css' => 'all');
$js_files = array(__PS_BASE_URI__.'js/jquery/thickbox-modified.js');

Please can you advise where exactly I should place the above?
Many thanks!!

#7
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
Put it before line 81 (the include header.php line) of identity.php.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

#8
Octahedron

    PrestaShop Apprentice

  • Members
  • PipPip
  • 38 posts
Hey rocky, many thanks for your prompt response!

However, I still don’t get what you mean…

I’m on 1.2.5.0 version and I do not have such line in my identity.tpl that includes header.php

Do I need to add some code within my header.php file then? If so, what part of the code and where exactly?

What about this part of code?

{include file=$tpl_dir./thickbox.tpl}


Where do I place this one?

I can't paste the full content of my identity.tpl file here, but that's how it looks like from line 77:

                



<input type="checkbox" id="newsletter" name="newsletter" value="1" {if $smarty.post.newsletter == 1} checked="checked"{/if} />



<input type="checkbox" name="optin" id="optin" value="1" {if $smarty.post.optin == 1} checked="checked"{/if} />



<input type="submit" class="button" name="submitIdentity" value="{l s='Save'}" />



</form>


<!--{l s='Click HERE for our Privacy Policy'}-->
Click HERE to read our Privacy Policy


{/if}




I'm sure it must be something very easy to do but I just didn't catch up yet.

Thank you for your understanding and further explanations!

#9
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
You are looking at the wrong file. It is identity.php, not identity.tpl. The file identity.php is in the root directory of Prestashop.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.

#10
Octahedron

    PrestaShop Apprentice

  • Members
  • PipPip
  • 38 posts
excellent! works perfect now!! :)
many thanks rocky!