How to change the category grid from 6 Products to only 4 in one row?

Hello, jm wall is nice!

I need some help thou to change the grid of the jm product display / category display.
I only want to show 4 products in a row and I want to have the pictures larger (to fit the width of the page).
Where do I have to confgurate this? in which css files. php files? And where can I define the size of the picture display? (when I change width or height of the pictures in the configuration menu, they get even smaller. Or whats my mistake?)

Is it also possible to enlarge the picture of the detail page? Where can I do that?

thanks,
martinmo

9 answers

Profile photo of Sherlock 0.00 $tone March 19, 2013
Public

Hi martinmo,

If you want to change to show 4 products per row instead of 5 as current you would need to modify a little in code as following
Open the file of skin\frontend\default\jm_wall\js\wall.js looking for this line of code

PHP Code:

  cw_ Math.floor(mw cols), // update new width 




here you change the cols to 4 so replace the above by this

PHP Code:

  cw_ Math.floor(mw 4), // update new width 




But I think Adding a fixed columns value is not recommend for this responsive layout, the number of columns should be adjustable and determined by the screen size.

#1
Profile photo of Martin Möller 0.00 $tone March 25, 2013
Public

Thanks for that peace of code. It works for the desktop but now I allways have 4 products on the mobile devices. You are right, it spoils the responsiveness.
But is it not possible to simply increase the width of all products to make it show 4 in one row -- and keeps the responsiveness (one in one row on smartphone)? When I do this in the configuration of the jm products, nothing changes…

I realy hope you can help me here.

#2
Profile photo of Sherlock 0.00 $tone March 26, 2013
Public

Hi martinmo,

if you want to apply 4 cols for only desktop you can try to replace the above code

PHP Code:

 cw_ Math.floor(mw cols), // update new width 




by this

PHP Code:

 isTouch 'ontouchstart' in window && !(/hp-tablet/gi).test(navigator.appVersion);
                if(!
isTouch && lastWndWidth >= 960){
                  
cw_ Math.floor(mw 4// update new width
                
}else{
                  
cw_ Math.floor(mw cols// update new width    
                
}
                
mw_ cols cw_




I hope it helps !

#3
Profile photo of Susan Proctor 0.00 $tone April 18, 2013
Public

Hi, Sherlock,

I did this modification on my site:
a) It didn’t work and I still got 4 thumbnails per row!
b) Later I found that the JM Product on the front page was affected, and scrolling down, it would not add more thumbnails. It was just displaying a fixed number of thumbnails.
I removed the new code and the JM Product on the frontpage is working well again.

#5
Profile photo of Sherlock 0.00 $tone April 25, 2013
Public

Hi martinmo,

You can open the css file of skin/frontend/default/jm_wall/css/theme.css , then look for this rule

HTML Code:

     #ja-sidebar .block {
                        margin-bottom: 0;
                   }

you can add the width here so change the above to

HTML Code:

     #ja-sidebar .block {
                        margin-bottom: 0;
                        width: 100% !important;
                   }
#8

This question is now closed

Written By

Comments