Jump to content

2 product columns for mobile?


Recommended Posts

Hello!

 

I am trying to get my page to display two columns of products on mobile devices but I don't get it to work properly.

Here's what I've done so far in the "product-list.tpl"

 

I have changed this part below to "col-xs-6 col-sm-4 col-md-3{else} col-xs-6 col-sm-4 col-md-3" instead.

col-xs-12 col-sm-4 col-md-3{else} col-xs-12 col-sm-4 col-md-3

And as you see here I have set items per line to two.

{assign var='nbItemsPerLineMobile' value=2}

The results i get looks like this.

What do I do wrong?

 

2co2646.png

 

2wn47bc.png

  • Like 1
Link to comment
Share on other sites

Try to edit your /themes/default-bootstrap/js/global.js file. There's this line:

$('.product_list > li').removeClass('col-xs-12 col-sm-6 col-md-4').addClass('col-xs-12');

Try to comment out this line or change to addClass('col-xs-6'). There's also this line:

$('.product_list > li').removeClass('col-xs-12').addClass('col-xs-12 col-sm-6 col-md-4');

You could try to change to addClass('col-xs-6 col-sm-6 col-md-4')

Link to comment
Share on other sites

×
×
  • Create New...