VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: giriga on December 07, 2017, 12:56:47 PM

Title: Eliminate additional cost
Post by: giriga on December 07, 2017, 12:56:47 PM
I do not want the price see picture
Title: Re: Eliminate additional cost
Post by: Studio 42 on December 07, 2017, 15:18:57 PM
What kind of custom field do you use? A plugin, image or other ?
Title: Re: Eliminate additional cost
Post by: giriga on December 07, 2017, 17:50:56 PM
I'm using the image plugin, before updating virtuemart I had done so:
If you want to do this you must replace
/administrator/components/com_virtuemart/models/customfields.php

It usable if the price of the custom field is> 0 If it is = 0 you will see

Line 874
Code: [Select]

$ price = "+". $ price;


with

Code: [Select]

$ price = "- Ask for price";


or

If you do not want to display anything use this:

Code: [Select]

$ price = "";

after upgrading to virtuemart VirtueMart 3.2.8 no longer works
Title: Re: Eliminate additional cost
Post by: Studio 42 on December 07, 2017, 22:04:42 PM
Have you many products with this option ? i think you should use a plugin, so you have not to hack the code.
Another solution is to add a CSS rule, bit you should provide a link to your shop, so i can check the rule to use.
Title: Re: Eliminate additional cost
Post by: giriga on December 08, 2017, 09:18:12 AM
Yes I have many products with this option, I am attaching links https://arredamentionline.giriga.com/en/extending-tables/table-artistic-160x90-extensible-detail
Title: Re: Eliminate additional cost
Post by: Studio 42 on December 08, 2017, 12:25:17 PM
Search this line in file /components/com_virtuemart/sublayouts/customfield.php line 517
$productCustom->text = VirtueMartModelCustomfields::displayCustomMedia ($productCustom->customfield_value,'product',$customfield->width,$customfield->height).' '.$price;
And remove .' '.$price

Best is to copy file in your template /templates/YOURTEMPLATE/html/com_virtuemart/sublayouts/customfield.php and do the change here
Title: Re: Eliminate additional cost
Post by: giriga on December 08, 2017, 15:33:34 PM
Thank you very much  ;D