<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=359554309-08012008><FONT face=Arial><FONT
size=2><SPAN class=593233810-08012008>>></SPAN>Hello, from a computed
field I wanna to a typical bill-line calculation doing a
multiplication <SPAN
class=593233810-08012008> </SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=359554309-08012008><SPAN
class=593233810-08012008>>> </SPAN></SPAN><SPAN
class=359554309-08012008>price = quantity * fk_product_price<SPAN
class=593233810-08012008> </SPAN></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=359554309-08012008><SPAN
class=593233810-08012008>>> </SPAN></SPAN><SPAN
class=359554309-08012008>How can I do that? I tried wihout luck.<SPAN
class=593233810-08012008> </SPAN></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=359554309-08012008><SPAN class=593233810-08012008>>>
</SPAN></SPAN><SPAN class=359554309-08012008>$node_field[0]['value'] =
$node->field_quantitat[0]['value'] * </SPAN><SPAN
class=359554309-08012008>$node-><SPAN
class=359554309-08012008>field_fk_producte</SPAN>[0]['value']......;<SPAN
class=593233810-08012008> </SPAN></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=359554309-08012008><FONT face=Arial><FONT
size=2><SPAN class=593233810-08012008>>>
</SPAN>Thank's!</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=593233810-08012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=593233810-08012008><FONT>> </FONT></SPAN>Exec "print_r($node)".
Are there present field_quantitat and field_fk_producte ?<SPAN
class=593233810-08012008> </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=593233810-08012008></SPAN></FONT></FONT> </DIV>
<DIV><SPAN class=593233810-08012008><FONT face=Arial size=2>Yes booth are
present but I think I need the <STRONG>field_preu</STRONG> (price) stored
on the <STRONG>producte</STRONG> (product) node type identified by the <SPAN
class=359554309-08012008>field_fk_producte</SPAN>. </FONT></SPAN></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=593233810-08012008>Is it possible
to do that? </SPAN><BR><SPAN
class=593233810-08012008> </SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=593233810-08012008>> </SPAN>What is fk_* ?<SPAN
class=593233810-08012008> </SPAN></FONT></FONT></DIV>
<DIV><SPAN class=593233810-08012008><SPAN class=593233810-08012008><FONT
face=Arial size=2></FONT></SPAN></SPAN> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=593233810-08012008><SPAN
class=593233810-08012008>I use the fk_ prefix on all node_related CCK fields to
avoid confussion when I'm using views or adding new node_Relations to other
content types. It comes from the Foreign Key on relational databases ( I know it
isn' the way that Drupal Stores it but it's usefull to
me).</SPAN> </SPAN><BR><BR><SPAN class=593233810-08012008>Thank's for
all!</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=593233810-08012008>Pol
Maresma </SPAN><BR></FONT></FONT><BR></DIV><PRE class=moz-signature cols="72">--
Michel 'ZioBudda' Morelli <A class=moz-txt-link-abbreviated href="mailto:michel@ziobudda.net">michel@ziobudda.net</A>
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
<A class=moz-txt-link-freetext href="http://www.ziobudda.net">http://www.ziobudda.net</A> ICQ: 58351764
<A class=moz-txt-link-freetext href="http://www.ziobuddalabs.it">http://www.ziobuddalabs.it</A> Skype: zio_budda
<A class=moz-txt-link-freetext href="http://www.ajaxblog.it">http://www.ajaxblog.it</A>                         MSN: <A class=moz-txt-link-abbreviated href="mailto:michel@ziobuddalabs.it">michel@ziobuddalabs.it</A>
                                                JABBER: <A class=moz-txt-link-abbreviated href="mailto:michel@gmail.com">michel@gmail.com</A>
</PRE><BR><BR>__________ Información de NOD32, revisión 2767 (20080106)
__________<BR><BR>Este mensaje ha sido analizado con NOD32 antivirus
system<BR><A
href="http://www.nod32.com">http://www.nod32.com</A><BR></BODY></HTML>