Support

Home Forums Event Espresso Premium Seating chart with ticket discount

Seating chart with ticket discount

Posted: November 7, 2013 at 1:11 pm


Michael Sawyer

November 7, 2013 at 1:11 pm

With seating chart can I have some ticket discount such Senior and the remaining tickets full price?


Garth

  • Support Staff

November 7, 2013 at 5:29 pm

Hi Michael,

How are you today?

Are you asking whether you can have different tickets with different prices? Or do you want the same ticket with multiple prices? The former is possible, not the latter.


Michael Sawyer

November 8, 2013 at 7:04 am

The whole reason I bought this was to sell seats at shows. I needed to be able to offer a discount for anyone who is a senior, child or military – all the same discount amount. However, In that same transaction I presumed someone would be able to; for example, buy 2 adult and three children’s discounted tickets. The seating chart disables this from happening – very frustrating. Am I missing something – a work around I don’t know about? That is how tickets to events are usually sold. I was excited when I saw the price modifier, but that actually zero’s the price when a second ticket is bought. If you could please add this to the features request, or let me know how much it would be to have it added. I am stuck at this point.


Sidney Harrell

November 11, 2013 at 11:46 am

If you want discount codes to work with the seating chart, there is a block of code in includes/process-registration/payment_page.php, lines 125-137, that you can comment out or delete:

	// Added for seating chart addon
	// This code block overrides the cost using seating chart add-on price
	if ( defined('ESPRESSO_SEATING_CHART') && class_exists("seating_chart") && seating_chart::check_event_has_seating_chart($event_id) !== false) {
		
		$SQL = "SELECT sum(sces.purchase_price) as purchase_price ";
		$SQL .= "FROM " . EVENTS_SEATING_CHART_EVENT_SEAT_TABLE . " sces ";
		$SQL .= "INNER JOIN " . EVENTS_ATTENDEE_TABLE . " ea ON sces.attendee_id = ea.id ";
		$SQL .= "WHERE ea.registration_id = %s";  
		
        if ( $seat = $wpdb->get_row( $wpdb->prepare( $SQL, $registration_id ))) {
            $total_cost = number_format( $seat->purchase_price, 2, '.', '' );
            //$event_price_x_attendees = (float)$final_price;
        } 
	 
	} 


Michael Sawyer

November 11, 2013 at 12:05 pm

I did that, but it applies a discount to all the tickets. I need to be able to do 2 adult and 2 children with only the 2 children tickets marked down.


Sidney Harrell

November 11, 2013 at 1:18 pm

I’ve been doing some testing, and I can tell you that if the price modifier question is a radio button, and you comment out the line 77 in includes/functions/attendee_functions.php:

$val =  apply_filters( 'filter_hook_espresso_form_question_response', $val, $question, $attendee_id );

then the price modifier will work.


Sidney Harrell

November 11, 2013 at 1:41 pm

NVM, that line doesn’t affect it. I can’t reproduce the problem consistently. I’ll have to do more testing.


Sidney Harrell

November 11, 2013 at 2:02 pm

I’m stumped at this point, and maybe you can help me out. I saw the price modifier zero out the price when I was testing earlier, but now I cannot get it to do it again. Without that chunk of code commented out in payment_page.php, it just gives me the seating chart price, ignoring the Price Modifier. With that chunk of code commented out, it seems to be working fine. Either way, I can’t get it to zero out the price again with the Price Modifier. If you can reproduce the problem, let me know exactly what steps it takes to do it.


Michael Sawyer

November 11, 2013 at 2:06 pm

Sure, give me just a few minutes. I really appreciate you helping with this!


Michael Sawyer

November 11, 2013 at 2:46 pm

With the first set of code commented out. If you apply the discount code to only the second ticket it says “FREE”. I have tried several ways and what I am finding is the price modifier is not being applied to the second, or later, attendee. It is like the discount where it applies the discount to all the tickets purchased.


Sidney Harrell

November 11, 2013 at 7:02 pm

From what I can tell from testing, it looks like the PM zeroing out the price has to do with going back and forth through the registration process. There was some code added in to prevent the duplication of attendees when this is done, and it looks like that is deleting the entry from the seating chart database that tracks which seats have been reserved.
If I empty out the session variables by going to the Registration Cancelled page, and then go back to the event registration, choose a seat for attendee #1, fill out the info for attendee #1, choose a seat for attendee #2, fill out the info for attendee #2 and select the PM question that takes $2 off the ticket price, then hit the Submit button, it calculates the price correctly. If I then reload the confirmation page, it zeros out the price.
If you go into includes/process-registration/add_attendees_to_db.php and comment out line 67:

$wpdb->query($wpdb->prepare( $SQL, $v->id ));

it should prevent the zeroing out problem. Make sure you empty your session by going to the Registration Cancelled page or the Thank-You page before resuming testing.


Michael Sawyer

November 20, 2013 at 8:07 am

The discount with price modifier is not working. Not sure what is different from your files to mine.
Price modifier only works if entered on the first tickets and applies that discount to all tickets purchased.
Price modifier does not apply discount to any ticket after the first.


Sidney Harrell

November 20, 2013 at 3:27 pm

What versions of WP, EE, the seating chart, and the PM add-on are you using?
Can you provide a link to the site?


Michael Sawyer

November 25, 2013 at 3:53 pm

WordPress 3.7.1.
EE Version 3.1.35.2.P
Seating Chart Version 1.2-alpha
Price Modifier Version 0.0.3.1.B

website link http://faopa.org/


Sidney Harrell

November 25, 2013 at 4:48 pm

The Price Modifier does not work with the Multi-Event Registration. Sorry, I was testing using the regular registration process.

The support post ‘Seating chart with ticket discount’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso