$node_field[0]['value'] = $node->field_quantitat[0]['value'] * $node->field_fk_producte[0]['field_preu']['value'];
I tried it without luck... any idea? field_ preu is the CCK field where the product price is saved. I think I need to change the node object to point the product object with the product node ID but I don't know how. Node BILL-LINE : $node->field_fk_producte[0][nid']['value']; Should point to node PRODUCT: $node->field_preu[0]['value'];
Thank's
_____
De: support-bounces@drupal.org [mailto:support-bounces@drupal.org] En nombre de Marolijo - Pol maresma Enviado el: dimarts, 8 / gener / 2008 10:51 Para: support@drupal.org Asunto: [support] Computed field, how to acces Foreignkey's data
Hello, from a computed field I wanna to a typical bill-line calculation doing a multiplication price = quantity * fk_product_price
How can I do that? I tried wihout luck.
$node_field[0]['value'] = $node->field_quantitat[0]['value'] * $node->field_fk_producte[0]['value']......;
Thank's!
__________ Informacisn de NOD32, revisisn 2767 (20080106) __________
Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com