VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Ziggo on May 07, 2012, 12:33:42 PM

Title: Remove price of custom field value.
Post by: Ziggo on May 07, 2012, 12:33:42 PM
Hello,

Can someone help me with the following issue?
I've add some custom fields to my products. When the buyer chooses a value the price is changing. Now the prices of each value is printed in the field. I only want to show the value.

Can anyone help me remove the price?

Title: Re: Remove price of custom field value.
Post by: jlgarcia9 on June 23, 2012, 13:15:23 PM
Hi,

I need the same of you. Do you resolve ?

Thank you

Regards
Title: Re: Remove price of custom field value.
Post by: stuart.prevos on June 25, 2012, 11:52:36 AM
I dont really understand what you are asking, can you give an example or image.
Title: Re: Remove price of custom field value.
Post by: ciriman on June 29, 2012, 15:44:26 PM
Quote from: Ziggo on May 07, 2012, 12:33:42 PM
I've add some custom fields to my products. When the buyer chooses a value the price is changing. Now the prices of each value is printed in the field. I only want to show the value.

I have the same problem, have found a solution?
Title: Re: Remove price of custom field value.
Post by: mrooks1984 on June 30, 2012, 00:38:53 AM
hello, i think you mean, on dropdown menus each option is showing no additional charge? if this is correct, all you need to do is in the custom fields within the product is make sure all option are empty.
if you mean you dont want to show them within the dropdown menu and they have different prices or the same price but you dont want it to display in the dropdown menu, i fixed this by doing child products for each item keep the same title name and add the options within the sku code.
i think it can be done by editing the code, but i am not sure how, i have not found any other way around it myself.
let me know how you get on or if this is not what you mean.
Title: Re: Remove price of custom field value.
Post by: ciriman on July 30, 2012, 18:41:43 PM
VirtueMart 2.0.8e
After much stress I have the solution! I found the string that generates the content selection fields

administrator/components/com_virtuemart/models/customfields.php
$productCustom->text = $productCustom->custom_value . ' ' . $price;

