Author Topic: Custom Field - Remove "No Additional Charge" from custom field dropdown  (Read 153 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
  • Full Member
  • *
  • Posts: 1142
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.6
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.8.2
Virtuemart 3.2.6
Olympiantheme Hera (customized)