Sign up to receive email updates and to hear what's going on with our magazine!
Magento 2 is an eCommerce platform where you can run your personal online store. Magento 2 provides several features to help you manage your stores according to your requirements.
Adding videos to products is one of the many important features of Magento 2, and using this feature can help you inform your customers about your products in a better way.
Hence, in this tutorial, we are going to learn how to integrate videos to products in Magento 2. To do that, we’ll have to follow these steps:
In order to add Youtube videos to products, you need to generate a Youtube API key. First, login to your Google account and go to Google Developers Console.
You’ll be greeted with the following screen:
Click the menu button on the left corner of the page:
Select API Manager:
Now you should be on the API library page. Click on Youtube Data API.
Now Create Project to enable the API.
Enable the API as shown below:
Once you are on the following screen, go to the Credentials tab.
Click on Create Credentials.
Select API key option.
You have finally generate an API key as demonstrated in the image below:
Go to the Admin Panel of your Magento Store and navigate to the Store tab from the left corner of the page. Select Configuration from the options.
Now click on Catalog:
Go to Product Video section and insert the Youtube API key which we generated in Google Developers Console. Then click on Save Config.
Go to the Admin Panel of the Magento Store and navigate to the Products tab. Next, click the Catalog option.
Click on the Edit option of product.
Now go to the Images and Videos section of Product and click on Add Video.
Enter the Product video URL from Youtube and click on Save.
Now, just click on Save as shown in the image below:
Go back to the Product page and you will see the result.
You can use the video feature to attract and convince the customer about the product. By following this tutorial, you’ll be able to add video to products in Magento store easily. If you have a problem or would like to add to the discussion, just leave a comment below.
Syed Muneeb Ul Hasan is an expert in PHP and Magento, he prefers to educate users in implementing and learning Magento. When not working, he loves to watch cricket.