VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: kostianev on June 03, 2016, 14:08:07 PM

Title: Different color for Products title each other
Post by: kostianev on June 03, 2016, 14:08:07 PM
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?
Title: Re: Different color for Products title each other
Post by: 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.
Title: Re: Different color for Products title each other
Post by: 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.

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.
Title: Re: Different color for Products title each other
Post by: Ghost on June 03, 2016, 14:31:09 PM
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>
Title: Re: Different color for Products title each other
Post by: kostianev on June 03, 2016, 15:14:22 PM
In which file is this? Can you give me also example with custom field? Thank you bro