Author Topic: Remove : free from custom fields  (Read 2896 times)

dpodesta

  • Beginner
  • *
  • Posts: 12
Remove : free from custom fields
« on: January 06, 2012, 11:05:35 am »
I have been looking for a way to remove : free from the custom field drop down for some time.

I'm really not sure why anyone would want free to be their if there isn't a price. Wouldn't it be more of a common requirement to have nothing there.

I've read a post about using the lanuages overide file.

I really don't understand how to do that. I don't know what line to copy and past in there, do I just past the word free in there??

Can anyone please help give some instructions on how to do this?

adham

  • Jr. Member
  • **
  • Posts: 96
Re: Remove : free from custom fields
« Reply #1 on: January 06, 2012, 15:07:41 pm »
Removing Free is not a problem, good luck removing the : colon though. it is a nightmare.

Word Free can be removed in the language file en-GB.com_virtuemart.ini, you can delete it or rename it to anything you want

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10404
  • VirtueMart Version: 3+
Re: Remove : free from custom fields
« Reply #2 on: January 06, 2012, 15:49:43 pm »
<?php $field->display  = str_replace( ':', '', $field->display) ?><?php echo $field->display ?>
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

adham

  • Jr. Member
  • **
  • Posts: 96
Re: Remove : free from custom fields
« Reply #3 on: January 07, 2012, 00:56:11 am »
<?php $field->display  = str_replace( ':', '', $field->display) ?><?php echo $field->display ?>


Where ? in what file?
I did replace it in default.php on line 183 and 194 but it is still showing. maybe a more detailed solution instead of just putting a line of code in the reply?
Thanks

OK Here it is:
 In you product view tmpl open the default.php
look for this line
<span class="product-field-display"></span>

Replace it with:
<span class="product-field-display"><?php $field->display = str_replace( ':', '', $field->display) ?><?php echo $field->display ?></span>

To remove the ":" colon from the custom image field

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10404
  • VirtueMart Version: 3+
Re: Remove : free from custom fields
« Reply #4 on: January 07, 2012, 02:46:47 am »
ok, so you got it?
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

adham

  • Jr. Member
  • **
  • Posts: 96
Re: Remove : free from custom fields
« Reply #5 on: January 08, 2012, 08:13:33 am »
Who me?