version 2.3.3 released
This commit is contained in:
parent
740d3ae6c2
commit
321c0aa95e
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
|
||||
|
||||
add_action( 'add_meta_boxes', 'mep_event_meta_box_add' );
|
||||
function mep_event_meta_box_add(){
|
||||
add_meta_box( 'mep-event-meta', __('Event Venue','mage-eventpress'), 'mep_event_venue_meta_box_cb', 'mep_events', 'normal', 'high' );
|
||||
|
@ -764,12 +763,31 @@ function mep_event_ticket_type() {
|
|||
|
||||
function mep_event_date_meta_box_cb($post){
|
||||
$values = get_post_custom( $post->ID );
|
||||
$more_date = get_post_meta($post->ID, 'mep_event_more_date', true);
|
||||
?>
|
||||
|
||||
<div class='sec'>
|
||||
<label for="event_start_date"> <?php _e('Start Date & Time:','mage-eventpress'); ?> </label>
|
||||
<span><input class='event_start' id='event_start_date' type="text" name='mep_event_start_date' value='<?php if(array_key_exists('mep_event_start_date', $values)){ echo $values['mep_event_start_date'][0]; } ?>'> </span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="sec">
|
||||
<table width="100%" class="mama">
|
||||
<tr >
|
||||
<td><input placeholder="Day 2" type="text" class='event_more_date' name="event_more_date[]" value="<?php echo $more_date[0]['event_more_date']; ?>" /></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td><input placeholder="Day 3" type="text" class='event_more_date' name="event_more_date[]" value="<?php echo $more_date[1]['event_more_date']; ?>" /></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td><input placeholder="Day 4" type="text" class='event_more_date' name="event_more_date[]" value="<?php echo $more_date[2]['event_more_date']; ?>" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class='sec'>
|
||||
<label for="event_end_date"> <?php _e('End Date & Time:','mage-eventpress'); ?> </label>
|
||||
<span><input class='event_end' id='event_end_date' type="text" name='mep_event_end_date' value='<?php if(array_key_exists('mep_event_end_date', $values)){ echo $values['mep_event_end_date'][0]; } ?>'> </span>
|
||||
|
@ -998,6 +1016,36 @@ if($post){
|
|||
}else{
|
||||
$pid='';
|
||||
}
|
||||
|
||||
|
||||
$oldm = get_post_meta($post_id, 'mep_event_more_date', true);
|
||||
$mdate = array();
|
||||
// $options = hhs_get_sample_options();
|
||||
|
||||
$more_date = $_POST['event_more_date'];
|
||||
$mcount = count( $more_date );
|
||||
for ( $m = 0; $m < $mcount; $m++ ) {
|
||||
if ( $more_date[$m] != '' ) :
|
||||
$mdate[$m]['event_more_date'] = stripslashes( strip_tags( $more_date[$m] ) );
|
||||
endif;
|
||||
}
|
||||
if ( !empty( $mdate ) && $mdate != $oldm )
|
||||
update_post_meta( $post_id, 'mep_event_more_date', $mdate );
|
||||
elseif ( empty($mdate) && $oldm )
|
||||
delete_post_meta( $post_id, 'mep_event_more_date', $oldm );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//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']);
|
||||
|
|
|
@ -5,6 +5,22 @@ function mep_add_custom_fields_text_to_cart_item( $cart_item_data, $product_id,
|
|||
$new = array();
|
||||
$user = array();
|
||||
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['mep_event_location_cart'])){
|
||||
$event_cart_location = $_POST['mep_event_location_cart'];
|
||||
}else{ $event_cart_location = ""; }
|
||||
|
||||
|
||||
if(isset($_POST['mep_event_date_cart'])){
|
||||
$event_cart_date = $_POST['mep_event_date_cart'];
|
||||
}else{ $event_cart_date = ""; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['event_addt_price'])){
|
||||
$checked = $_POST['event_addt_price'];
|
||||
}else{ $checked=""; }
|
||||
|
@ -174,12 +190,14 @@ if(isset($_POST['mep_event_ticket_type'])){
|
|||
}
|
||||
|
||||
|
||||
$cart_item_data['event_extra_option'] = $new;
|
||||
$cart_item_data['event_user_info'] = $user;
|
||||
$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_extra_option'] = $new;
|
||||
$cart_item_data['event_user_info'] = $user;
|
||||
$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_cart_location'] = $event_cart_location;
|
||||
$cart_item_data['event_cart_date'] = $event_cart_date;
|
||||
|
||||
return $cart_item_data;
|
||||
}
|
||||
|
@ -209,7 +227,10 @@ $mep_events_extra_prices = $cart_item['event_extra_option'];
|
|||
// print_r($cart_item);
|
||||
if($mep_events_extra_prices){
|
||||
echo "<ul class='event-custom-price'>";
|
||||
|
||||
?>
|
||||
<li><?php _e('Event Date','mage-eventpress'); ?>: <?php echo $cart_item['event_cart_date']; ?></li>
|
||||
<li><?php _e('Event Location','mage-eventpress'); ?>: <?php echo $cart_item['event_cart_location']; ?></li>
|
||||
<?php
|
||||
foreach ( $mep_events_extra_prices as $field ) {
|
||||
if($field['option_qty']>0){
|
||||
?>
|
||||
|
@ -242,6 +263,15 @@ $event_ticket_price = $values['event_ticket_price'];
|
|||
$event_ticket_qty = $values['event_ticket_qty'];
|
||||
$product_id = $values['product_id'];
|
||||
|
||||
$cart_location = $values['event_cart_location'];
|
||||
$cart_date = $values['event_cart_date'];
|
||||
|
||||
$item->add_meta_data('Date',$cart_date);
|
||||
$item->add_meta_data('Location',$cart_location);
|
||||
|
||||
|
||||
|
||||
|
||||
if (is_array($mep_events_extra_prices) || is_object($mep_events_extra_prices)){
|
||||
foreach ( $mep_events_extra_prices as $field ) {
|
||||
if($field['option_qty']>0){
|
||||
|
|
|
@ -12,4 +12,9 @@ jQuery(document).ready(function($){
|
|||
end: {} // end picker options
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
jQuery('.event_more_date').datetimepicker({
|
||||
dateFormat: 'yy-mm-dd',
|
||||
timeFormat: "HH:mm"
|
||||
// minDate:0
|
||||
});
|
|
@ -3,9 +3,8 @@ add_action('mep_add_to_cart','mep_get_event_reg_btn');
|
|||
|
||||
// Get Event Registration Button
|
||||
function mep_get_event_reg_btn(){
|
||||
global $post,$event_meta;
|
||||
global $post,$event_meta;
|
||||
$post_id = $post->ID;
|
||||
// $event_meta = get_post_meta($post_id, 'mep_event_meta',true);
|
||||
$event_meta = get_post_custom($post_id);
|
||||
$event_expire_date = $event_meta['mep_event_start_date'][0];
|
||||
$event_sqi = $event_meta['mep_sqi'][0];
|
||||
|
@ -22,7 +21,7 @@ global $post,$event_meta;
|
|||
$event_ecternal_link = '';
|
||||
$book_count = get_post_meta($post_id,'total_booking', true);
|
||||
|
||||
if($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
|
||||
if($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
|
||||
|
||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
||||
if($simple_rsv){
|
||||
|
@ -31,8 +30,6 @@ if($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
|
|||
$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);
|
||||
|
@ -41,8 +38,8 @@ if($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
|
|||
$interval = $datetime1->diff($datetime2);
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true);
|
||||
|
||||
$stc = 0;
|
||||
$leftt = 0;
|
||||
$stc = 0;
|
||||
$leftt = 0;
|
||||
if (is_array($mep_event_ticket_type) || is_object($mep_event_ticket_type)){
|
||||
foreach ($mep_event_ticket_type as $field ) {
|
||||
$qm = $field['option_name_t'];
|
||||
|
@ -68,70 +65,118 @@ if(time() > strtotime($newformat)){
|
|||
elseif($seat_left<=0){
|
||||
?>
|
||||
<span class=event-expire-btn>
|
||||
<?php _e('No Seat Available','mage-eventpress'); ?>
|
||||
<?php _e('No Seat Available','mage-eventpress'); ?>
|
||||
</span>
|
||||
<?php
|
||||
do_action('mep_after_no_seat_notice');
|
||||
}
|
||||
else{
|
||||
|
||||
$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);
|
||||
|
||||
|
||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
||||
}else{
|
||||
$mep_available_seat = 'on';
|
||||
}
|
||||
|
||||
if($mep_event_ticket_type){
|
||||
|
||||
$stc = 0;
|
||||
$leftt = 0;
|
||||
$res = 0;
|
||||
|
||||
foreach ( $mep_event_ticket_type as $field ) {
|
||||
$qm = $field['option_name_t'];
|
||||
$tesqn = $post->ID.str_replace(' ', '', $qm);
|
||||
$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-$res;
|
||||
}else{
|
||||
$leftt = $event_meta['mep_total_seat'][0]- $total_book;
|
||||
}
|
||||
|
||||
$days = $interval->d;
|
||||
$hours = $interval->h;
|
||||
$minutes = $interval->i;
|
||||
if($days>0){ $dd = $days." days "; }else{ $dd=""; }
|
||||
if($hours>0){ $hh = $hours." hours "; }else{ $hh=""; }
|
||||
if($minutes>0){ $mm = $minutes." minutes "; }else{ $mm=""; }
|
||||
$qty_typec = $event_meta['qty_box_type'][0];
|
||||
|
||||
|
||||
$qty_typec = $event_meta['qty_box_type'][0];
|
||||
if(array_key_exists('mep_reg_status', $event_meta)){
|
||||
$reg_status = $event_meta['mep_reg_status'][0];
|
||||
}else{
|
||||
$reg_status = '';
|
||||
$reg_status = $event_meta['mep_reg_status'][0];
|
||||
}else{
|
||||
$reg_status = '';
|
||||
}
|
||||
if($reg_status!='off'){
|
||||
?>
|
||||
<h4 class="mep-cart-table-title"> <?php _e('Register Now:','mage-eventpress'); ?></h4>
|
||||
<form action="" method='post'>
|
||||
<?php do_action('mep_event_ticket_type_extra_service'); ?>
|
||||
<?php
|
||||
do_action('mep_event_ticket_type_extra_service');
|
||||
if($leftt>0){
|
||||
?>
|
||||
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id,"_price",true); ?>"/>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left" class='total-col'><?php _e('Quantity:','mage-eventpress');
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true);
|
||||
// print_r($mep_event_ticket_type);
|
||||
if($mep_event_ticket_type){
|
||||
?>
|
||||
if($mep_event_ticket_type){ ?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
||||
<span id="ttyttl"></span>
|
||||
<?php
|
||||
}else{
|
||||
if($event_sqi==1){
|
||||
$qmx = ($event_meta['mep_total_seat'][0]- $total_book);
|
||||
if($qty_typec=='dropdown'){ ?>
|
||||
<select name="quantity" id="quantity_5a7abbd1bff73" class='input-text qty text extra-qty-box'>
|
||||
<?php for ($i = 1; $i <= $qmx; $i++) { ?>
|
||||
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
$qmx = ($event_meta['mep_total_seat'][0]- $total_book);
|
||||
if($qty_typec=='dropdown'){ ?>
|
||||
<select name="quantity" id="quantity_5a7abbd1bff73" class='input-text qty text extra-qty-box'>
|
||||
<?php for ($i = 1; $i <= $qmx; $i++) { ?>
|
||||
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<?php }else{ ?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="number">
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="number">
|
||||
<?php
|
||||
}
|
||||
}else{
|
||||
echo 1;
|
||||
?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?> <span class='the-total'><?php _e('Total','mage-eventpress'); ?> <span id="usertotal"></span></span></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>
|
||||
?>
|
||||
<span class='the-total'><?php _e('Total','mage-eventpress'); ?> <span id="usertotal"></span></span>
|
||||
</td>
|
||||
<td align="right">
|
||||
<input type="hidden" name="mep_event_location_cart" value="<?php trim(mep_ev_location_ticket($post_id,$event_meta)); ?>">
|
||||
<input type="hidden" name="mep_event_date_cart" value="<?php do_action('mep_event_date'); ?>">
|
||||
<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
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
||||
if(!$mep_event_ticket_type){
|
||||
if($qm){$qm=$qm;}else{$qm='';}
|
||||
?><?php do_action('mep_single_page_reg'); ?><?php } ?>
|
||||
?><?php do_action('mep_single_page_reg'); ?><?php } } ?>
|
||||
</form><?php
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,12 @@ add_action('mep_event_date','mep_ev_datetime');
|
|||
|
||||
function mep_ev_datetime(){
|
||||
global $event_meta;
|
||||
$more_date = unserialize($event_meta['mep_event_more_date'][0]);
|
||||
|
||||
?>
|
||||
<p><?php mep_get_full_time_and_date($event_meta['mep_event_start_date'][0]); ?> - <?php mep_get_full_time_and_date($event_meta['mep_event_end_date'][0]); ?></p>
|
||||
<p><?php mep_get_full_time_and_date($event_meta['mep_event_start_date'][0]); if($more_date){ foreach ($more_date as $md) {
|
||||
echo " - "; mep_get_full_time_and_date($md['event_more_date']);
|
||||
} } else{ echo " - "; } ?> <?php if($more_date){ echo " - "; } mep_get_full_time_and_date($event_meta['mep_event_end_date'][0]); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
|
|
@ -7,13 +7,31 @@ add_action('mep_event_location_ticket','mep_ev_location_ticket');
|
|||
|
||||
|
||||
|
||||
function mep_ev_location_cart($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;
|
||||
|
||||
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 } if(get_term_meta( $org_id, 'org_city', true )){ ?> <?php echo get_term_meta( $org_id, 'org_city', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_state', true )){ echo get_term_meta( $org_id, 'org_state', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_postcode', true )){ ?> <?php echo get_term_meta( $org_id, 'org_postcode', true ); ?>, <?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 } if($event_meta['mep_city'][0]){ ?> <?php echo $event_meta['mep_city'][0]; ?>, <?php } if($event_meta['mep_state'][0]){ ?> <?php echo $event_meta['mep_state'][0]; ?>, <?php } if($event_meta['mep_postcode'][0]){ ?> <?php echo $event_meta['mep_postcode'][0]; ?>, <?php } if($event_meta['mep_country'][0]){ ?> <?php echo $event_meta['mep_country'][0]; ?> <?php }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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 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 } ?>
|
||||
|
|
|
@ -1,6 +1,72 @@
|
|||
<?php
|
||||
function mep_output_add_to_cart_custom_fields() {
|
||||
|
||||
|
||||
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);
|
||||
|
||||
|
||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
||||
}else{
|
||||
$mep_available_seat = 'on';
|
||||
}
|
||||
|
||||
if($mep_event_ticket_type){
|
||||
|
||||
$stc = 0;
|
||||
$leftt = 0;
|
||||
$res = 0;
|
||||
|
||||
|
||||
foreach ( $mep_event_ticket_type as $field ) {
|
||||
$qm = $field['option_name_t'];
|
||||
$tesqn = $post->ID.str_replace(' ', '', $qm);
|
||||
|
||||
$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-$res;
|
||||
|
||||
}else{
|
||||
$leftt = $event_meta['mep_total_seat'][0]- $total_book;
|
||||
}
|
||||
|
||||
|
||||
if($leftt>0){
|
||||
|
||||
do_action('mep_event_ticket_types');
|
||||
do_action('mep_event_extra_service');
|
||||
}
|
||||
|
||||
else{
|
||||
?>
|
||||
<span class=event-expire-btn>
|
||||
<?php _e('No Seat Available','mage-eventpress'); ?>
|
||||
</span>
|
||||
<?php
|
||||
do_action('mep_after_no_seat_notice');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
add_action( 'mep_event_ticket_type_extra_service', 'mep_output_add_to_cart_custom_fields', 10 );
|
||||
|
|
|
@ -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.2
|
||||
* Version: 2.3.3
|
||||
* Author: MagePeople Team
|
||||
* Author URI: http://www.mage-people.com/
|
||||
* Text Domain: mage-eventpress
|
||||
|
@ -253,7 +253,8 @@ $result = $wpdb->get_results( "SELECT * FROM $table_name WHERE order_item_id=$it
|
|||
|
||||
|
||||
|
||||
if($order->has_status( 'processing' ) || $order->has_status( 'pending' )) {
|
||||
// if($order->has_status( 'processing' ) || $order->has_status( 'pending' )) {
|
||||
if($order->has_status( 'processing' ) || $order->has_status( 'completed' )) {
|
||||
// update_post_meta( $event_id, $mep_atnd, "a2");
|
||||
|
||||
$mep_stock_msgc = mep_get_order_info(get_post_meta($event_id,$order_meta_text, true),0);
|
||||
|
@ -826,17 +827,21 @@ global $post;
|
|||
$mep_event_ticket_type = get_post_meta($pid, 'mep_event_ticket_type', true);
|
||||
$mep_events_extra_prices = get_post_meta($pid, 'mep_events_extra_prices', true);
|
||||
$n_price = get_post_meta($pid, '_price', true);
|
||||
|
||||
if($n_price==0){
|
||||
$gn_price = "Free";
|
||||
}else{
|
||||
$gn_price =$cur.$n_price;
|
||||
}
|
||||
if($mep_events_extra_prices){
|
||||
$gn_price = $cur.$mep_events_extra_prices[0]['option_price'];
|
||||
}
|
||||
|
||||
// if($mep_events_extra_prices){
|
||||
// $gn_price = $cur.$mep_events_extra_prices[0]['option_price'];
|
||||
// }
|
||||
|
||||
if($mep_event_ticket_type){
|
||||
$gn_price = $cur.$mep_event_ticket_type[0]['option_price_t'];
|
||||
}
|
||||
|
||||
return $gn_price;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue