Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Additional Modules involved: www.drupal.org/project/Nodereference_count
Scenario: Add $50 to a customer's account if they hosted the party 3 times or more.
Fields: Nodereference Count -> counted how many times a person has been referenced in a party hosting event.
Computed Field:
if ($node->field_customer_times_hosted[0]['value'] >= 3) {
$node_field[0]['value'] = 50;
}
else
$node_field[0]['value'] = 0;
this is the first time I've ever used custom php code so please feel free to make corrections, but it works so far.