Magento geniuses, here's one for you...
I have a category page displaying 8 products in grid format of 3 x 3.
I would like to add a video right in the middle like this :
Prod1 Prod2 Prod3
Prod4 VIDEO Prod5
Prod6 Prod7 Prod8
Any ideas ??
Solved! Go to Solution.
There is no out-of-the-box way to do such thing. From developer's standpoint, the easiest way would be by implementing your logic into vendor/magento/module-catalog/view/frontend/templates/product/list.phtml where you can easily add video block in 5th <div>. You can add one $counter where you'll count until you've rendered 4 <div> blocks, and then just add "if" statement to check if $counter == 4 and render your video (doesn't matter how do you plan to render it, and where is the source of it).
There is no out-of-the-box way to do such thing. From developer's standpoint, the easiest way would be by implementing your logic into vendor/magento/module-catalog/view/frontend/templates/product/list.phtml where you can easily add video block in 5th <div>. You can add one $counter where you'll count until you've rendered 4 <div> blocks, and then just add "if" statement to check if $counter == 4 and render your video (doesn't matter how do you plan to render it, and where is the source of it).
Thank You!