Wanna Learn to add Product Video in Magento 2

Written by nilesh-kothari | Published 2019/10/14
Tech Story Tags: opensource | api-keys | youtube | video-on-homepage | magento2 | tutorial | latest-tech-stories | ecommerce

TLDR Get your YouTube API Key. Integrate YouTube API key to Magento 2. Implement the Magento Product video. Create Credentials to access API’s. Integrate the key to your Magento e-store and use it to create a video. Use the API Library to create the product video. Upload the video to use the video metadata and then upload it to the product page. Use the Product Video URL of the Youtube or Vimeo Video. The product video can be added to your product store. The video is then uploaded to the store.via the TL;DR App

Step 1: Get your YouTube API Key.
Step 2: Integrate YouTube API key to Magento 2.
Step 3: Implement the Magento 2 Product video.


Step 1: Get your YouTube API Key.
To create a project:
Login to your Google account
                    ↓
Navigate to the Google Developers Console.
                    ↓

Click the Menu button displayed on the left corner of the page.
                    ↓

Choose API & Services Library
                    ↓

Click on Library → Click on Create.
Enter the project name and again click on Create.
Create YouTube API Key
After creating the project, again click on the Menu button.
                    ↓

Choose API & Services → Library.
                    ↓

Now you’ll be redirected to the API Library page. Scroll down and click on YouTube Data API.
Now you should be on YouTube Data API Page. Click on Enable.
You need Credentials to access API’s.
Click on Create Credentials.
                    ↓

Select YouTube Data API as shown in the image below.
                    ↓

Select Web Browser (Javascript) as shown in the image below.
                    ↓

Click on What Credentials do I need.
Congratulations! You have generated an API Key.
Step 2: Integrate YouTube API key to Magento 2.
On the Admin panel of your Magento e-store, click on Stores tab from the left corner of the page.
                   

Select Configurations.
Under Catalog tab click on the catalog.
                    ↓

Under the product video section, insert the YouTube API Key generated in the Google Developers Console.
                    ↓

Click on Save Config.
Step 3: Implement the Magento 2 Product video.
On the Admin Panel of Magento e-store, go to the Catalog tab.
                    ↓

Click the Products option.
                    ↓

Click on Edit option.
Go to Images and Videos Section Select Add Video.
Enter the Product Video URL of the Youtube or Vimeo Video.
                    ↓

Complete the title, description and upload preview image.
                    ↓

Select Get Video Information to use the video metadata and then click on Save.
To see the results, go back to the Product page.






















Written by nilesh-kothari | eCommerce-obsessed founder of Planet Web Solution, a global top 15 company in Magento Development.
Published by HackerNoon on 2019/10/14