VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: jesussuarez on March 05, 2019, 12:29:12 PM

Title: Change color of custom fields name
Post by: jesussuarez on March 05, 2019, 12:29:12 PM
Hello

How can I change color of custom fields name in cart?
I like to change color only of custom fields name, not of value

.vm-customfield-cart

I'll appreciate any sugestion

Thank you very much :-)
Title: Re: Change color of custom fields name
Post by: Studio 42 on March 05, 2019, 15:38:23 PM
You need to add a container for product_name
Something like
<span class="myColorClass"><?php echo $item->product_name ?></span>
Title: Re: Change color of custom fields name
Post by: jesussuarez on March 05, 2019, 20:47:34 PM
Where I need to add this code?

Thank you very much :-)
Title: Re: Change color of custom fields name
Post by: Studio 42 on March 05, 2019, 21:44:48 PM
in components/com_virtuemart/views/cart/tmpl/default_pricelist.php
original virtuemart code is
      <?php echo JHtml::link ($prow->url, $prow->product_name);
         echo $this->customfieldsModel->CustomsFieldCartDisplay ($prow);
       ?>
or in your template/YOURTEMPLATE/html/com_virtuemart/cart/default_pricelist.php

replace $prow->product_name
with
'<span class="myColorClass">'.$prow->product_name.'</span>'
Title: Re: Change color of custom fields name
Post by: jesussuarez on March 06, 2019, 00:20:42 AM
Hello Sir. Studio 42

Well, I try your solution, but seems that not work for me :-(

1) I change the code that you specify in components/com_virtuemart/views/cart/tmpl/default_pricelist.php and I add .colorescarro {color: #ff0000 !important;} in template.css of my joomla template with no results :-(

2) I'm not using overrides (Cart folder are not in  template/YOURTEMPLATE/html/com_virtuemart/), then I can't try this modification in my template folder

3) Because I'm using VP ONE PAGE CHECKOUT, I try to modify plugins/system/vponepagecheckout/cart/tmpl /default_pricelist.php (with the same code that you give me), and with the code .colorescarro {color: #ff0000 !important;} added in template.css of my joomla template with no results :-(

Title: Re: Change color of custom fields name
Post by: GJC Web Design on March 06, 2019, 10:25:34 AM
you should be over riding plugins/system/vponepagecheckout/cart/tmpl /default_pricelist.php  !!!!

https://www.virtueplanet.com/forum/announcements/8816-update-vp-one-page-checkout-plugin-for-virtuemart?start=10#15867