News:

Support the VirtueMart project and become a member

Main Menu

Change color of custom fields name

Started by jesussuarez, March 05, 2019, 12:29:12 PM

Previous topic - Next topic

jesussuarez

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 :-)

Studio 42

You need to add a container for product_name
Something like
<span class="myColorClass"><?php echo $item->product_name ?></span>

jesussuarez

Where I need to add this code?

Thank you very much :-)

Studio 42

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>'

jesussuarez

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 :-(


GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation