How To Replace The 3rd Product With An Image In Product List For Perstashop?

For example, there are 9 products show at the category per page

I would like to replace the 3rd product to an image (just hardcode it is ok, no backend need), and so the 3rd product are now go to the next block

Are there any module for this purpose or how to customize it? Notice that the 3rd image need to remain there after sorting/ filtering the product list.

The product list template:

{foreach from=$products item=product name=products}

Thanks a lot



There should be a variable called "nbItemsPerLine" in top of product-list.tpl. If that is not the case add this to the top of your template file

{assign var='nbItemsPerLine' value=3}

And then change the foreach loop like this :

{foreach from=$products item=product name=products}
  {if $smarty.foreach.products.iteration % $nbItemsPerLine == 0}
      <img src="..." />
    [current code...]