Hi
I have been trying to change the following for my website, so that
when my unit price is "0.00" it will show "call for price" but it don't
seem to work.
Base on the codes, the result was it'll show both "0.00" and "call for price"
on my website which is wrong.
Would greatly appreciate if anyone can help
Thanks in advance
priceFormat(0);
function priceFormat($price, $dispNull = FALSE){
if(is_numeric($price)){
global $currencyVars;
$price = $price * $currencyVars[0]['value'];
return $currencyVars[0]['symbolLeft'].sprintf("%.".$currencyVars[0]['decimalPlaces']."f", $price).$currencyVars[0]['symbolRight'];
} elseif($dispNull == TRUE){
global $currencyVars;
return $currencyVars[0]['symbolLeft'].sprintf("%.".$currencyVars[0]['decimalPlaces']."f",0.00).$currencyVars[0]['symbolRight'];
} else {
return "Call For Price";
}
}