Jump to content

Open product videos in a fancybox


Recommended Posts

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

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 by zeezuiper (see edit history)
Link to comment
Share on other sites

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 by zeezuiper (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...