Jump to content

Using thickbox to open blocknewsletter.tpl


zwacklmann

Recommended Posts

Hi everyone,

insted of having the blocknewsletter signup form displayed in a block. I was thinking it would be nice to have it displayed in a thickbox window. Because Prestashop is already using that functionality by default to display the "Terms of Conditions" page when called from order-carrier.tpl it could be easily done... I thought.

I started out picking up the thickbox link from order-carrier.tpl and then checked if it was working elsewhere by pasting it into product.tpl This is the link.

{l s='(read)'}



Well, it did work inside product.tpl because that template has all the thickbox functionality initiated by default.
It did not work on any other template file of my theme.

This is the thickbox files I am calling through my custompage.tpl

type="text/javascript" src="{$base_dir}js/conditions.js"
type="text/javascript" src="{$js_dir}layer.js"
type="text/javascript" src="{$base_dir}css/thickbox.css"
type="text/javascript" src="{$base_dir}js/jquery/thickbox-modified.js"



But that is not enough it appears.
Can someone tell me which files I am missing?

Link to comment
Share on other sites

lol !

It does work exactely as described if only you don't try to call a css file the way I did above.

Here is the thickbox files you'll need to initiate in order to use thickbox on any .tpl

link href="{$base_dir}css/thickbox.css" rel="stylesheet" type="text/css" media="all"
script type="text/javascript" src="{$base_dir}js/jquery/thickbox-modified.js"

Link to comment
Share on other sites

Hi,

I wanted to get something to show in the thickbox on every page and I included the code below in the header.tpl

<link href="{$base_dir}css/thickbox.css" rel="stylesheet" type="text/css" media="all" />
script type="text/javascript" src="{$base_dir}js/jquery/thickbox-modified.js" [removed]



That on its own didn't work for me though. I also had to add in

[removed]
// <![CDATA[
   ThickboxI18nImage = 'Image';
   ThickboxI18nOf = 'of';
   ThickboxI18nClose = 'Close';
   ThickboxI18nOrEscKey = 'or Esc key';
   ThickboxI18nNext = 'Next >';
   ThickboxI18nPrev = '< Prev';
   tb_pathToImage = '{path to images for thickbox}/loadingAnimation.gif';
//]]>
[removed]



Then I got it working. Your post pointed me in the right direction tho thanks!

Link to comment
Share on other sites

  • 5 months 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...