Add youtube video media gallery magento 1

This tutorial explains how to add youtube video media gallery magento 1. The client want to embed youtube video with media gallery as shown below make the following amends in code.

Add youtube video media gallery magento 1

Step by step explanation

  • Add videoid attribute
  • Retrieve video id
  • Embed youtube video
  • Display youtube thumbnail image

Add videoid attribute

Add custom video id attribute from magento backend or custom attribute programmatically.

add_videoid_attribute

Retrieve video id

Make the following changes to the media.phtml file inside theme folder.(app\design\frontend\your_theme_folder\default\template\catalog\product\view)

retrieve_youtube_video_id_media_gallery_magento_1

Add youtube video media gallery magento 1

Enter the embed video code and add the video id as shown below.

Add_youtube_video_media_gallery

Display youtube thumbnail image

Display_youtube_thumbnail_image

Please click here refer how to import product images and other magento tutorials.

Share this Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *

*