Magento 2 Youtube Related Videos

I have just created a fully tested Magento 2 module for showing Youtube Related Videos between main content section and footer. It displays Youtube videos relative to the current page content using Youtube video API. Download and use it free of cost on your Magento webshop. Download from my Github page here.

This module can be used to show page title related videos from Youtube between page content and footer section. I have also implemented magento cache to avoid frequent Youtube API query. It stores page wise related Youtube videos in cache until the Magento cache is not cleared. There is a cache timeout which can be configured in admin section in seconds.

Compatibility

This module is tested and working with

  • Magento 2.4.6 and above (should work upto 2.4.4 with php 8.0)
  • PHP 8.1 and above

Installation

Installation is pretty simple. Copy the Rbncha_Main module inside code/ directory of your Magento installation. Run enable module command

>bin/magento module:enable Rbncha_Main

Configuration

  1. Login to Admin
  2. Go to Store > Configuration. You will see Rbncha menu tab.
  3. Enable and configure the module at Rbncha > Youtube API.
  4. clear the cache

>bin/magento s:s:d -f && bin/magento c:f

The default values

  1. Maximum Result : 3 videos
  2. Maximum cache time :  86400 seconds

How it looks in frontend