shifthappens / hxeventmanager

An extension to the WordPress Events Manager plugin to add extra functionality necessary for some events
0 stars 1 forks source link

Booking table bug #2

Open stefleininger opened 9 years ago

stefleininger commented 9 years ago

Since update 5.6 of Event Manager, the booking table in administration don't work. No data has display.

shifthappens commented 9 years ago

The table is set on default to display only bookings for future events. Have you checked this? You can filter on All events at the top.

stefleininger commented 9 years ago

Hello, yes of course I check this. I see all my bookings perhaps I've got "---" for all informations.

Regardless,

Stéphane Leininger - stef.leininger@gmail.com http://www.courantscene.fr

2015-08-25 23:14 GMT+02:00 Coen notifications@github.com:

The table is set to display only bookings for future events. Have you checked this? You can filter on All events at the top.

— Reply to this email directly or view it on GitHub https://github.com/shifthappens/hxeventmanager/issues/2#issuecomment-134743976 .

shifthappens commented 9 years ago

I updated to 5.6 now and I see what you mean. It only displays -- for all fields, even the original one from events manager itself. I'm a bit low on time now. Are you a developer and willing to help with solving this? Otherwise it will have to wait until the weekend at least.

stefleininger commented 9 years ago

Yes I can see your code. Can you tell me what is the file to edit ?

Stéphane Leininger - stef.leininger@gmail.com http://www.courantscene.fr

2015-08-27 0:19 GMT+02:00 Coen notifications@github.com:

I see what you mean. It only displays -- for all fields, even the original one from events manager itself. I'm a bit low on time now. Are you a developer and willing to help with solving this? Otherwise it will have to wait until the weekend at least.

— Reply to this email directly or view it on GitHub https://github.com/shifthappens/hxeventmanager/issues/2#issuecomment-135194425 .

stefleininger commented 9 years ago

Hello,

I have not corrected your script but I found the changes to "events manager" . This is in the file "wp-content/plugins/events-manager/classes/em- bookings-table.php" from the line 519. Apparently he change the name of a variable. Here is the code:

Code in 5.5.7 :

