News:

Looking for documentation? Take a look on our wiki

Main Menu

How to modify price in virtuemart module product

Started by Geppux, February 13, 2016, 10:46:26 AM

Previous topic - Next topic

jeanette

Hi,
i am also trying to do this, but seems nothing is showing. Maybe i have put this in the wrong place? Hope you can advice where to put this code, cause i obviously did not get it :)

I am editing the \mod_virtuemart_product\default.php to this:

<?php 
// $product->prices is not set when show_prices in config is unchecked
if ($show_price and  isset($product->prices)) {
echo '<div class="product-price">'.$currency->createPriceDiv ('salesPrice'''$product->pricesFALSEFALSE1.0TRUE);
if ($product->prices['salesPriceWithDiscount'] > 0) {
echo $currency->createPriceDiv ('salesPriceWithDiscount'''$product->pricesFALSEFALSE1.0TRUE);
}
if (round($product->prices['basePriceWithTax'],$currency->_priceConfig['salesPrice'][1]) != round($product->prices['salesPrice'],$currency->_priceConfig['salesPrice'][1])) {
echo '<span class="price-crossed" >' $currency->createPriceDiv ('basePriceWithTax''COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX'$product->prices) . "</span>";
}
echo '</div>';
}?>

jeanette

Actually i figured it out. I had to edit the single.php instead of the default.php

Thanks for your tip above :)  :)