Jump to content

Distinguish products on the product list


Komijo

Recommended Posts

Hello, I would distinguish products on the product list.

I would like to have a checkbox in the administration panel, after pressing the product changes the appearance of the list.

 

I do not know whether they need any special module or I can do it after the promoted products (tick the categories of home, and then in each category of product has a different background than the other).

 

 

Is it possible to do so, gladly I change my style and introduced a text that is most different tpl

 

 

 

Regards and waiting for a reply,

Jędrzej Przeździęk

Presta 1.6

Link to comment
Share on other sites

Not sure if I understand your question right. Do you want to change the background color of your product list rows, depending of which row?

(like even rows white, odd rows green)?

 

Then maybe use the CSS nth-child to do this:

 

Edit file themes/<your theme folder>/css/global.css (Make backup!)

and add to the end:

 

(If you have 3 items per row)

 

ul.product_list.grid > li:nth-child(6n-2),
ul.product_list.grid > li:nth-child(6n-1),
ul.product_list.grid > li:nth-child(6n) {

    background-color: green;

}
 
 
or:
ul.product_list.grid > li:nth-child(8n-3), 
ul.product_list.grid > li:nth-child(8n-2), 
ul.product_list.grid > li:nth-child(8n-1), 
ul.product_list.grid > li:nth-child(8n) {

    background-color: green;

}

 

(If you have 4 items per row)

 
 
 
 
This should do it.
 
 
If this was not what you wanted, please explain a little more.
 
(p.s. What is the use of making this a toggle in admininstration? Maybe just add the code or comment it out if you don't want it, using /* ... */
 
/*     code you don't want */
 
 
pascal.
Edited by PascalVG (see edit history)
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...