zeezuiper Posted October 25, 2015 Share Posted October 25, 2015 What is the easiest way to get product Youtube videos openen in a fancybox? I did found a article (https://mypresta.eu/en/art/developer/gallery-on-cms-page-fancybox.html) about using videos on CMS pages but this is for a different Prestashop version and does also not really apply to the product pages. I use the default theme and Prestashop version 1.6.1.1 Link to comment Share on other sites More sharing options...
NemoPS Posted October 26, 2015 Share Posted October 26, 2015 What about my method? http://blog.arvixe.com/triggering-custom-popups-in-prestashop/ Link to comment Share on other sites More sharing options...
zeezuiper Posted October 26, 2015 Author Share Posted October 26, 2015 (edited) When I try your method I get the following error (in a fancybox): The requested content cannot be loaded.Please try again later. I also tried the second option (with the hidden div), but same result. The link itself is good, when I copy it in the URL bar the Youtube video is loaded normally. Edited October 26, 2015 by zeezuiper (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted October 28, 2015 Share Posted October 28, 2015 What kind of code are you using? The embed one should work with the hidden div Link to comment Share on other sites More sharing options...
zeezuiper Posted October 28, 2015 Author Share Posted October 28, 2015 (edited) In the active theme global.js I have added the following line: $('.myfancybox').fancybox(); In the product description I have added the following HTML code: <a class="myfancybox" href="#youtube">Movie!</a> <div style="display: none"> <div id="youtube"> </div> </div> You can check the result here: http://www.rikxoort.com/potten/gold-stars.html Edited October 28, 2015 by zeezuiper (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted October 30, 2015 Share Posted October 30, 2015 Ah, of course, you need to add some embed code, not the link Link to comment Share on other sites More sharing options...
NemoPS Posted October 30, 2015 Share Posted October 30, 2015 Hmmm responsive like? Link to comment Share on other sites More sharing options...
zeezuiper Posted October 30, 2015 Author Share Posted October 30, 2015 Ok, makes sense , but how do I get the video resonsive than? <iframe width="300" height="150" src="https://www.youtube.com/embed/UQXgGKtCAys?rel=0&showinfo=0" frameborder="0" allowfullscreen="allowfullscreen"></iframe> Link to comment Share on other sites More sharing options...
NemoPS Posted October 30, 2015 Share Posted October 30, 2015 If you remove the hardcoded size, you should be able to use media queries on it. If not, use a wrapping div, and set the video size to 100% of it Link to comment Share on other sites More sharing options...
zeezuiper Posted October 30, 2015 Author Share Posted October 30, 2015 Well, that is scales according to the user screen size. Link to comment Share on other sites More sharing options...
zeezuiper Posted October 30, 2015 Author Share Posted October 30, 2015 If I remove the size it's automatically added back. Do you have an example of the second option please? Link to comment Share on other sites More sharing options...
NemoPS Posted October 31, 2015 Share Posted October 31, 2015 The only thing I can think of is using the !important keyword in css, or javascript to hardcode new measurements 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