Community Add-Ons

Maintainers: mike_the_monk
Add file to this package
Top » Features

If price = 0.00 dont display price
for osCommerce Online Merchant v2.2

This is basicly if you have products that you want customers to contact you for the price.

if you enter a products cost in as 0.00 then it will not display it.

It works normally if its 0.01 or over.

Legend:  Download   Report
Expand All / Collapse All
other way to same result, I think lojapro 17 Sep 2008  

Hi, i think this code make the same result:


open: includes/classes/currencies.php

find :

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

Replace:


function display_price($products_price, $products_tax, $quantity = 1) {
if ($products_price > 0.01){ //for change price by 'contact'
return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
}else{
return 'Contact us';
}
}


note: only one text file include

Don't Display Price V3 src 14 Apr 2008  
remove product link for image bigjat69 27 Aug 2007  
remove product info link bigjat69 27 Aug 2007  
email for qute gerard 12 Jan 2007  
Latest Version 2 mike_the_monk 11 Nov 2006  
Update mike_the_monk 11 Nov 2006  
Updated mike_the_monk 10 Mar 2006  
If price = 0.00 dont display price mike_the_monk 9 Mar 2006