cancel
Showing results for 
Search instead for 
Did you mean: 

Insert video into Product Grid on Category Page

SOLVED

Insert video into Product Grid on Category Page

 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 ??

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Insert video into Product Grid on Category Page

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 was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue

View solution in original post

2 REPLIES 2

Re: Insert video into Product Grid on Category Page

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 was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue

Re: Insert video into Product Grid on Category Page

Thank You!