Jump to content

Prestashop 1.7. - how setup 4 products in row in product list, when is used also left column?


jokerstar

Recommended Posts

  • 2 months later...
  • 3 months later...
  • 2 years later...

Thanks @karen20ced4, but unfortunately that doesn't fix it for me. That layout only specify how to arrange the page's columns, but doesn't set the number of products to put in a row even when I am chosing the widest page frame, that is, one single wide column.
Has anyone found some more about this?

Thank you in advance,

/Flavio

Link to comment
Share on other sites

  • 2 months later...

I solved this, by changed the next things.

 

In the file: themes/your_theme/templates/catalog/_partials/products.tpl, changed tha class name: "product_per_3" with "product_per_4" in the next code:

<div class="item-product {if $postheme.cate_product_per_row == 1}product_per_3 col-xs-12  ...........

 

In the file: themes/theme_safira2/assets/css/theme.css changed the rule:

.col-xl-4{float:left;width:33.33333%}

in that way:

.col-xl-4{float:left;width:25%}

 

 

Edited by ilian.kirov (see edit history)
Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...

For Prestashop 1.7.8 this is the solution :

Create the file /themes/your_theme/templates/catalog/listing/product-list.tpl

Extend the original theme file and just modifiy the product_list block (thoses next lines are the full product-list.tpl, need nothing more) :

{extends file='parent:catalog/listing/product-list.tpl'}

<!-- show 4 product instead of 3 (notice the col-xl-3) -->
{block name='product_list'}
  {include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-6 col-xl-3"}
{/block}

Now in your product list (on category pages) you'll have 4 products.

Link to comment
Share on other sites

  • 8 months later...
On 8/25/2022 at 11:00 AM, Shonen said:

For Prestashop 1.7.8 this is the solution :

Create the file /themes/your_theme/templates/catalog/listing/product-list.tpl

Extend the original theme file and just modifiy the product_list block (thoses next lines are the full product-list.tpl, need nothing more) :

{extends file='parent:catalog/listing/product-list.tpl'}

<!-- show 4 product instead of 3 (notice the col-xl-3) -->
{block name='product_list'}
  {include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-6 col-xl-3"}
{/block}

Now in your product list (on category pages) you'll have 4 products.

Hi, i tried this but will not work, altleast not if i try to overide it in my childtheme. Any tips? PS 1.7.8.9

Thanks,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...