I need to add a You Tube video with thumbnail images in product details page. Also when click that video that should load in the image frame.
-
may be this link helps, but this extension has additional features.....– Baby in MagentoSep 7, 2016 at 12:07
2 Answers
These might help some how but not fully.
In order to add video to your product page in Magento through custom coding, you can do the following:
Create “video” text input attribute. Add it to appropriate attribute set and reindex your data.
The following file will help you to find the place where you want to place the video.
app/design/frontend/yourpackage/yourtheme/template/catalog/product/view.phtml
Find the following code if you want to add the video under the product name.
<div class="product-name"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?></div>
Now you just have to paste the video UID (Unique Identifier) into the video attribute field to display the video. For example, xbL0ab22WEc is the UID in https://www.youtube.com/watch?v=xbL0ab22WEc.
- Insert the following code. It will add the video under the product name.
<?php if($_product->getVideo()): ?> <iframe width="560" height="315" src="http://www.youtube.com/embed/<?php echo $_product->getVideo() ?>" frameborder="0" allowfullscreen></iframe> <?php endif; ?>
Now you just have to paste the video UID (Unique Identifier) into the video attribute field to display the video. For example, xbL0ab22WEc is the UID in https://www.youtube.com/watch?v=xbL0ab22WEc.
Try using these modules
https://github.com/flintdigital/mage-mod-product-videos-iwd
https://www.magentocommerce.com/magento-connect/productvideo-by-niveus.html
These would do the trick for you