This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function espresso_return_single_price_sans_surcharge($event_id, $number=0) { | |
| do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, ''); | |
| global $wpdb, $org_options; | |
| $number = $number == 0 ? '0,1' : $number . ',' . $number; | |
| $results = $wpdb->get_results("SELECT event_cost FROM " . EVENTS_PRICES_TABLE . " WHERE event_id='" . $event_id . "' ORDER BY id ASC LIMIT " . $number); | |
| if ($wpdb->num_rows > 0) { | |
| foreach ($results as $result) { | |
| $event_cost = $result->event_cost; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // replaces gateways/eway/ewaypaymentprocess.php lines 87-97 | |
| if ($eway_settings['use_sandbox']) { | |
| echo '<h3 style="color:#ff0000;" title="Payments will not be processed">' . __('Debugging / Sandbox output', 'event_espresso') . '</h3><br />'; | |
| echo "Response code = " . $responsecode; | |
| echo "\nResponse = "; | |
| var_dump($response); | |
| echo '<h3 style="color:#ff0000;" title="Payments will not be processed">' . __('End of Debugging / Sandbox output (this will go away when you switch to live transactions)', 'event_espresso') . '</h3>'; | |
| $subject = 'Instant Payment Notification - Gateway Variable Dump'; | |
| $body = "An instant payment notification failed\n"; | |
| $body .= "from " . " on " . date('m/d/Y'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function espresso_count_the_events_in_a_category ($atts) { | |
| extract(shortcode_atts(array('event_category_id' => FALSE), $atts)); | |
| if (!$event_category_id) return FALSE; | |
| global $wpdb; | |
| return $wpdb->get_var($wpdb->prepare("SELECT COUNT(ed.id) FROM " . EVENTS_DETAIL_TABLE . " ed JOIN " . EVENTS_CATEGORY_REL_TABLE . " cr ON ed.id = cr.event_id JOIN " . EVENTS_CATEGORY_TABLE . " cd ON cr.cat_id = cd.id WHERE cd.category_identifier = '%s' AND ed.event_status != 'D'", $event_category_id)); | |
| } | |
| add_shortcode('COUNT_EVENTS_IN_CATEGORY', 'espresso_count_the_events_in_a_category'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //replaces lines 24-43 of plugins/espresso-multiple/cart-widget.php | |
| public function widget($args, $instance) { | |
| //if (empty($_SESSION['espresso_session']['events_in_session'])){return;} | |
| extract($args); | |
| global $org_options; | |
| $grand_total = !empty($_SESSION['espresso_session']['grand_total']) ? $_SESSION['espresso_session']['grand_total'] : 0.00; | |
| $title = apply_filters('widget_title', $instance['title']); | |
| echo $before_widget; | |
| echo $before_title . $title . $after_title; | |
| //Debug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function espresso_update_attendee_payment_status_in_db_custom($payment_data) { | |
| // echo '<h3>'. __CLASS__ . '->' . __FUNCTION__ . ' <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h3>'; | |
| remove_filter('filter_hook_espresso_update_attendee_payment_data_in_db', 'espresso_update_attendee_payment_status_in_db'); | |
| global $wpdb; | |
| $payment_data['payment_date'] = date(get_option('date_format')); | |
| if ($payment_data['payment_status'] == "Completed") { | |
| $payment = $payment_data['total_cost']; | |
| } elseif($payment_data['payment_status'] == "Pending" && !empty($payment_data['amount_paid'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // replaces lines 183-192 of includes/functions/time_date.php: | |
| $SQL .= "( SELECT COALESCE( (SELECT sum(quantity) FROM " . EVENTS_ATTENDEE_TABLE . " ATT "; | |
| $SQL .= "WHERE ATT.event_id= %d "; | |
| $SQL .= "AND ATT.payment_status != 'Incomplete' "; | |
| $SQL .= "AND ATT.event_time = ESE.start_time "; | |
| $SQL .= "AND ATT.end_time = ESE.end_time), 0 ) ) "; | |
| $SQL .= ") AS available_spaces "; | |
| $SQL .= "FROM " . EVENTS_START_END_TABLE . " ESE "; | |
| $SQL .= "WHERE ESE.event_id= %d "; | |
| $SQL .= "GROUP BY ESE.id "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function espresso_attendees_data_sc($atts) { | |
| global $wpdb, $org_options, $this_event_id; | |
| extract(shortcode_atts(array('event_id' => $this_event_id, 'type' => ''), $atts)); | |
| $event_id = "{$event_id}"; | |
| $type = "{$type}"; | |
| $data = get_number_of_attendees_reg_limit($event_id, $type); | |
| return $data; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function espresso_prepare_payment_data_for_gateways_custom( $payment_data ) { | |
| remove_filter('filter_hook_espresso_prepare_payment_data_for_gateways', 'espresso_prepare_payment_data_for_gateways'); | |
| global $wpdb, $org_options; | |
| $SQL = "SELECT ea.price_option, ea.email, ea.event_id, ea.registration_id, ea.txn_type, ed.start_date,"; | |
| $SQL .= " ea.attendee_session, ed.event_name, ea.lname, ea.fname, ea.total_cost,"; | |
| $SQL .= " ea.payment_status, ea.payment_date, ea.address, ea.city, ea.txn_id,"; | |
| $SQL .= " ea.zip, ea.state, ea.phone, ed.event_meta FROM " . EVENTS_ATTENDEE_TABLE . " ea"; | |
| $SQL .= " JOIN " . EVENTS_DETAIL_TABLE . " ed ON ed.id=ea.event_id"; | |
| $SQL .= " WHERE ea.id = %d"; | |
| $temp_data = $wpdb->get_row( $wpdb->prepare( $SQL, $payment_data['attendee_id'] ), ARRAY_A ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| jQuery( document ).ready( function() { | |
| jQuery('.DROPDOWN_37').html(''); | |
| jQuery('.DROPDOWN_36').on('change', function() { | |
| switch(jQuery(this).val()) { | |
| case '1': | |
| jQuery('.DROPDOWN_37').html('<option value="">Select One</option><option value="1"> 1</option><option value="2"> 2</option><option value="3"> 3</option>'); | |
| break; | |
| case '2': | |
| jQuery('.DROPDOWN_37').html('<option value="">Select One</option><option value="4"> 4</option><option value="5"> 5</option><option value="6"> 6</option>'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <tr> | |
| <?php | |
| $attendees = $wpdb->get_results($wpdb->prepare("SELECT registration_id, id, event_id, fname, lname FROM ".EVENTS_ATTENDEE_TABLE." WHERE attendee_session=%s", $attendee_session), OBJECT); | |
| foreach ($attendees as $attendee) { | |
| echo espresso_edit_attendee($attendee->registration_id, $attendee->id, $attendee->event_id, 'attendee', sprintf(__('Edit Registration Details for %s, %s','event_espresso'), $attendee->lname, $attendee->fname)); ?><br/> | |
| <?php } ?> | |
| </tr> | |
| // Not sure why it jumps out of the table to above it. |