delete from the string .$price or replace with another value..
Title: Re: Remove price of custom field value.
Post by: Ziggo on August 07, 2012, 16:46:39 PM
wouw this is great. I already gave up, but now I finally have the sollution.
Thanks!
Title: Re: Remove price of custom field value.
Post by: Elboy on November 12, 2012, 15:54:10 PM
Excellent, this works perfectly for me too. thanks for posting!
Title: Re: Remove price of custom field value.
Post by: azamkl on March 19, 2013, 08:37:33 AM
I have tried this method but with no avail. I guess it no longer work with the latest Version. I'm using VM 2.0.20 and Joomla 2.5.9  :'(
::Still looking for an answer::
Title: Re: Remove price of custom field value.
Post by: mrooks1984 on April 04, 2013, 11:55:37 AM
Hello i am using the newest version of Virtuemart and this is what it needs to be set at to remove the +price in your dropdown menu.

file: administrator/components/com_virtuemart/models/customfields.php

change line 876 to
$productCustom->text = $productCustom->custom_value . ' ';

change line 890 to
$productCustom->text = $productCustom->custom_value . ' ';
change line

i use Komodo edit, then click save and reload the page.
Hope they build a option into the admin as it would be useful.
This has been tested and works, hope this has helped.
Title: Re: Remove price of custom field value.
Post by: Hiflo on July 28, 2013, 10:36:30 AM
Hi,

VM Version 2.0.22a Joomla Version 2.5.11 PHP Version 5.2.17

Had the same problem: "No additional charge" in drop down list when all I wanted was a colour choice.

File Path on my server: public_html/language/en-GB/en-GB.com_virtuemart.ini

Line 70: COM_VIRTUEMART_CART_PRICE_FREE="No additional charge"

Changed to:

Line 70: COM_VIRTUEMART_CART_PRICE_FREE=""

Wasn't sure if I should remove quotes "" but it worked.  :P

Title: Re: Remove price of custom field value.
Post by: Maxim Pishnyak on July 28, 2013, 12:53:01 PM
Use language overrides trick, Hiflo, or next VM update will bash your change.
Title: Re: Remove price of custom field value.
Post by: bmango on August 15, 2013, 11:08:29 AM
In version 2.0.2 the line to edit is at number 583. (took me a while to find it)
Title: Re: Remove price of custom field value.
Post by: clabis71 on September 27, 2013, 11:58:37 AM
How can I remove the prices from the custom fields in the version 2.0.22e?
The above remedy does not work unfortunately
Thanks
Title: Re: Remove price of custom field value.
Post by: Maxim Pishnyak on September 30, 2013, 07:01:04 AM
This remedy?
Quote from: ciriman on July 30, 2012, 18:41:43 PM
VirtueMart 2.0.8e
After much stress I have the solution! I found the string that generates the content selection fields

administrator/components/com_virtuemart/models/customfields.php
$productCustom->text = $productCustom->custom_value . ' ' . $price;

delete from the string .$price or replace with another value..
Title: Re: Remove price of custom field value.
Post by: clabis71 on September 30, 2013, 17:16:34 PM
Yes, this solution does not work on VM 2.0.22e

Quote from: Maxim Pishnyak on September 30, 2013, 07:01:04 AM
This remedy?
Quote from: ciriman on July 30, 2012, 18:41:43 PM
VirtueMart 2.0.8e
After much stress I have the solution! I found the string that generates the content selection fields

administrator/components/com_virtuemart/models/customfields.php
$productCustom->text = $productCustom->custom_value . ' ' . $price;

delete from the string .$price or replace with another value..
Title: Re: Remove price of custom field value.
Post by: Maxim Pishnyak on October 04, 2013, 13:03:44 PM
Could you check also those threads. Are they all outdated currently for your recent VM version?
https://forum.virtuemart.net/index.php?topic=116121.0
https://forum.virtuemart.net/index.php?topic=107674.msg386708#new
http://forum.virtuemart.net/index.php?topic=112597.msg378859#new
http://forum.virtuemart.net/index.php?topic=118113.msg400040#new
http://forum.virtuemart.net/index.php?topic=112838.msg342648#new
https://forum.virtuemart.net/index.php?topic=113234.msg391890#new
http://translate.google.com.ua/translate?hl=en&sl=ru&tl=en&u=http%3A%2F%2Fjoomlaforum.ru%2Findex.php%2Ftopic%2C276785.msg1363415.html&sandbox=1
Title: Re: Remove price of custom field value.
Post by: clabis71 on October 04, 2013, 17:52:58 PM
you are all obsolete, I did some tests but nothing, prices continue to appear to the side of the custom fields.
With version 2.0.20 this change worked. Now I'm testing the version 2.0.24 and should not be, I think there's something else to fix ...
I await some good solution
Title: Re: Remove price of custom field value.
Post by: Maxim Pishnyak on October 06, 2013, 13:43:47 PM
PM me access, I'll look into.
Title: Re: Remove price of custom field value.
Post by: binarix on October 11, 2013, 03:44:30 AM
I want to remove "4 Pack +$ 5.00" in here I want to remove +$5.00 . Can you please help me.

I tried removing from customfield.php . but still no luck..
Title: Re: Remove price of custom field value.
Post by: Rich-Springclear on October 24, 2013, 11:34:03 AM
Hi im fairly new to virtuemart and having the problem in this thread.

Can anyone tell me how I can access this:

administrator/components/com_virtuemart/models/customfields.php

I cant seem to find it anywhere

Hope someone can help

Thanks
Title: Re: Remove price of custom field value.
Post by: misterpo on May 07, 2014, 14:00:53 PM
Hi there,

I run Joomla 2.5.19 and VM 2.6 and have the problem in this thread (I'd like to remove "-3000,00 €" from the button label in http://www.rallye1000bornes.fr/web/index.php/paiement-en-ligne/highlands-tour-18-25-mai-2014-detail.html).

Editing administrator/components/com_virtuemart/models/customfields.php as described does not work for me.

Any workaround ?