Changeset 1745709
- Timestamp:
- 10/12/2017 10:13:03 PM (8 years ago)
- Location:
- opentickets-community-edition/trunk
- Files:
-
- 6 edited
-
assets/js/admin/order/ticket-selection.js (modified) (1 diff)
-
inc/event-area/base-event-area-zoner.abstract-dep.php (modified) (1 diff)
-
inc/event-area/post-type.class.php (modified) (4 diffs)
-
launcher.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
templates/checkin/occupy-success.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
opentickets-community-edition/trunk/assets/js/admin/order/ticket-selection.js
r1634310 r1745709 477 477 // start the UI with the mindset of 'changing' an existing reservation 478 478 me.change_ticket_ui = function( e ) { 479 console.log( 'fucing click' );480 479 e.preventDefault(); 481 480 -
opentickets-community-edition/trunk/inc/event-area/base-event-area-zoner.abstract-dep.php
r1359200 r1745709 60 60 } 61 61 62 // clear out any temporary locks that have expired63 public static function clear_locks( $event_id=0, $customer_id=false ) {64 global $wpdb;65 // require either required basic information type66 if ( empty( $event_id ) && empty( $customer_id ) )67 return;68 69 // get a list of all the expirable states70 $temp_states = $this->get_temp_stati();71 72 // cycle through the list of temp states and remove any expired keys with those states based on the supplied information73 foreach ( $temp_states as $state ) {74 // if this is not a temp state, then skip it75 if ( $state[1] >= 0 )76 continue;77 78 // build a query that will find all locks that have expired, based on the supplied criteria. we fetch the list so that we can79 // notify other sources that these locks are going away (such as other plugins, or upgrades to this plugin)80 $q = $wpdb->prepare( 'select * from ' . $wpdb->qsot_event_zone_to_order . ' where state = %s and since < NOW() - INTERVAL %d SECOND', $state[0], $state[1] );81 82 // if the event was supplied, reduce the list to only ones for this event83 if ( ! empty( $event_id ) )84 $q .= $wpdb->prepare( ' and event_id = %d', $event_id );85 86 // if the customer id was supplied then, add that to the sql87 if ( ! empty( $customer_id ) ) {88 if ( is_array( $customer_id ) )89 $q .= ' and session_customer_id in(\'' . implode( '\',\'', array_map( 'esc_sql', $customer_id ) ) . '\')';90 else91 $q .= $wpdb->prepare( ' and session_customer_id = %s', $customer_id );92 }93 94 // fetch a list of existing locks.95 $locks = $wpdb->get_results( $q );96 97 // if there are no locks to remove, then skip this item98 if ( empty( $locks ) )99 continue;100 101 // tell everyone that the locks are going away102 do_action( 'qsot-removing-zone-locks', $locks, $state[0], $event_id, $customer_id );103 104 // delete the locks we said we would delete in the above action.105 // this is done in this manner, because we need to only delete the ones we told others about.106 // technically, if the above action call takes too long, other locks could have expired by the time we get to delete them.107 // thus we need to explicitly delete ONLY the ones we told everyone we were deleting, so that none are removed without the others being notified.108 $q = 'delete from ' . $wpdb->qsot_event_zone_to_order . ' where '; // base query109 $wheres = array(); // holder for queries defining each specific row to delete110 111 // cycle through all the locks we said we would delete112 foreach ( $locks as $lock ) {113 // aggregate a partial where statement, that specifically identifies this row, using all fields for positive id114 $fields = array();115 foreach ( $lock as $k => $v )116 $fields[] = $wpdb->prepare( $k.' = %s', $v );117 if ( ! empty( $fields ) )118 $wheres[] = implode( ' and ', $fields );119 }120 121 // if we have where statements for at least one row to remove122 if ( ! empty( $wheres ) ) {123 // glue the query together, and run it to delete the rows124 $q .= '(' . implode( ') or (', $wheres ) . ')';125 $wpdb->query( $q );126 }127 }128 }129 130 62 // setup the options for allowing timers to be set 131 63 protected function _setup_options() {} -
opentickets-community-edition/trunk/inc/event-area/post-type.class.php
r1647408 r1745709 922 922 } 923 923 924 // allow re-organization of index, to prevent problems with things like family tickets 925 $indexed = apply_filters( 'qsot-sync-cart-tickets-indexed-list', $indexed ); 926 924 927 // cycle through the cart items, and remove any that do not have a matched indexed item 925 928 foreach ( $WC->cart->get_cart() as $key => $item ) { … … 987 990 988 991 global $wpdb; 989 // start constructing the query 990 $q = 'delete from ' . $wpdb->qsot_event_zone_to_order . ' where '; 992 // find all the rows to delete first 993 // @NOTE - if a lock is associated to an order, never delete it 994 $q = 'select * from ' . $wpdb->qsot_event_zone_to_order . ' where order_id > 0 and '; 991 995 992 996 // construct the stati part of the query … … 1004 1008 $q .= $wpdb->prepare( ' and session_customer_id = %s', $args['customer_id'] ); 1005 1009 1006 $wpdb->query( $q ); 1010 // get all the rows 1011 $locks = $wpdb->get_results( $q ); 1012 1013 // if there are no locks to remove, then skip this item 1014 if ( empty( $locks ) ) 1015 return; 1016 1017 // tell everyone that the locks are going away 1018 do_action( 'qsot-removing-zone-locks', $locks, $state[0], $event_id, $customer_id ); 1019 1020 // delete the locks we said we would delete in the above action. 1021 // this is done in this manner, because we need to only delete the ones we told others about. 1022 // technically, if the above action call takes too long, other locks could have expired by the time we get to delete them. 1023 // thus we need to explicitly delete ONLY the ones we told everyone we were deleting, so that none are removed without the others being notified. 1024 $q = 'delete from ' . $wpdb->qsot_event_zone_to_order . ' where '; // base query 1025 $wheres = array(); // holder for queries defining each specific row to delete 1026 1027 // cycle through all the locks we said we would delete 1028 foreach ( $locks as $lock ) { 1029 // aggregate a partial where statement, that specifically identifies this row, using all fields for positive id 1030 $fields = array(); 1031 foreach ( $lock as $k => $v ) 1032 $fields[] = $wpdb->prepare( $k.' = %s', $v ); 1033 if ( ! empty( $fields ) ) 1034 $wheres[] = implode( ' and ', $fields ); 1035 } 1036 1037 // if we have where statements for at least one row to remove 1038 if ( ! empty( $wheres ) ) { 1039 // glue the query together, and run it to delete the rows 1040 $q .= '(' . implode( ') or (', $wheres ) . ')'; 1041 $wpdb->query( $q ); 1042 } 1007 1043 } 1008 1044 … … 1105 1141 // have the event_area determine how to update the order item info in the ticket table 1106 1142 //$result = $area_type->confirm_tickets( $item, $item_id, $order, $event, $event_area ); 1107 $result = $this->_update_order_id( $order, $item, $item_id, $event, $event_area, $area_type );1143 //$result = $this->_update_order_id( $order, $item, $item_id, $event, $event_area, $area_type ); 1108 1144 $result_status = $area_type->confirm_tickets( $item, $item_id, $order, $event, $event_area ); 1109 1145 1110 1146 // notify externals of the change 1111 do_action( 'qsot-updated-order-id', $order, $item, $item_id, $result );1147 //do_action( 'qsot-updated-order-id', $order, $item, $item_id, $result ); 1112 1148 do_action( 'qsot-confirmed-ticket', $order, $item, $item_id, $result_status ); 1113 1149 } -
opentickets-community-edition/trunk/launcher.php
r1667093 r1745709 4 4 * Plugin URI: http://opentickets.com/ 5 5 * Description: Event Management and Online Ticket Sales Platform 6 * Version: 2.8. 56 * Version: 2.8.6 7 7 * Author: Quadshot Software LLC 8 8 * Author URI: http://quadshot.com/ … … 55 55 'fctm' => 'fc', 56 56 'always_reserve' => 0, 57 'version' => '2.8. 5',58 'min_wc_version' => '3. 0.0',57 'version' => '2.8.6', 58 'min_wc_version' => '3.2.0', 59 59 'core_post_type' => 'qsot-event', 60 60 'core_post_rewrite_slug' => 'event', -
opentickets-community-edition/trunk/readme.txt
r1667093 r1745709 171 171 172 172 == Changelog == 173 174 = 2.8.6 - Oct/12/2017 = 175 * [tweak] adding new hooks for new plugins to interrupt js flow 176 * [tweak] changes for the family tickets plugin to work 177 * [fix] possible solution to seating issues 178 * [fix] updating a template to use new WC3 fetching of order information 173 179 174 180 = 2.8.5 - May/30/2017 = -
opentickets-community-edition/trunk/templates/checkin/occupy-success.php
r1536371 r1745709 5 5 //get_header(); 6 6 7 $owner = $ticket->order->billing_first_name . ' ' . $ticket->order->billing_last_name . ' (' . $ticket->order->billing_email . ')'; 7 $WC3 = QSOT_WC3(); 8 $owner = $WC3->order_data( $ticket->order, 'billing_first_name' ) . ' ' . $WC3->order_data( $ticket->order, 'billing_last_name' ) . ' (' . $WC3->order_data( $ticket->order, 'billing_email' ) . ')'; 8 9 $index = '[' . $ticket->owns['occupied'] . ' / ' . array_sum( array_values( $ticket->owns ) ) . ']'; 9 10 $msg = __('Check-In SUCCESSFUL','opentickets-community-edition');
Note: See TracChangeset
for help on using the changeset viewer.