News:

Looking for documentation? Take a look on our wiki

Main Menu

Eliminate additional cost

Started by giriga, December 07, 2017, 12:56:47 PM

Previous topic - Next topic

giriga

I do not want the price see picture

Studio 42

What kind of custom field do you use? A plugin, image or other ?

giriga

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

Studio 42

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.

giriga


Studio 42

#5
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

giriga