News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Remove price indication from custom field cart variant in VM3

Started by marvays, January 13, 2017, 10:18:33 AM

Previous topic - Next topic

marvays

Hi. I have VM3 eshop and need hide custom fields cart variants price.
I know, how i can make it in VM2 . . . http://forum.virtuemart.net/index.php?topic=107506.0

But, i cant change it in VM3.

I found on line 871 this:

static function _getCustomPrice($customPrice, $currency, $calculator) {
if ((float)$customPrice) {
$price = strip_tags ($currency->priceDisplay ($calculator->calculateCustomPriceWithTax ($customPrice)));
if ($customPrice >0) {
$price ="+".$price;
}
}
else {
$price = ($customPrice === '') ? '' :  vmText::sprintf('COM_VIRTUEMART_CART_PRICE_FREE',$currency->getSymbol());
}
return $price;
}


I try add and delete any part, but all time i have white page. I try change:$price ="+".$price;

to:
$price ="//+".$price;
but i have white page too. How i can disable it?

Thx

Jörgen

Hello

You are breaking the PHP-code.

$price ="+".$price;

Should be changed to
$price = ''; // "+".$price;

This solves Your White page, You can only judge if it solves Your other task. If You don´t want to display the text FREE then You can simplify this much more and always set $price = '';

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.


Milbo

I wonder if we should change it so, that we just use Language key and so people can just write an override for it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/