version 2.3.1 released
This commit is contained in:
parent
8dd2b76b8a
commit
546f420501
|
@ -344,7 +344,16 @@ span.the-total {
|
|||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
p.mep_no_tickt_notice {
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
color: red;
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
width: auto;
|
||||
/* left: 20%; */
|
||||
z-index: 999999;
|
||||
}
|
||||
.mep_event_list_item {
|
||||
overflow: hidden;
|
||||
margin: 10px 0;
|
||||
|
|
|
@ -282,23 +282,25 @@ $values = get_post_custom( $post->ID );
|
|||
<thead>
|
||||
<tr>
|
||||
<th width="20%"><?php _e('Price Label','mage-eventpress'); ?></th>
|
||||
<th width="20%"><?php _e('Price','mage-eventpress'); ?></th>
|
||||
<th width="20%"><?php _e('Quantity','mage-eventpress'); ?></th>
|
||||
<th width="10%"><?php _e('Price','mage-eventpress'); ?></th>
|
||||
<th width="10%"><?php _e('Quantity','mage-eventpress'); ?></th>
|
||||
<th width="10%"><?php _e('Reserve Qty','mage-eventpress'); ?></th>
|
||||
<th width="20%"><?php _e('Input Type','mage-eventpress'); ?></th>
|
||||
<th width="20%"><?php _e('Show Quantity Box','mage-eventpress'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input id='mep_ev_8' type="text" name='mep_price_label' value='<?php if(array_key_exists('mep_price_label', $values)){ echo $values['mep_price_label'][0];} ?>'></td>
|
||||
<td><input id='mep_ev_9' type="number" name='_price' required min='0' value='<?php if(array_key_exists('_price', $values)){ echo $values['_price'][0]; } else{ echo 0; } ?>'></td>
|
||||
<td><input id='mep_ev_1' type="number" name='mep_total_seat' value='<?php if(array_key_exists('mep_total_seat', $values)){ echo $values['mep_total_seat'][0]; } ?>'> </td>
|
||||
<td> <?php if(array_key_exists('qty_box_type', $values)){ $qty_typec = $values['qty_box_type'][0]; }else{ $qty_typec=""; } ?>
|
||||
<td align="center"><input id='mep_ev_8' type="text" name='mep_price_label' value='<?php if(array_key_exists('mep_price_label', $values)){ echo $values['mep_price_label'][0];} ?>'></td>
|
||||
<td align="center"><input style="width: 100px;" id='mep_ev_9' type="number" name='_price' required min='0' value='<?php if(array_key_exists('_price', $values)){ echo $values['_price'][0]; } else{ echo 0; } ?>'></td>
|
||||
<td align="center"><input style="width: 100px;" id='mep_ev_1' type="number" name='mep_total_seat' value='<?php if(array_key_exists('mep_total_seat', $values)){ echo $values['mep_total_seat'][0]; } ?>'> </td>
|
||||
<td align="center"><input id='mep_ev_1' style="width: 100px;" type="number" name='mep_rsv_seat' value='<?php if(array_key_exists('mep_rsv_seat', $values)){ echo $values['mep_rsv_seat'][0]; } ?>'> </td>
|
||||
<td align="center"> <?php if(array_key_exists('qty_box_type', $values)){ $qty_typec = $values['qty_box_type'][0]; }else{ $qty_typec=""; } ?>
|
||||
<select name="qty_box_type" id="mep_ev_9800" class=''>
|
||||
<option value="inputbox" <?php if($qty_typec=='inputbox'){ echo "Selected"; } ?>><?php _e('Input Box','mage-eventpress'); ?></option>
|
||||
<option value="dropdown" <?php if($qty_typec=='dropdown'){ echo "Selected"; } ?>><?php _e('Dropdown List','mage-eventpress'); ?></option>
|
||||
</select></td>
|
||||
<td> <span><input style='text-align: left;width: auto;' id='mep_ev_98' type="checkbox" name='mep_sqi' value='1' <?php if(array_key_exists('mep_sqi', $values)){ $sqi = $values['mep_sqi'][0]; }else{ $sqi =0; } if($sqi==1){ echo 'checked'; } ?> > <?php _e('Yes','mage-eventpress'); ?></span></td>
|
||||
<td align="center"> <span><input style='text-align: left;width: auto;' id='mep_ev_98' type="checkbox" name='mep_sqi' value='1' <?php if(array_key_exists('mep_sqi', $values)){ $sqi = $values['mep_sqi'][0]; }else{ $sqi =0; } if($sqi==1){ echo 'checked'; } ?> > <?php _e('Yes','mage-eventpress'); ?></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -697,6 +699,7 @@ function mep_event_ticket_type() {
|
|||
<th width="30%"><?php _e('Ticket Type Name','mage-eventpress'); ?></th>
|
||||
<th width="30%"><?php _e('Ticket Price','mage-eventpress'); ?></th>
|
||||
<th width="20%"><?php _e('Available Qty','mage-eventpress'); ?></th>
|
||||
<th width="20%"><?php _e('Reserve Qty','mage-eventpress'); ?></th>
|
||||
<th width="10%"><?php _e('Qty Box Type','mage-eventpress'); ?></th>
|
||||
<th width="10%"></th>
|
||||
</tr>
|
||||
|
@ -716,6 +719,8 @@ function mep_event_ticket_type() {
|
|||
|
||||
<td><input type="number" class="widefat" name="option_qty_t[]" value="<?php if ($field['option_qty_t'] != '') echo esc_attr( $field['option_qty_t'] ); else echo ''; ?>" /></td>
|
||||
|
||||
<td><input type="number" class="widefat" name="option_rsv_t[]" value="<?php if ($field['option_rsv_t'] != '') echo esc_attr( $field['option_rsv_t'] ); else echo ''; ?>" /></td>
|
||||
|
||||
<td><select name="option_qty_t_type[]" id="mep_ev_9800kj8" class=''>
|
||||
<option value="inputbox" <?php if($qty_t_type=='inputbox'){ echo "Selected"; } ?>><?php _e('Input Box','mage-eventpress'); ?></option>
|
||||
<option value="dropdown" <?php if($qty_t_type=='dropdown'){ echo "Selected"; } ?>><?php _e('Dropdown List','mage-eventpress'); ?></option>
|
||||
|
@ -735,6 +740,7 @@ function mep_event_ticket_type() {
|
|||
<td><input type="text" class="widefat" name="option_name_t[]" /></td>
|
||||
<td><input type="number" class="widefat" name="option_price_t[]" value="" /></td>
|
||||
<td><input type="number" class="widefat" name="option_qty_t[]" value="" /></td>
|
||||
<td><input type="number" class="widefat" name="option_rsv_t[]" value="" /></td>
|
||||
<td><select name="option_qty_t_type[]" id="mep_ev_9800kj8" class=''><option value=""><?php _e('Please Select Type','mage-eventpress'); ?></option><option value="inputbox"><?php _e('Input Box','mage-eventpress'); ?></option><option value="dropdown"><?php _e('Dropdown List','mage-eventpress'); ?></option></select></td>
|
||||
<td><a class="button remove-row-t" href="#"><?php _e('Remove','mage-eventpress'); ?></a></td>
|
||||
</tr>
|
||||
|
@ -849,6 +855,7 @@ function mep_events_ticket_type_save($post_id) {
|
|||
// $selects = $_POST['select'];
|
||||
$urls = $_POST['option_price_t'];
|
||||
$qty = $_POST['option_qty_t'];
|
||||
$rsv = $_POST['option_rsv_t'];
|
||||
$qty_type = $_POST['option_qty_t_type'];
|
||||
// $required = $_POST['option_required_t'];
|
||||
// $total_sold = $_POST['option_sold'];
|
||||
|
@ -870,6 +877,10 @@ function mep_events_ticket_type_save($post_id) {
|
|||
$new[$i]['option_qty_t'] = stripslashes( strip_tags( $qty[$i] ) );
|
||||
endif;
|
||||
|
||||
if ( $qty[$i] != '' ) :
|
||||
$new[$i]['option_rsv_t'] = stripslashes( strip_tags( $rsv[$i] ) );
|
||||
endif;
|
||||
|
||||
if ( $qty_type[$i] != '' ) :
|
||||
$new[$i]['option_qty_t_type'] = stripslashes( strip_tags( $qty_type[$i] ) );
|
||||
endif;
|
||||
|
@ -990,6 +1001,7 @@ if($post){
|
|||
//if you get here then it's your post type so do your thing....
|
||||
if(isset($_POST['mep_total_seat'])){
|
||||
$seat = strip_tags($_POST['mep_total_seat']);
|
||||
$rsvs = strip_tags($_POST['mep_rsv_seat']);
|
||||
$mep_location_venue = strip_tags($_POST['mep_location_venue']);
|
||||
$mep_street = strip_tags($_POST['mep_street']);
|
||||
$mep_city = strip_tags($_POST['mep_city']);
|
||||
|
@ -1056,10 +1068,12 @@ if($mep_event_ticket_type){
|
|||
$st_msg = 'no';
|
||||
$seat = "";
|
||||
$_price =0;
|
||||
$rsvs =0;
|
||||
}else{
|
||||
$st_msg = 'yes';
|
||||
$_price = $_price;
|
||||
$seat = $seat;
|
||||
$rsvs = $rsvs;
|
||||
|
||||
}
|
||||
|
||||
|
@ -1067,6 +1081,7 @@ if($mep_event_ticket_type){
|
|||
|
||||
|
||||
$update_seat = update_post_meta( $pid, 'mep_total_seat', $seat);
|
||||
$update_seat = update_post_meta( $pid, 'mep_rsv_seat', $rsvs);
|
||||
|
||||
$update_seat_stock_status = update_post_meta( $pid, '_manage_stock', $st_msg);
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ if(isset($_POST['mep_event_ticket_type'])){
|
|||
$cart_item_data['event_tp'] = $tp;
|
||||
$cart_item_data['line_total'] = $tp;
|
||||
$cart_item_data['line_subtotal'] = $tp;
|
||||
$cart_item_data['event_id'] = $product_id;
|
||||
$cart_item_data['event_id'] = $product_id;
|
||||
|
||||
return $cart_item_data;
|
||||
}
|
||||
|
@ -274,6 +274,7 @@ update_post_meta( $product_id, "mep_xtra_$tck_name",$ntesqt);
|
|||
|
||||
|
||||
$item->add_meta_data('_event_user_info',$event_user_info);
|
||||
$item->add_meta_data('_event_service_info',$mep_events_extra_prices);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -127,7 +127,8 @@ foreach ( $mep_event_ticket_type as $field ) {
|
|||
$qm = $field['option_name_t'];
|
||||
?>
|
||||
|
||||
jQuery('.btn-mep-event-cart').hide();
|
||||
//jQuery('.btn-mep-event-cart').hide();
|
||||
jQuery('.btn-mep-event-cart').attr('disabled','disabled');
|
||||
|
||||
jQuery('#eventpxtp_<?php echo $count; ?>').on('change', function () {
|
||||
|
||||
|
@ -137,9 +138,13 @@ jQuery('#eventpxtp_<?php echo $count; ?>').on('change', function () {
|
|||
var children=jQuery('#dadainfo_<?php echo $count; ?> > div').size() || 0;
|
||||
//alert(inputs);
|
||||
if(inputs==0){
|
||||
jQuery('.btn-mep-event-cart').hide();
|
||||
//jQuery('.btn-mep-event-cart').hide();
|
||||
jQuery('.btn-mep-event-cart').attr('disabled','disabled');
|
||||
jQuery('#mep_btn_notice').show();
|
||||
}else if(inputs>0){
|
||||
jQuery('.btn-mep-event-cart').show();
|
||||
//jQuery('.btn-mep-event-cart').show();
|
||||
jQuery('.btn-mep-event-cart').removeAttr('disabled');
|
||||
jQuery('#mep_btn_notice').hide();
|
||||
}
|
||||
if(input < children){
|
||||
jQuery('#dadainfo_<?php echo $count; ?>').empty();
|
||||
|
@ -159,6 +164,7 @@ $count++;
|
|||
}
|
||||
}else{
|
||||
?>
|
||||
jQuery('#mep_btn_notice').hide();
|
||||
jQuery('#quantity_5a7abbd1bff73').on('change', function () {
|
||||
|
||||
var input = jQuery('#quantity_5a7abbd1bff73').val() || 0;
|
||||
|
|
|
@ -24,6 +24,15 @@ global $post,$event_meta;
|
|||
|
||||
if($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
|
||||
|
||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
||||
if($simple_rsv){
|
||||
$simple_rsv = $simple_rsv;
|
||||
}else{
|
||||
$simple_rsv = 0;
|
||||
}
|
||||
$total_book = ($total_book + $simple_rsv);
|
||||
|
||||
|
||||
$seat_left = ((int)$event_meta['mep_total_seat'][0]- (int)$total_book);
|
||||
$time = strtotime($event_expire_date);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
|
@ -113,7 +122,9 @@ if($qty_typec=='dropdown'){ ?>
|
|||
}
|
||||
}
|
||||
?> <span class='the-total'><?php _e('Total','mage-eventpress'); ?> <span id="usertotal"></span></span></td>
|
||||
<td align="right"> <button type="submit" name="add-to-cart" value="<?php echo esc_attr($post_id); ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id,'mep_cart_btn_text','Register This Event'),'mage-eventpress'); ?> </button></td>
|
||||
<td align="right">
|
||||
<p class="mep_no_tickt_notice" id="mep_btn_notice"><?php _e('No Ticket Selected!','mage-eventpress'); ?></p>
|
||||
<button type="submit" name="add-to-cart" value="<?php echo esc_attr($post_id); ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id,'mep_cart_btn_text','Register This Event'),'mage-eventpress'); ?> </button></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
|
|
@ -25,4 +25,21 @@ global $event_meta;
|
|||
?>
|
||||
<p><?php mep_get_only_time($event_meta['mep_event_start_date'][0]); ?> </p>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function mep_ev_time_ticket($event_meta){
|
||||
// global $event_meta;
|
||||
?>
|
||||
<?php mep_get_only_time($event_meta['mep_event_start_date'][0]); ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
function mep_ev_date_ticket($event_meta){
|
||||
// global $event_meta;
|
||||
?>
|
||||
<?php echo date_i18n('d M Y', strtotime($event_meta['mep_event_start_date'][0])); ?>
|
||||
<?php
|
||||
}
|
|
@ -19,9 +19,9 @@ echo "<h3 class='ex-sec-title'>".mep_get_label($pid,'mep_event_extra_service_tex
|
|||
</tr>
|
||||
<?php
|
||||
foreach ($mep_events_extra_prices as $field) {
|
||||
$total_ext = $field['option_qty'];
|
||||
$total_ext = (int) $field['option_qty'];
|
||||
$opt_name = $pid.str_replace(' ', '', $field['option_name']);
|
||||
$tes = get_post_meta($pid,"mep_xtra_$opt_name",true);
|
||||
$tes = (int) get_post_meta($pid,"mep_xtra_$opt_name",true);
|
||||
$ext_left = ($total_ext-$tes);
|
||||
$qty_type = $field['option_qty_type'];
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,36 @@
|
|||
<?php
|
||||
add_action('mep_event_location','mep_ev_location');
|
||||
add_action('mep_event_location_ticket','mep_ev_location_ticket');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function mep_ev_location_ticket($event_id,$event_meta){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
?>
|
||||
<?php echo get_term_meta( $org_id, 'org_location', true ); ?>,
|
||||
<?php if(get_term_meta( $org_id, 'org_street', true )){ ?><?php echo get_term_meta( $org_id, 'org_street', true ); ?>, <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_city', true )){ ?> <?php echo get_term_meta( $org_id, 'org_city', true ); ?>, <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_state', true )){ ?> <?php echo get_term_meta( $org_id, 'org_state', true ); ?>, <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_postcode', true )){ ?> <?php echo get_term_meta( $org_id, 'org_postcode', true ); ?>, <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_country', true )){ ?> <?php echo get_term_meta( $org_id, 'org_country', true ); ?> <?php }
|
||||
}else{
|
||||
?>
|
||||
<?php echo $event_meta['mep_location_venue'][0]; ?>,
|
||||
<?php if($event_meta['mep_street'][0]){ ?><?php echo $event_meta['mep_street'][0]; ?>, <?php } ?>
|
||||
<?php if($event_meta['mep_city'][0]){ ?> <?php echo $event_meta['mep_city'][0]; ?>, <?php } ?>
|
||||
<?php if($event_meta['mep_state'][0]){ ?> <?php echo $event_meta['mep_state'][0]; ?>, <?php } ?>
|
||||
<?php if($event_meta['mep_postcode'][0]){ ?> <?php echo $event_meta['mep_postcode'][0]; ?>, <?php } ?>
|
||||
<?php if($event_meta['mep_country'][0]){ ?> <?php echo $event_meta['mep_country'][0]; ?> <?php }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function mep_ev_location(){
|
||||
|
|
|
@ -23,8 +23,10 @@ if($mep_event_ticket_type){
|
|||
$count =1;
|
||||
foreach ( $mep_event_ticket_type as $field ) {
|
||||
$qm = $field['option_name_t'];
|
||||
$rsv = (int)$field['option_rsv_t'];
|
||||
$tesqn = $pid.str_replace(' ', '', $qm);
|
||||
$tesq = get_post_meta($pid,"mep_xtra_$tesqn",true);
|
||||
$tesq = ($tesq + $rsv);
|
||||
$llft = ($field['option_qty_t'] - (int)$tesq);
|
||||
$qty_t_type = $field['option_qty_t_type'];
|
||||
?>
|
||||
|
|
|
@ -3,10 +3,19 @@ add_action('mep_event_seat','mep_ev_seat');
|
|||
|
||||
|
||||
function mep_ev_seat(){
|
||||
global $post,$event_meta,$total_book;
|
||||
global $post,$event_meta,$total_book;
|
||||
|
||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
||||
if($simple_rsv){
|
||||
$simple_rsv = $simple_rsv;
|
||||
}else{
|
||||
$simple_rsv = 0;
|
||||
}
|
||||
$total_book = ($total_book + $simple_rsv);
|
||||
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
||||
// echo "Hello";
|
||||
// print_r($mep_event_ticket_type);
|
||||
|
||||
|
||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
||||
}else{
|
||||
|
@ -17,6 +26,7 @@ if($mep_event_ticket_type){
|
|||
|
||||
$stc = 0;
|
||||
$leftt = 0;
|
||||
$res = 0;
|
||||
|
||||
|
||||
foreach ( $mep_event_ticket_type as $field ) {
|
||||
|
@ -27,11 +37,15 @@ $tesq = get_post_meta($post->ID,"mep_xtra_$tesqn",true);
|
|||
|
||||
$stc = $stc+$field['option_qty_t'];
|
||||
|
||||
$res = $res + (int)$field['option_rsv_t'];
|
||||
|
||||
$res = (int)$res;
|
||||
|
||||
|
||||
$llft = ($field['option_qty_t'] - (int)$tesq);
|
||||
$leftt = $leftt+$llft;
|
||||
$leftt = ($leftt+$llft);
|
||||
}
|
||||
|
||||
$leftt = $leftt-$res;
|
||||
?>
|
||||
<h5><strong><?php _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $stc; if($mep_available_seat=='on'){ ?> (<strong><?php echo $leftt; ?></strong> <?php _e('Left','mage-eventpress'); ?>)<?php } ?></h5>
|
||||
<?php
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Plugin Name: Woocommerce Events Manager
|
||||
* Plugin URI: http://mage-people.com
|
||||
* Description: A Complete Event Solution for WordPress by MagePeople..
|
||||
* Version: 2.3.0
|
||||
* Version: 2.3.1
|
||||
* Author: MagePeople Team
|
||||
* Author URI: http://www.mage-people.com/
|
||||
* Text Domain: mage-eventpress
|
||||
|
|
Loading…
Reference in New Issue