fix for UUID error

master
Marek Isalski 6 years ago
parent 76e54b427e
commit 207812aa8a

@ -523,8 +523,9 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form_submit( $form, &$form_sta
if ( array_key_exists( 'ticket_for_persons', $form_state[ 'values' ] ) ) {
$ticket_for_persons = $form_state[ 'values' ][ 'ticket_for_persons' ];
if ( !is_array( $ticket_for_persons ) )
$ticket_for_persons = array( $ticket_for_persons );
foreach ( $ticket_for_persons as $ticket_for_person ) {
$ticket_for_persons = array( $ticket_for_persons => 1 );
foreach ( $ticket_for_persons as $ticket_for_person => $add ) {
if ( $add ) {
$add_person_name = 'unnamed person';
if ( $ticket_for_person === 'myself' ) {
$add_person_uuid = $form_state[ 'fulcrm_shoppingcart' ][ 'person' ][ 'uuid' ];
@ -535,10 +536,12 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form_submit( $form, &$form_sta
$add_person_name = $form_state[ 'fulcrm_shoppingcart' ][ 'persons' ][ $add_person_uuid ][ 'name' ];
}
if ( $add_person_uuid )
_fulcrm_shoppingcart_buy_eventbookingtype_create_shoppingitem( $form_state, $cart,
$add_person_uuid, $add_person_name, $product_id,
$made_choices = $made_choices );
}
}
} else {
if ( $person_uuid ) {
$person = $cart[ 'd' ][ 'fulcrm' ][ 'person' ][ $person_uuid ];

Loading…
Cancel
Save