Ovi Posted February 23, 2010 Share Posted February 23, 2010 How can i do this? I want to use Thickbox on all of my Prestashop pages (to display some text info), but in default it only appears on Product Info Pages.Thanks. Link to comment Share on other sites More sharing options...
rocky Posted February 24, 2010 Share Posted February 24, 2010 You need to modify all the PHP files of the pages you want to include thickbox. For example, to add thickbox to all CMS pages, add the following before to line 15 of cms.php (before including header.php): $css_files = array(__PS_BASE_URI__.'css/thickbox.css' => 'all'); $js_files = array(__PS_BASE_URI__.'js/jquery/thickbox-modified.js'); Then you need to add the following in the TPL files of the pages you want to include thickbox. For example, to add thickbox to all CMS pages, add the following to the top of cms.tpl: {include file=$tpl_dir./thickbox.tpl} Link to comment Share on other sites More sharing options...
Ovi Posted February 24, 2010 Author Share Posted February 24, 2010 Thanks a lot rocky, i tried myself a couple ideas but the problem was that i made changes only in the .tpl files, i had no idea about the PHP files. Thanks again, works! Link to comment Share on other sites More sharing options...
Ovi Posted April 14, 2010 Author Share Posted April 14, 2010 I'm having a small problem with the order.php file.I managed to add thickbox on all my required pages, excepting the FIRST STEP of the order page.When the card has products in it, on the order.php page that displays the cart's content, Thickbox doesn't work. I tried a whole bunch of combinations for adding that $css_files = array(__PS_BASE_URI__.'css/thickbox.css' => 'all'); $js_files = array(__PS_BASE_URI__.'js/jquery/thickbox-modified.js'); in order.php , but it seems i can only get it to work on the other steps.The rest was easy, because order.php contained:/* * Manage address */function processAddress() .....so i knew where to add that code. But for the first step that dispalys cart total, i'm unable to make it work.Help please? Link to comment Share on other sites More sharing options...
rocky Posted April 15, 2010 Share Posted April 15, 2010 I think you need to add those lines before line 114 in order.php (the include header.php line). Change this section: /* Default page */ $smarty->assign('empty', 1); Tools::safePostVars(); include_once(dirname(__FILE__).'/header.php'); $smarty->display(_PS_THEME_DIR_.'shopping-cart.tpl'); to: /* Default page */ $smarty->assign('empty', 1); Tools::safePostVars(); $css_files = array(__PS_BASE_URI__.'css/thickbox.css' => 'all'); $js_files = array(__PS_BASE_URI__.'js/jquery/thickbox-modified.js'); include_once(dirname(__FILE__).'/header.php'); $smarty->display(_PS_THEME_DIR_.'shopping-cart.tpl'); Link to comment Share on other sites More sharing options...
Ovi Posted May 5, 2010 Author Share Posted May 5, 2010 Thanks, but it doesn't work..i tried that before and i tried it again now, but still nothing. Link to comment Share on other sites More sharing options...
Camille Frisch Posted September 9, 2010 Share Posted September 9, 2010 Hihad rougly the same problem as you, couldn't have thickbox on order page step 1i fixed it adding this <!--MODMIKA THICKBOX CUSTOM IMAGES --> {include file=$tpl_dir./thickbox.tpl} <link href="/css/thickbox.css" rel="stylesheet" type="text/css" media="screen" /> [removed][removed] on top of shopping-cart.tpl Link to comment Share on other sites More sharing options...
gwaroth Posted February 8, 2011 Share Posted February 8, 2011 Hi You Guys,i just read this tutorial to enhance Thick box on CMS page.I'd need one more information to get the thing working.Indeed once the CMS.Php and CMS.tpl files are modified and the pictures are uploaded on the page, how to link the pictures and the script?Cheers,Ali Link to comment Share on other sites More sharing options...
Artificial Colours Posted April 15, 2011 Share Posted April 15, 2011 Does anybody know how todo this with 1.4 as there is no thickbox.tp file so cannot include the following? {include file=$tpl_dir./thickbox.tpl} Link to comment Share on other sites More sharing options...
josias Posted June 3, 2011 Share Posted June 3, 2011 In PS 1.4.1 I tried to do the same but with "jquery.fancybox-1.3.4.js", and I'm not able.If I write "$js_files = array(__PS_BASE_URI__.'js/jquery/jquery/jquery.fancybox-1.3.4.js');" in cms.php.. don't happen nothing!Someone can help me please?thanks! Link to comment Share on other sites More sharing options...
Prestadaube Posted November 27, 2011 Share Posted November 27, 2011 Please is someone having the solution for this issue? I'm trying to use fancybox in CMS pages, but impossible to get it works... I'm using prestashop 1.4.3. Thank you a lot for your help ! Link to comment Share on other sites More sharing options...
Prestadaube Posted December 14, 2011 Share Posted December 14, 2011 UP. I still need help on this one. Thank you! Link to comment Share on other sites More sharing options...
AKJV Posted December 18, 2011 Share Posted December 18, 2011 (edited) What I have done is adding the following call to the thickbox script in tpl files where I needed it: <link href="{$base_dir}css/thickbox.css" rel="stylesheet" type="text/css"/> <script src="{$base_dir}js/jquery/thickbox-modified.js" type="text/javascript"></script> <script type="text/javascript"> // <![CDATA[ ThickboxI18nClose = "{l s='Close'}"; ThickboxI18nOrEscKey = "{l s='or Esc key'}"; tb_pathToImage = "{$img_ps_dir}loadingAnimation.gif"; //]]> </script> Just place this code somewhere at the start of your tpl files. Then add class="thickbox" to the links which you would like to see as popups. Don't forget to enable 'Force compile' in your backoffice for changes to tpl files. EDIT: I forgot to mention that this works for PS version 1.4.x Edited December 18, 2011 by AKJV (see edit history) Link to comment Share on other sites More sharing options...
Billy Posted February 5, 2012 Share Posted February 5, 2012 if I wanted to add ((( class="thickbox" ))) to the cms.tpl file how would i do this? It seems it would go in the foreach loop. But Where? {/foreach} </ul> {/if} {if isset($cms_pages) & !empty($cms_pages)} <h4>{l s='Personal Collection of Coin-Op Machines in : '}{$category->name}{l s='...'}</h4> <ul class="bullet"> {foreach from=$cms_pages item=cmspages} <li> <a href="{$link->getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{$cmspages.meta_title|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} Link to comment Share on other sites More sharing options...
Billy Posted February 5, 2012 Share Posted February 5, 2012 Let me add that I am on version... PrestaShop™ 1.4.5.1 Link to comment Share on other sites More sharing options...
acateon Posted February 13, 2012 Share Posted February 13, 2012 I would like to use this to save my customers from leaving our site while paying by credit card. The debit process uses a external site. <p class="payment_module"> <a href="javascript:document.dibs_form.submit();" onclick="return doPopup();" title="{l s='Pay with dibs' mod='dibs'}" style="height:48px"> <img src="{$module_dir}logos/dibs_{$logo_color}.jpg" alt="{l s='dibs logo' mod='dibs'}" style="float:left;"/> <br /><strong>{l s='Pay with dibs' mod='dibs'}</strong> <br />{l s='Pay safely and quickly with dibs.' mod='dibs'} <br style="clear:both" /> </a> </p> <form name="dibs_form" action="https://payment.architrade.com/paymentweb/start.action" method="post"> {foreach from=$p key=k item=v} <input type="hidden" name="{$k}" value="{$v}" /> {/foreach} </form> I tried to putt the thickbox class in the a-tag. The thickbox shows upp but i wont load the external site into it. I guess its at conflict with the java submission of the form. Does anyone have a clue on how to get this to work? Link to comment Share on other sites More sharing options...
steviger Posted February 29, 2012 Share Posted February 29, 2012 (edited) What I have done is adding the following call to the thickbox script in tpl files where I needed it: <link href="{$base_dir}css/thickbox.css" rel="stylesheet" type="text/css"/> <script src="{$base_dir}js/jquery/thickbox-modified.js" type="text/javascript"></script> <script type="text/javascript"> // <![CDATA[ ThickboxI18nClose = "{l s='Close'}"; ThickboxI18nOrEscKey = "{l s='or Esc key'}"; tb_pathToImage = "{$img_ps_dir}loadingAnimation.gif"; //]]> </script> Just place this code somewhere at the start of your tpl files. Then add class="thickbox" to the links which you would like to see as popups. Don't forget to enable 'Force compile' in your backoffice for changes to tpl files. EDIT: I forgot to mention that this works for PS version 1.4.x Hi, I tried your solution but nothing happens. Copied the code in cms.tpl and made a link with class="thickbox". I'm using 1.4.5.1. btw. Any ideas what I'm doing wrong? Cheers, Steven Hi guys, I found this solution Works like a charm! Edited February 29, 2012 by steviger (see edit history) 1 Link to comment Share on other sites More sharing options...
BoKr Posted December 20, 2012 Share Posted December 20, 2012 I would like to use this to save my customers from leaving our site while paying by credit card. The debit process uses a external site. <p class="payment_module"> <a href="javascript:document.dibs_form.submit();" onclick="return doPopup();" title="{l s='Pay with dibs' mod='dibs'}" style="height:48px"> <img src="{$module_dir}logos/dibs_{$logo_color}.jpg" alt="{l s='dibs logo' mod='dibs'}" style="float:left;"/> <br /><strong>{l s='Pay with dibs' mod='dibs'}</strong> <br />{l s='Pay safely and quickly with dibs.' mod='dibs'} <br style="clear:both" /> </a> </p> <form name="dibs_form" action="https://payment.architrade.com/paymentweb/start.action" method="post"> {foreach from=$p key=k item=v} <input type="hidden" name="{$k}" value="{$v}" /> {/foreach} </form> I tried to putt the thickbox class in the a-tag. The thickbox shows upp but i wont load the external site into it. I guess its at conflict with the java submission of the form. Does anyone have a clue on how to get this to work? Hello I want to call my terms and conditions and another cms page, rights of withdrawal, by thickbox or any other means that allow the client to stay on the page. Best would be if I could also size the window so text is better legible. I trief the following but ended up in a loading animation (so far so good..) that loads a white screen with a bookmark js. <a class="thickbox" href="/prestashop/cms.php?id_cms=3" >My special terms </a> or when needed <a class="thickbox" href="/cms.php?id_cms=3" >My special terms </a> I made sure by deactivating easy URL that I got the right link and the cms page exists. What is wrong? At the moment I have only this working but customers have to 'leave' the page or are being psychologically interupted in the order process...due to the target attribute _blank or self .... <!-- ITO AGB & Widerrufsrecht added by Simon Agostini Steuer---> <div style="padding: 10px 0 10px 8px;"> {l s='I have read the terms of service and agree with submit of my order with the conditions'} <br> {l s='('} <a class="iframe" href="{if $lang_iso=='de'}{$link->getCMSLink('3','agbs')}?content_only=1{else}{$link->getCMSLink('3','terms-and-conditions-of-use')}?content_only=1{/if}" class="iframe">{l s='AGB'}</a> {l s='und'} <a href="{if $lang_iso=='de'}{$link->getCMSLink('8','widerrufsbelehrung')}&content_only=1{else}{$link->getCMSLink('8','cancellation-policy')}&content_only=1{/if}" target="iframe">{l s='Widerrufsbelehrung'}</a> {l s='zur Kenntnis nehmen.)'} thanks alot for any clues and help! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now