Borax Posted June 3, 2014 Share Posted June 3, 2014 (edited) I would like to open facebook share page in a lightbox? Is Prestashop using fancybox or thickbox by default? And how can I trigger it from a link in product-list.tpl? www.istanbuldabuhaftasonu.com Edited June 3, 2014 by boragursel (see edit history) Link to comment Share on other sites More sharing options...
Rolige Posted June 3, 2014 Share Posted June 3, 2014 Since PS 1.5 ps use fancybox, there is a lot of information about this plug-in in google, a simple usage would be: <script type="text/javascript"> $('document').ready(function(){ $('#link').fancybox(); }); </script> <a id="link" href="#content">Show content</a> <div id="content"> Content here.... </div> 1 Link to comment Share on other sites More sharing options...
Borax Posted June 3, 2014 Author Share Posted June 3, 2014 (edited) I want to open the page to the link below in fancybox. How can I do? <a href="http://api.addthis.com/oexchange/0.8... Will I use a class, which? Do I have to add any other code? Edited June 3, 2014 by boragursel (see edit history) Link to comment Share on other sites More sharing options...
Rolige Posted June 3, 2014 Share Posted June 3, 2014 You need to add the option of iframe, here a simple example loading an external or internal url: http://jsfiddle.net/Bzn99/ More documentation in: http://fancyapps.com/fancybox/ Good luck Link to comment Share on other sites More sharing options...
Borax Posted June 3, 2014 Author Share Posted June 3, 2014 Below code opens the fancybox page, writes "contacting Facebook..." and goes to white. What do you think the problem is. Thanks for your help. The link is: http://istanbuldabuhaftasonu.com/12-cumartesi-istanbul-etkinlikleri (I also added the official facebook share button, but I prefer the addthis api) ------------------- <script type="text/javascript"> $(document).ready(function() { $('.fancy').fancybox({ 'width' : '75%', 'height' : '75%', 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' }); });</script> <div class="fb-share-button" data-href="{$product.link|escape:'html':'UTF-8'}" data-type="button_count"></div> <!-- AddThis Button BEGIN --><a class="fancy" href="http://api.addthis.com/oexchange/0.8/forward/facebook/offer?pco=tbx32nj-1.0&url={$product.link|escape:'html':'UTF-8'}&rel={$product.link|escape:'html':'UTF-8'}&pubid=ra-538cf86d20af3c18"><img src="http://cache.addthiscdn.com/icons/v1/thumbs/32x32/facebook.png" border="0" alt="Facebook" /></a> <a class="fancy" href="http://api.addthis.com/oexchange/0.8/forward/twitter/offer?pco=tbx32nj-1.0&url={$product.link|escape:'html':'UTF-8'}&pubid=ra-538cf86d20af3c18"><img src="http://cache.addthiscdn.com/icons/v1/thumbs/32x32/twitter.png" border="0" alt="Twitter" /></a> <a class="fancy" href="http://www.addthis.com/bookmark.php?source=tbx32nj-1.0&=300&pubid=ra-538cf86d20af3c18&url={$product.link|escape:'html':'UTF-8'}" target="_blank" ><img src="http://cache.addthiscdn.com/icons/v1/thumbs/32x32/more.png" border="0" alt="More..." /></a><!-- AddThis Button END --> Link to comment Share on other sites More sharing options...
Rolige Posted June 4, 2014 Share Posted June 4, 2014 Please take a look at my example on jsfiddle, you need to add some required classes in the link. Link to comment Share on other sites More sharing options...
dnugent Posted June 12, 2015 Share Posted June 12, 2015 OK that works GREAT, but how do you JUST get the page and NOT the whole site with it in there? Link to comment Share on other sites More sharing options...
Shad86 Posted March 2, 2017 Share Posted March 2, 2017 I don´t think it´s still actual but let your link end with ?content_only=1 Like website.bla/site?content_only=1 I try the same but on Presta 1.7, any chance to let it run there too? 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