Author Topic: Custom Field - Remove "No Additional Charge" from custom field dropdown  (Read 1951 times)


  • Beginner
  • *
  • Posts: 32
  • Still a beginner, but getting better...:)
    • Mom's Favorite Fudge
  • VirtueMart Version: 3.0.12
I have a few custom fields that offer many options on drop down lists for the customer.  The addition of the price or the words "No Additional Charge" is something I'd rather not have them see in the drop down.  I'll handle that myself in the item details. 

My versions of Joomla! and VM aren't the most current but I've enjoyed a VERY stable site for almost two years and would rather not have to apply any upgrades to do this.  A flick of a checkbox or insert/delete/modify some CSS or PHP code somewhere are methods I'm comfortable with.

How can I safely and easily remove this verbiage?

Thank you...

Joomla! Version: 3.6.5
VM3: 3.0.18
PHP: 5.5.38
Thank you very much...


  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2835
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Custom Field - Remove "No Additional Charge" from custom field dropdown
« Reply #1 on: November 07, 2017, 06:54:59 am »

You can use the str_replace('No Additional Charge', '', $the_actual_item_str); and remove the text. Or You could find the text in the language file and remove it there.

I made something similar for VM 3.2.5 in sublayout/customfields.php approx line 53, replacing ( SEK 0,00) with nothing:

Code: [Select]
if (!empty($field->display)){ ?>
            <div class="product-field-display">
    <?php // JH 2017-10-14 
       echo str_replace('( SEK 0,00)'''$field->display);



Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)


  • Beginner
  • *
  • Posts: 29
  • VirtueMart Version: 3.2.14
Re: Custom Field - Remove "No Additional Charge" from custom field dropdown
« Reply #2 on: December 14, 2017, 09:51:18 am »
I am on J.3.8.3 and VM 3.2.8 but can not find this ccode in  either:
/components/com_virtuemart/sublayouts/customfields.php  or

I have managed to remove the wording "No additional charge" in the drop down selection of custom fields via language override.
Further I handled the addition of the price for custom fields in:
by amending: $price ="+".$price; (around line 918)
to: $price ="";
This worked before updating Virtuemart from ver 3.2.4 to ver 3.2.8
After update the file had been overwritten so I re-applied the above change but nevertheless the custom fileds price addition continues to appear in the dropdown (e.g. customfieldName +€10).
Any suggestions how to achieve this again?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4341
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3