default to self if only self to make bookings for

master
Marek Isalski 6 years ago
parent 877e946c0b
commit cf2bdabbea

@ -456,7 +456,7 @@ function _fulcrm_shoppingcart_buy_eventbookingtype_create_shoppingitem( &$form_s
drupal_set_message( t('There was a problem adding your item to the shopping cart.'), 'error' );
}
} else {
/* drupal_set_message( t('Cannot find your record\'s UUID. This order might have problems...'), 'error' ); */
drupal_set_message( t('Cannot find your record\'s UUID. This order might have problems...'), 'error' );
}
}
@ -540,11 +540,13 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form_submit( $form, &$form_sta
$made_choices = $made_choices );
}
} else {
if ( $person_uuid ) {
$person = $cart[ 'd' ][ 'fulcrm' ][ 'person' ][ $person_uuid ];
_fulcrm_shoppingcart_buy_eventbookingtype_create_shoppingitem( $form_state, $cart,
$person_uuid, $person[ 'name' ], $product_id,
$made_choices = $made_choices );
}
}
if ( !empty( $ac ) ) {
drupal_set_message( t('Choices to make...'), 'warning' );
@ -674,6 +676,11 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form( $form, &$form_state, $pe
$form[ '#submit' ] = 'fulcrm_shoppingcart_buy_eventbookingtype_person_add_guest_form_submit';
}
if ( count( $form[ 'ticket_for_persons' ][ '#options' ] ) == 1 ) {
foreach ( $form[ 'ticket_for_persons' ][ '#options' ] as $k => $v )
$form[ 'ticket_for_persons' ][ '#default_value' ] = $k;
}
$form[ 'eventslots' ] = array();
$eventslots = array();
$eventpart = array();

Loading…
Cancel
Save