News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Different color for Products title each other

Started by kostianev, June 03, 2016, 14:08:07 PM

Previous topic - Next topic

kostianev

Hello, I have 10 products in my Virtuemart, so I want to have different color Background for each. Please, tell me how can i Achieve this. Maybe somewhere, if I can add additional class to the product title?

Ghost

Create a template override and modify to your liking, add CSS classes, etc. Then add CSS to your template.

kostianev

I want different color for each product title, not same color for all, so I need every product title to have different class style.

Quote from: Ghost on June 03, 2016, 14:09:22 PM
Create a template override and modify to your liking, add CSS classes, etc. Then add CSS to your template.

Ghost

Quote from: kostianev on June 03, 2016, 14:23:44 PM
I want different color for each product title, not same color for all, so I need every product title to have different class style.
Yes, you can do that. Use some var like product id or custom field. Example with product id:

<h2 class="<?php echo 'myclass-'.$product->virtuemart_product_id;?>"><?php echo JHtml::link ($product->link.$ItemidStr$product->product_name); ?></h2>

kostianev

In which file is this? Can you give me also example with custom field? Thank you bro