ajensen27 Posted October 25, 2012 Share Posted October 25, 2012 (edited) I'm trying to have a size chart open up in a fancybox popup when someone clicks on a link I have for a CMS page that shows a sizing chart for my products. The link is in my product description. I tried using the "insert/Edit Link" option in the product description editor but couldn't find anything that would do this. Even the Javascript popup option didn't do what I wanted, it just opened a new window with my sizing chart displayed in my middle frame. Is there an easy way to do this or a module I can download? Thanks! Edited October 25, 2012 by ajensen27 (see edit history) 1 Link to comment Share on other sites More sharing options...
alexsaiz Posted July 29, 2013 Share Posted July 29, 2013 Did you find the solution ajensen27? I have the same issue now. Thanks! Link to comment Share on other sites More sharing options...
vekia Posted July 30, 2013 Share Posted July 30, 2013 hello you have to attach the fancybox library in the front controller media function, then you will be able to use it on cms pages Link to comment Share on other sites More sharing options...
alexsaiz Posted July 30, 2013 Share Posted July 30, 2013 Thanks for the reply Vekia. And how do you do that? Link to comment Share on other sites More sharing options...
vekia Posted July 31, 2013 Share Posted July 31, 2013 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 1 Link to comment Share on other sites More sharing options...
alexsaiz Posted July 31, 2013 Share Posted July 31, 2013 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 Thanks! I have just followed your directions. I'm trying now to add a link or photo and then select the class "fancy box" but it is still not there. Should I do it like this? Link to comment Share on other sites More sharing options...
vekia Posted July 31, 2013 Share Posted July 31, 2013 add somewhere: $(document).ready(function(){ $('.fancybx').fancybox({ 'hideOnContentClick': true, 'transitionIn' : 'elastic', 'transitionOut' : 'elastic' }); }); then when you're creating links use "fancybx" class Link to comment Share on other sites More sharing options...
alexsaiz Posted July 31, 2013 Share Posted July 31, 2013 Where do I add this code you have just posted? Link to comment Share on other sites More sharing options...
vekia Posted July 31, 2013 Share Posted July 31, 2013 in the cms.tpl file don't forget about {literal}{/literal} tags here is the code to paste: {literal} $(document).ready(function(){ $('.fancybx').fancybox({ 'hideOnContentClick': true, 'transitionIn' : 'elastic', 'transitionOut' : 'elastic' }); }); {/literal} Link to comment Share on other sites More sharing options...
vincentthird Posted August 9, 2013 Share Posted August 9, 2013 need help please: how to load product page using fancybox... thank you Link to comment Share on other sites More sharing options...
vekia Posted August 9, 2013 Share Posted August 9, 2013 thanks for the url i replied there 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