PDA

View Full Version : If price = 0.00 dont display price (Update)



michael_s
07-09-2014, 02:24 PM
For osCommerce 2.3.3.3 - 2.3.3.4 - 2.3.4


If the product price is 0.00, you can use this modification to place some text.

Open: includes/classes/currencies.php

and find :

function display_price($products_price, $products_tax, $quantity = 1) {
return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
}

Replace with:

function display_price($products_price, $products_tax, $quantity = 1) {
if ($products_price > 0.01)
{
return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
}
else
{
return 'HERE YOUR TEXT';
}

More... (http://addons.oscommerce.com/info/9098)