Closed (fixed)
Project:
Money field
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2009 at 12:37 UTC
Updated:
11 Jan 2010 at 13:40 UTC
Hi,
is there any advice on how to do calculations with values defined in a money field?
I'd like to calculate a total price, according to a selection made with cck_inputs.
Like 3 checked items, makes a total price of 3 * $node->field_res_price[0]['amount'];
Is $node->field_res_price[0]['amount'] the way to go for calculations or is there any special function in currency api or elsewhere available?
Comments
Comment #1
markus_petrux commentedRe: "Is $node->field_res_price[0]['amount'] the way to go for calculations"
Yes, this module does not include any other API to do this kind of things. You should access the field values and perform computations yourself.