Content Types: Booking, Customer

Booking has a customer field reference.

Booking Fields: Total Sale
Customer Field: Total Bonus (computed)

Customer gets 10% bonus from total sale if they host the party. I'm using customer to booking as reference to indicate the host.

I want to pull the total sale from Booking into customer total bonus using the following formula:
$node_field[0]['value'] = $node->field_total_sale[0]['value'] * .1;

but there are alot of problems with this as u might have noticed already.
I can use the if statement to check whether the customer was referenced in the booking node, but if i do that then each time i update the node it would mess up the values. I think the trick here is to find out the exact node id of booking content type that i'm trying to pull the information from. i hope i made enough sense to this is thread started. thank you.

Comments

dqd’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Due to the Drupal core life cycle policy and security support advisery, Drupal 6 is no longer supported. So issues for Drupal 6 cannot be longer maintained. The project maintainer has asked for closing all D6 issues to clean up the issue queue. Feel free to reopen the issue if required or set it to "needs to be ported" and latest D8 dev version, if the issue discusses a still missing feature which can be implemented in the D8 version.