Hi
I'm trying to set my price format to text when the value is $0.00
following are the codes created, it works but it show both
text and figure after updating which is wrong and what i would have is
when the price is $0.00 it show call for price
result shown: $0.00
Call For Price
function priceFormat($price, $dispNull = FALSE){
if($price == TRUE){
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";
}
}
would appreciate if anyone can help
thanks in advance