Hey Guys,
I think i'm missing something obvious here so was hoping someone could help set me right.
I have two currency fields "Price" and "OriginalPrice" set on a Product Page / Dataobject.
When I use $Price.Nice or $OriginalPrice.Nice in a SS template I get the desired result of these being displayed correctly - ie: $85.00.
I want to display the result of the difference between the two, or subtracting one from the other. To do this I created the following function (feel free to suggest a better way if applicable):
function Savings(){
$savings = $this->OriginalPrice - $this->Price;
return $savings;
}
This returns the correct result and shows on the template if I use $Savings, however if I use $Savings.Nice - nothing shows.....
Any help would definitely be appreciated.
Thanks