greek_batter Posted November 7, 2011 Share Posted November 7, 2011 How can I add image links which opens in thickbox in cms pages in prestashop 1.4? Any help would be appreciated... 1 Link to comment Share on other sites More sharing options...
jesusruiz Posted December 9, 2011 Share Posted December 9, 2011 I have the same problem. I need to create an image gallery CMS, but it does not work. Did you find any solution? Thank you. Link to comment Share on other sites More sharing options...
CartExpert.net Posted December 9, 2011 Share Posted December 9, 2011 Hello! You need to include the necessary Javascript files, name the elements properly. It should work that way. Link to comment Share on other sites More sharing options...
ecoloures Posted February 29, 2012 Share Posted February 29, 2012 Hi, After one month of demand finally the solution ... In the folder "override \ controllers" create file "CMSController.php" with the following code: <?php class CmsController extends CmsControllerCore { public function setMedia() { parent::setMedia(); Tools::addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'screen'); Tools::addJS(array(_PS_JS_DIR_.'jquery/jquery.fancybox-1.3.4.js', _PS_JS_DIR_.'jquery/jquery.serialScroll-1.2.2-min.js', _THEME_JS_DIR_.'product.js')); if (Configuration::get('PS_DISPLAY_JQZOOM') == 1) { Tools::addCSS(_PS_CSS_DIR_.'jqzoom.css', 'screen'); Tools::addJS(_PS_JS_DIR_.'jquery/jquery.jqzoom.js'); } } } Add the class "thickbox" to the image you want to open in modal window See the effect created on my website After all is very simple Can see more information on: http://www.rolandl.f...s-les-pages-cms Je remercie Ludovic Roland HV Link to comment Share on other sites More sharing options...
fulviods Posted March 21, 2012 Share Posted March 21, 2012 grandiose! merci ! Link to comment Share on other sites More sharing options...
fulviods Posted March 21, 2012 Share Posted March 21, 2012 In fact no need to add this modification in a 1.4.7 ! just add thickbox to the image class and it opens in a thickbox With this CMSController.php it opens the image twice, once in thickbox and once in fancybox.. Link to comment Share on other sites More sharing options...
abroucek Posted May 30, 2012 Share Posted May 30, 2012 I have 1.4.7 and I had to use the code written here by ecoloures and it helped! Thank you very much! Link to comment Share on other sites More sharing options...
venintech Posted July 13, 2012 Share Posted July 13, 2012 How can display a gallery with mutiple images? Pls. help. Link to comment Share on other sites More sharing options...
sketchharris Posted April 18, 2013 Share Posted April 18, 2013 I tried this method in PS 1.5.3 and it worked for 5 minutes. After refreshing the page, all my CMS Pages were blank (white) no content! Is there a fix for 1.5.3 yet or am I out of luck with this? Link to comment Share on other sites More sharing options...
alain56 Posted May 31, 2013 Share Posted May 31, 2013 Hi, I up this post cause this method doesn't work for videos. Indeed, i'd like to open videos in CMS with Fancybox, like on this website : http://www.actionpro.de/alt/videosSD21.html (I'm on PS v1.4.9 ) So, i created the file CMSController.php, with the code written previously in this topic, and put the file in override/controllers. And I've added this code in my CMS to test : <a class="thickbox" href="http://www.youtube.com/watch?v=F_rEHfLgdcY"><img src="http://www.my-website.com/img/test.jpg" alt="" width="800" height="448" /></a> The only result I get is when i click on the image "test.jpg", a loading animation like this one : http://www.google.fr/imgres?q=loading+gif&um=1&sa=N&biw=1920&bih=955&hl=fr&tbm=isch&tbnid=9rvBEbPXvUM4PM:&imgrefurl=http://www.pol-fraiture.be/fr-photos%2Bview%2B35&docid=U6AKPXoOLOUOdM&imgurl=http://www.pol-fraiture.be/img/loading.gif&w=800&h=800&ei=XaaoUZycJcOYhQf1y4D4Cg&zoom=1&iact=hc&vpx=4&vpy=147&dur=652&hovh=225&hovw=225&tx=71&ty=102&page=1&tbnh=138&tbnw=131&start=0&ndsp=51&ved=1t:429,r:0,s:0,i:160 appears, but is always loading and loading : the video never opens ?! Anybody to help me please ? Link to comment Share on other sites More sharing options...
alain56 Posted June 1, 2013 Share Posted June 1, 2013 No idea ? Link to comment Share on other sites More sharing options...
leomazz Posted July 16, 2013 Share Posted July 16, 2013 Hi! Any way to make this work on PS 1.5.3.1 ? Thanks! Link to comment Share on other sites More sharing options...
vekia Posted July 16, 2013 Share Posted July 16, 2013 if you want to display videos in the fancybox popup you have to include this library in the front controller setmedia function Link to comment Share on other sites More sharing options...
leomazz Posted July 18, 2013 Share Posted July 18, 2013 if you want to display videos in the fancybox popup you have to include this library in the front controller setmedia function Hi! And how I can do that? Thanks! Link to comment Share on other sites More sharing options...
vekia Posted July 18, 2013 Share Posted July 18, 2013 hello open FrontController.php file located in the classes/controller/ directory you've got there setmedia function at the end of this function and right before the Hook::exec('actionFrontControllerSetMedia', array()); add this code: $this->addjqueryPlugin('fancybox'); $this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'all'); // @TODO 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