Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function velosurance_quote_multistep_auto_create_bikes($type, $bikes, $obj) {
- $type = strtolower($type);
- $total = 0;
- foreach ($bikes as $bike) {
- $total += $bike['current_value'];
- }
- foreach ($bikes as $bike) {
- $usage = $bike['bike_usage'];
- if ($total > 2000 && $obj->owner->form_values['memberships'] == 'usa-triathlon') {
- $usage = 'fitness';
- }
- $specials = array(
- 'liability_limit' => $obj->coverages->form_values['liability_limit'],
- 'vehicle_contact_protection' => $obj->coverages->form_values['vehicle_contact_protection'],
- 'medical_payments' => $obj->coverages->form_values['medical_payments'],
- 'personal_insurance' => $obj->owner->form_values['personal_insurance']
- );
- $node = velosurance_quote_multistep_auto_create_bike($type, $bike, $usage, $specials);
- $bike_nids[]['nid'] = $node->nid;
- }
- return $bike_nids;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement