VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: dpodesta on January 06, 2012, 11:05:35 AM

Title: Remove : free from custom fields
Post by: dpodesta 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?
Title: Re: Remove : free from custom fields
Post by: adham 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
Title: Re: Remove : free from custom fields
Post by: PRO on January 06, 2012, 15:49:43 PM
<?php $field->display  = str_replace( ':', '', $field->display) ?><?php echo $field->display ?>
Title: Re: Remove : free from custom fields
Post by: adham on January 07, 2012, 00:56:11 AM
Quote from: BanquetTables.pro on January 06, 2012, 15:49:43 PM
<?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
Title: Re: Remove : free from custom fields
Post by: PRO on January 07, 2012, 02:46:47 AM
ok, so you got it?
Title: Re: Remove : free from custom fields
Post by: adham on January 08, 2012, 08:13:33 AM
Who me?