Jump to content

How to change the number of products per line and the size of Featured Products


Recommended Posts

What I really need are bigger pictures in featured products.

 

I know how to make them bigger but them they overlap each other.

 

How can I change to have for example only 3 products per line instead of 4 so that I can have bigger pictures?

 

 

my website www.europaminis.com

 

Thanks for any help!

Edited by ludivick (see edit history)
Link to comment
Share on other sites

You need to override their TPL.

 

In case you don't know how :

 

1. modify this file : themes/default/modules/homefeatured/homefeatured.tpl

If it doesn't exist, create if by copying the file from /modules/homefeatured/

 

2. In the file you have some variables instantiations, find these (Around line 30) :

{assign var='liHeight' value=250}
{assign var='nbItemsPerLine' value=3}

 

Read them, they are quite easy to understand.

 

In case people can't read :

liHeight stand for "height of the list element (in pixel)"

nbItemsPerLine stand for "number of items per line"

 

3. Override the css in your theme (/themes/default/css/modules/homefeatured/homefeatured.css)

 

Good luck

 

Martin

Edited by Martin Uker K (see edit history)
Link to comment
Share on other sites

it mean that you have to use .css file located in the /themes/default/css/modules/homefeatured/homefeatured.css

it's not necessary - but it is good practice

 

if file doesnt exist there - you can copy it from original module directory (by original i mean homefeatured directory in /modules/ dir)

Link to comment
Share on other sites

Sorry, can't support during school ;).

 

The *.css override is a good pratice to keep the application updatable. Since you or your client (If it's not the same person) might want to update your module one day. The override will still EXIST, if you write in the module .css directly, your changes will be discarded after an update.

 

To override a file you need to make a duplicate one in your theme. That way you can give a more appropriate look to a module you didn't do in the context of your theme only. This way, when you change your theme, you can still have the module original CSS (Which is usually more appropriate than your in an other theme).

 

Martin

 

P.S.: That's a way to tell Prestashop "Yo dude, his .css is good, but my theme has the greatest CSS OF ALL TIME!"

Link to comment
Share on other sites

×
×
  • Create New...