[support] Computed field, how to acces Foreignkey's data

Marolijo - Pol maresma marolijo at yahoo.es
Tue Jan 8 10:22:50 UTC 2008


$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 at drupal.org [mailto:support-bounces at drupal.org] En nombre
de Marolijo - Pol maresma
Enviado el: dimarts, 8 / gener / 2008 10:51
Para: support at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080108/f08540f8/attachment.htm 


More information about the support mailing list