$cols = array(); foreach($this->cols as $col){ //is col a user col or else? //TODO fix urls so this works in all pages in front as well if( $col == 'user_email' ){ $cols[] = $EM_Booking->get_person()->user_email; }elseif($col == 'dbem_phone'){ $cols[] = esc_html($EM_Booking->get_person()->phone); }elseif($col == 'user_name'){ if( $csv || ( get_option('dbem_bookings_registration_disable') && $EM_Booking->get_person()->ID == get_option('dbem_bookings_registration_user') ) ){ $cols[] = $EM_Booking->get_person()->get_name(); }else{ $cols[] = '<a href="'.esc_url(add_query_arg(array('person_id'=>$EM_Booking->person_id, 'event_id'=>null), $EM_Booking->get_event()->get_bookings_url())).'">'. $EM_Booking->person->get_name() .''; } }elseif($col == 'first_name'){ $cols[] = esc_html($EM_Booking->get_person()->first_name); }elseif($col == 'last_name'){ $cols[] = esc_html($EM_Booking->get_person()->last_name); }elseif($col == 'event_name'){ if( $csv ){ $cols[] = $EM_Booking->get_event()->event_name; }else{ $cols[] = '<a href="'.$EM_Booking->get_event()->get_bookings_url().'">'. esc_html($EM_Booking->get_event()->event_name) .''; } }elseif($col == 'event_date'){ $cols[] = $EM_Booking->get_event()->output('#_EVENTDATES'); }elseif($col == 'event_time'){ $cols[] = $EM_Booking->get_event()->output('#_EVENTTIMES'); }elseif($col == 'booking_price'){ if($this->show_tickets && !empty($EM_Ticket)){ $cols[] = em_get_currency_formatted(apply_filters('em_bookings_table_row_booking_price_ticket', $EM_Ticket_Booking->get_price(false,false, true), $EM_Booking, true)); }else{ $cols[] = $EM_Booking->get_price(true); } }elseif($col == 'booking_status'){ $cols[] = $EM_Booking->get_status(true); }elseif($col == 'booking_date'){ $cols[] = date_i18n(get_option('dbem_date_format').' '. get_option('dbem_time_format'), $EM_Booking->timestamp); }elseif($col == 'actions' ){ if( !$csv ) $cols[] = implode(' | ', $this->get_booking_actions($EM_Booking)); }elseif( $col == 'booking_spaces' ){ $cols[] = ($this->show_tickets && !empty($EM_Ticket)) ? $EM_Ticket_Booking->get_spaces() : $EM_Booking->get_spaces(); }elseif( $col == 'booking_id' ){ $cols[] = $EM_Booking->booking_id; }elseif( $col == 'ticket_name' && $this->show_tickets && !empty($EM_Ticket) ){ $cols[] = $csv ? $EM_Ticket->$col : esc_html($EM_Ticket->$col); }elseif( $col == 'ticket_description' && $this->show_tickets && !empty($EM_Ticket) ){ $cols[] = $csv ? $EM_Ticket->$col : esc_html($EM_Ticket->$col); }elseif( $col == 'ticket_price' && $this->show_tickets && !empty($EM_Ticket) ){ $cols[] = $EM_Ticket->get_price(true); }elseif( $col == 'ticket_id' && $this->show_tickets && !empty($EM_Ticket) ){ $cols[] = $EM_Ticket->ticket_id; }elseif( $col == 'booking_comment' ){ $cols[] = $csv ? $EM_Booking->booking_comment : esc_html($EM_Booking->booking_comment); }else{ $val = apply_filters('em_bookings_table_rowscol'.$col, '', $EM_Booking, $this, $csv); $cols[] = apply_filters('em_bookings_table_rows_col', $val, $col, $EM_Booking, $this, $csv); } }

Code in 5.6 :

$cols = array(); foreach($this->cols as $col){ $val = ''; //reset value //is col a user col or else? //TODO fix urls so this works in all pages in front as well if( $col == 'user_email' ){ $val = $EM_Booking->get_person()->user_email; }elseif($col == 'dbem_phone'){ $val = esc_html($EM_Booking->get_person()->phone); }elseif($col == 'user_name'){ if( $csv || ( get_option('dbem_bookings_registration_disable') && $EM_Booking->get_person()->ID == get_option('dbem_bookings_registration_user') ) ){ $val = $EM_Booking->get_person()->get_name(); }else{ $val = '<a href="'.esc_url(add_query_arg(array('person_id'=>$EM_Booking->person_id, 'event_id'=>null), $EM_Booking->get_event()->get_bookings_url())).'">'. $EM_Booking->person->get_name() .''; } }elseif($col == 'first_name'){ $val = esc_html($EM_Booking->get_person()->first_name); }elseif($col == 'last_name'){ $val = esc_html($EM_Booking->get_person()->last_name); }elseif($col == 'event_name'){ if( $csv ){ $val = $EM_Booking->get_event()->event_name; }else{ $val = '<a href="'.$EM_Booking->get_event()->get_bookings_url().'">'. esc_html($EM_Booking->get_event()->event_name) .''; } }elseif($col == 'event_date'){ $val = $EM_Booking->get_event()->output('#_EVENTDATES'); }elseif($col == 'event_time'){ $val = $EM_Booking->get_event()->output('#_EVENTTIMES'); }elseif($col == 'booking_price'){ if($this->show_tickets && !empty($EM_Ticket)){ $val = em_get_currency_formatted(apply_filters('em_bookings_table_row_booking_price_ticket', $EM_Ticket_Booking->get_price(false,false, true), $EM_Booking, true)); }else{ $val = $EM_Booking->get_price(true); } }elseif($col == 'booking_status'){ $val = $EM_Booking->get_status(true); }elseif($col == 'booking_date'){ $val = date_i18n(get_option('dbem_date_format').' '. get_option('dbem_time_format'), $EM_Booking->timestamp); }elseif($col == 'actions' ){ if( !$csv ) $val = implode(' | ', $this->get_booking_actions($EM_Booking)); }elseif( $col == 'booking_spaces' ){ $val = ($this->show_tickets && !empty($EM_Ticket)) ? $EM_Ticket_Booking->get_spaces() : $EM_Booking->get_spaces(); }elseif( $col == 'booking_id' ){ $val = $EM_Booking->booking_id; }elseif( $col == 'ticket_name' && $this->show_tickets && !empty($EM_Ticket) ){ $val = $csv ? $EM_Ticket->$col : esc_html($EM_Ticket->$col); }elseif( $col == 'ticket_description' && $this->show_tickets && !empty($EM_Ticket) ){ $val = $csv ? $EM_Ticket->$col : esc_html($EM_Ticket->$col); }elseif( $col == 'ticket_price' && $this->show_tickets && !empty($EM_Ticket) ){ $val = $EM_Ticket->get_price(true); }elseif( $col == 'ticket_id' && $this->show_tickets && !empty($EM_Ticket) ){ $val = $EM_Ticket->ticket_id; }elseif( $col == 'booking_comment' ){ $val = $csv ? $EM_Booking->booking_comment : esc_html($EM_Booking->booking_comment); } //use this $val = apply_filters('em_bookings_table_rowscol'.$col, $val, $EM_Booking, $this, $csv, $object); $cols[] = apply_filters('em_bookings_table_rows_col', $val, $col, $EM_Booking, $this, $csv, $object); //deprecated, use the above filter instead for better performance }

I search in your script where you use this var but i don't find. Voila, if I can help you !!!

Stéphane Leininger - stef.leininger@gmail.com

2015-08-27 8:24 GMT+02:00 leininger stephane stef.leininger@gmail.com:

Yes I can see your code. Can you tell me what is the file to edit ?

Stéphane Leininger - stef.leininger@gmail.com http://www.courantscene.fr

2015-08-27 0:19 GMT+02:00 Coen notifications@github.com:

I see what you mean. It only displays -- for all fields, even the original one from events manager itself. I'm a bit low on time now. Are you a developer and willing to help with solving this? Otherwise it will have to wait until the weekend at least.

— Reply to this email directly or view it on GitHub https://github.com/shifthappens/hxeventmanager/issues/2#issuecomment-135194425 .

xb441 commented 8 years ago

Hello, I've installed your hxeventmanager and I have the same problem.. No data are displayed in the booking table

Stephane or Shifthappens?? Have you find a solution? Thx you Xavier

stefleininger commented 8 years ago

Sorry xb441, I have change my event manager.

You can see at http://www.e-dynamics.be/wordpress/ this is a really powerful event manager.

Far from me the idea to advertise

Regardless,

Stéphane Leininger - stef.leininger@gmail.com

2015-12-05 16:07 GMT+01:00 xb441 notifications@github.com:

Hello, I've installed your hxeventmanager and I have the same problem.. No data are displayed in the booking table

Stephane or Shifthappens?? Have you find a solution? Thx you Xavier

— Reply to this email directly or view it on GitHub https://github.com/shifthappens/hxeventmanager/issues/2#issuecomment-162209879 .