- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
If this response solved your problem, click accept as solution to help others solve this issue
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
If this response solved your problem, click accept as solution to help others solve this issue
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Insert video into Product Grid on Category Page
Thank You!