News:

Looking for documentation? Take a look on our wiki

Main Menu

Video among the images of the product

Started by ex3mist, June 16, 2015, 10:19:17 AM

Previous topic - Next topic

ex3mist

Hello,
I'd like to ask if anyone knows an extension that allows to insert a video among the product images? Not talking about putting video anywhere in the product details page, but among the images. An example could be seen here.

PRO

I custom field "position" can be in the same place as the images.

what type of video?


youtube? or a custom upload?

Studio 42

#2
Hi,
I have do it here in my shop:
http://shop.st42.fr/en/products/vm-be-pro-batch-product-edit.htm
I add the tags in the image title (XXXXX is the youtube ID):
youtube-XXXXXX for a simple youtube video
or youlist-XXXXXX for a youtube playlist
and added it in my overide templates/YOURTEMPLATE/html/com_virtuemart/productdetails/default_images.php

this is the php code i use:
if (!empty($this->product->images)) {

$image = $this->product->images[0];
if (substr($image->file_title,0,7) == 'youtube' ) {
$videoId = substr($image->file_title,8) ;
echo '<div class="embed-responsive embed-responsive-16by9">
<iframe  class="embed-responsive-item" src="https://www.youtube.com/embed/'.$videoId.'" frameborder="0" allowfullscreen></iframe></div>';
}
elseif (substr($image->file_title,0,7) == 'youlist' ) {
$videoId = substr($image->file_title,8) ;
echo '<div class="embed-responsive embed-responsive-16by9">
<iframe  class="embed-responsive-item" src="https://www.youtube.com/embed/videoseries?list='.$videoId.'&amp;showinfo=0" frameborder="0" allowfullscreen></iframe></div>';
}
else
{
// old code for image
?>
<div class="main-image">


Of course you have to add the CSS to fith your template
or add this : https://github.com/twbs/bootstrap/blob/master/less/responsive-embed.less for responsiveness for eg.

If you want play your own videos, then you have to add the javascript for it, for you tube this code work without any changes

ex3mist

Thank you, Studio 42! That's what I meant.
But... Is there an option the video to be in the popup with the other images? So that it could be watched in bigger window. You can see the template I'm using and in the bottom right corner of the image there is an icon for opening it in popup: http://karateland.shumkarov.com/index.php/en/schuetzer/nahkampf-faustschutz-detail.html
I'd like the video to be in the popup "slideshow" too. Of course the zoom window won't work for it.

Studio 42

Hi,
I don't know the time to change the code and if this is possible with native facebox or fancybox.
Perhaps this need 1 or 2 hours or 10 minutes, i had already 30 minutes to find a simple solution for my case(i don't need to integrate the video in slide-show).
I think you understand that i cannot work on your project 2 hours for free but certainly someone answer a day and give you the solution.
Grreets,
Patrick

ex3mist

OK, I understand. But if some payment is needed for this to be made, would you do it? If the price is reasonable I'm willing to pay for it, everyone deserves a payment for his job.